mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -337,7 +337,7 @@ impl ServiceWorkerGlobalScope {
|
|||
|
||||
unsafe {
|
||||
// Handle interrupt requests
|
||||
JS_AddInterruptCallback(scope.get_cx(), Some(interrupt_callback));
|
||||
JS_AddInterruptCallback(*scope.get_cx(), Some(interrupt_callback));
|
||||
}
|
||||
|
||||
scope.execute_script(DOMString::from(source));
|
||||
|
@ -413,7 +413,7 @@ impl ServiceWorkerGlobalScope {
|
|||
let scope = self.upcast::<WorkerGlobalScope>();
|
||||
let target = self.upcast();
|
||||
let _ac = enter_realm(&*scope);
|
||||
rooted!(in(scope.get_cx()) let mut message = UndefinedValue());
|
||||
rooted!(in(*scope.get_cx()) let mut message = UndefinedValue());
|
||||
data.read(scope.upcast(), message.handle_mut());
|
||||
ExtendableMessageEvent::dispatch_jsval(target, scope.upcast(), message.handle());
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue