mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Use usize for AutoEntryScript::global.
This commit is contained in:
parent
363f590019
commit
933b74781b
1 changed files with 4 additions and 4 deletions
|
@ -25,7 +25,7 @@ pub unsafe fn trace(tracer: *mut JSTracer) {
|
|||
|
||||
/// RAII struct that pushes and pops entries from the script settings stack.
|
||||
pub struct AutoEntryScript {
|
||||
global: *const GlobalScope,
|
||||
global: usize,
|
||||
}
|
||||
|
||||
impl AutoEntryScript {
|
||||
|
@ -38,7 +38,7 @@ impl AutoEntryScript {
|
|||
global: JS::from_ref(global),
|
||||
});
|
||||
AutoEntryScript {
|
||||
global: global as *const _,
|
||||
global: global as *const _ as usize,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -50,10 +50,10 @@ impl Drop for AutoEntryScript {
|
|||
STACK.with(|stack| {
|
||||
let mut stack = stack.borrow_mut();
|
||||
let entry = stack.pop().unwrap();
|
||||
assert_eq!(&*entry.global as *const GlobalScope,
|
||||
assert_eq!(&*entry.global as *const GlobalScope as usize,
|
||||
self.global,
|
||||
"Dropped AutoEntryScript out of order.");
|
||||
trace!("Clean up after running script with {:p}", self.global);
|
||||
trace!("Clean up after running script with {:p}", &*entry.global);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue