mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Make GlobalScope.get_cx a static method.
This commit is contained in:
parent
4998c65c42
commit
f79e1e327d
39 changed files with 132 additions and 127 deletions
|
@ -169,7 +169,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(*GlobalScope::get_cx()) let mut message = UndefinedValue());
|
||||
if let Ok(ports) = structuredclone::read(&global, data, message.handle_mut()) {
|
||||
MessageEvent::dispatch_jsval(target, &global, message.handle(), None, None, ports);
|
||||
} else {
|
||||
|
@ -247,7 +247,7 @@ impl WorkerMethods for Worker {
|
|||
self.terminated.set(true);
|
||||
|
||||
// Step 3
|
||||
let cx = self.global().get_cx();
|
||||
let cx = GlobalScope::get_cx();
|
||||
unsafe { JS_RequestInterruptCallback(*cx) };
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue