mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
CanGc fixes in components/script/dom (#33862)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
5148b444be
commit
2b9527262c
10 changed files with 43 additions and 19 deletions
|
@ -37,7 +37,7 @@ use crate::dom::bindings::settings_stack::AutoEntryScript;
|
|||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::promisenativehandler::PromiseNativeHandler;
|
||||
use crate::realms::{enter_realm, AlreadyInRealm, InRealm};
|
||||
use crate::script_runtime::JSContext as SafeJSContext;
|
||||
use crate::script_runtime::{CanGc, JSContext as SafeJSContext};
|
||||
use crate::script_thread::ScriptThread;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -320,11 +320,13 @@ unsafe extern "C" fn native_handler_callback(
|
|||
*cx,
|
||||
HandleValue::from_raw(args.get(0)),
|
||||
InRealm::Already(&in_realm_proof),
|
||||
CanGc::note(),
|
||||
),
|
||||
v if v == NativeHandlerTask::Reject as i32 => handler.rejected_callback(
|
||||
*cx,
|
||||
HandleValue::from_raw(args.get(0)),
|
||||
InRealm::Already(&in_realm_proof),
|
||||
CanGc::note(),
|
||||
),
|
||||
_ => panic!("unexpected native handler task value"),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue