fix: Replace callargs_is_constructing with is_constructing method (#33101)

Signed-off-by: Koki Saito <saitoto828@gmail.com>
Co-authored-by: kokisaito <kosaito@indeed.com>
This commit is contained in:
Koki Saito 2024-08-18 10:48:39 +09:00 committed by GitHub
parent 20273b062a
commit db312319ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 15 deletions

View file

@ -40,8 +40,7 @@ use crate::dom::bindings::conversions::{get_dom_class, DOM_OBJECT_SLOT};
use crate::dom::bindings::guard::Guard;
use crate::dom::bindings::principals::ServoJSPrincipals;
use crate::dom::bindings::utils::{
callargs_is_constructing, get_proto_or_iface_array, DOMJSClass, ProtoOrIfaceArray,
DOM_PROTOTYPE_SLOT, JSCLASS_DOM_GLOBAL,
get_proto_or_iface_array, DOMJSClass, ProtoOrIfaceArray, DOM_PROTOTYPE_SLOT, JSCLASS_DOM_GLOBAL,
};
use crate::script_runtime::JSContext as SafeJSContext;
@ -611,7 +610,7 @@ pub fn get_desired_proto(
// https://heycam.github.io/webidl/#internally-create-a-new-object-implementing-the-interface
// step 3.
assert!(callargs_is_constructing(args));
assert!(args.is_constructing());
// 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