mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Assert that we're constructing.
This commit is contained in:
parent
62e0768635
commit
b14b4726ac
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@ use crate::dom::bindings::guard::Guard;
|
|||
use crate::dom::bindings::principals::ServoJSPrincipals;
|
||||
use crate::dom::bindings::utils::{
|
||||
get_proto_or_iface_array, DOMJSClass, ProtoOrIfaceArray, DOM_PROTOTYPE_SLOT, JSCLASS_DOM_GLOBAL,
|
||||
callargs_is_constructing,
|
||||
};
|
||||
use crate::script_runtime::JSContext as SafeJSContext;
|
||||
use js::error::throw_type_error;
|
||||
|
@ -626,7 +627,7 @@ pub fn get_desired_proto(
|
|||
// https://heycam.github.io/webidl/#internally-create-a-new-object-implementing-the-interface
|
||||
// step 3.
|
||||
|
||||
//assert!(args.is_constructing())
|
||||
assert!(callargs_is_constructing(args));
|
||||
|
||||
// The desired prototype depends on the actual constructor that was invoked,
|
||||
// which is passed to us as the newTarget in the callargs. We want to do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue