mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
Wrap(Global)Method now takes a SafeJSContext instead of a JSContext
as first argument.
This commit is contained in:
parent
cd0eb88a3e
commit
35dc5320ab
10 changed files with 55 additions and 37 deletions
|
@ -21,7 +21,9 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::worker::TrustedWorkerAddress;
|
||||
use crate::dom::workerglobalscope::WorkerGlobalScope;
|
||||
use crate::fetch::load_whole_resource;
|
||||
use crate::script_runtime::{new_rt_and_cx, CommonScriptMsg, Runtime, ScriptChan};
|
||||
use crate::script_runtime::{
|
||||
new_rt_and_cx, CommonScriptMsg, JSContext as SafeJSContext, Runtime, ScriptChan,
|
||||
};
|
||||
use crate::task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
|
||||
use crate::task_source::TaskSourceName;
|
||||
use crossbeam_channel::{unbounded, Receiver, Sender};
|
||||
|
@ -246,7 +248,7 @@ impl ServiceWorkerGlobalScope {
|
|||
swmanager_sender,
|
||||
scope_url,
|
||||
));
|
||||
unsafe { ServiceWorkerGlobalScopeBinding::Wrap(cx, scope) }
|
||||
unsafe { ServiceWorkerGlobalScopeBinding::Wrap(SafeJSContext::from_ptr(cx), scope) }
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue