mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Clean up the functions to retrieve a global root from JS objects
This commit is contained in:
parent
e179cb02ff
commit
34858fd0c9
2 changed files with 23 additions and 28 deletions
|
@ -164,7 +164,7 @@ impl CallSetup {
|
|||
/// Performs the setup needed to make a call.
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new<T: CallbackContainer>(callback: &T, handling: ExceptionHandling) -> CallSetup {
|
||||
let global = global_root_from_object(callback.callback());
|
||||
let global = unsafe { global_root_from_object(callback.callback()) };
|
||||
let cx = global.r().get_cx();
|
||||
|
||||
let exception_compartment = unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue