mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Modify *::get_cx methods to return a safe JSContext instead of a raw one
This commit is contained in:
parent
2c5d0a6ebc
commit
88cacfb009
43 changed files with 306 additions and 321 deletions
|
@ -147,7 +147,7 @@ impl Worker {
|
|||
let global = worker.global();
|
||||
let target = worker.upcast();
|
||||
let _ac = enter_realm(target);
|
||||
rooted!(in(global.get_cx()) let mut message = UndefinedValue());
|
||||
rooted!(in(*global.get_cx()) let mut message = UndefinedValue());
|
||||
data.read(&global, message.handle_mut());
|
||||
MessageEvent::dispatch_jsval(target, &global, message.handle(), None, None);
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ impl WorkerMethods for Worker {
|
|||
|
||||
// Step 3
|
||||
let cx = self.global().get_cx();
|
||||
unsafe { JS_RequestInterruptCallback(cx) };
|
||||
unsafe { JS_RequestInterruptCallback(*cx) };
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#handler-worker-onmessage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue