aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/interface.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2023-05-30 11:47:47 -0400
committerJosh Matthews <josh@joshmatthews.net>2023-05-30 11:47:47 -0400
commitb14b4726ac3958a932a1cf31143fc4130cafd052 (patch)
tree71c1043424ce488f2201ee71cad6aa878a640016 /components/script/dom/bindings/interface.rs
parent62e07686355116665382242aa3d06642914b7206 (diff)
downloadservo-b14b4726ac3958a932a1cf31143fc4130cafd052.tar.gz
servo-b14b4726ac3958a932a1cf31143fc4130cafd052.zip
Assert that we're constructing.
Diffstat (limited to 'components/script/dom/bindings/interface.rs')
-rw-r--r--components/script/dom/bindings/interface.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/dom/bindings/interface.rs b/components/script/dom/bindings/interface.rs
index d3f77356b08..940562ba471 100644
--- a/components/script/dom/bindings/interface.rs
+++ b/components/script/dom/bindings/interface.rs
@@ -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