mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
script: make throw_invalid_this and throw_constructor_without_new safe (#35360)
Signed-off-by: Stephen Muss <stephenmuss@gmail.com>
This commit is contained in:
parent
643885e6f1
commit
3c1cce825d
3 changed files with 15 additions and 14 deletions
|
@ -412,7 +412,7 @@ pub(crate) unsafe fn call_default_constructor(
|
|||
constructor: impl FnOnce(JSContext, &CallArgs, &GlobalScope, HandleObject) -> bool,
|
||||
) -> bool {
|
||||
if !args.is_constructing() {
|
||||
throw_constructor_without_new(*cx, ctor_name);
|
||||
throw_constructor_without_new(cx, ctor_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue