Wrap(Global)Method now takes a SafeJSContext instead of a JSContext

as first argument.
This commit is contained in:
marmeladema 2019-07-20 17:30:10 +01:00
parent cd0eb88a3e
commit 35dc5320ab
10 changed files with 55 additions and 37 deletions

View file

@ -10,6 +10,7 @@ use crate::dom::bindings::str::DOMString;
use crate::dom::worklet::WorkletExecutor;
use crate::dom::workletglobalscope::WorkletGlobalScope;
use crate::dom::workletglobalscope::WorkletGlobalScopeInit;
use crate::script_runtime::JSContext;
use crossbeam_channel::Sender;
use dom_struct::dom_struct;
use js::rust::Runtime;
@ -49,7 +50,7 @@ impl TestWorkletGlobalScope {
),
lookup_table: Default::default(),
});
unsafe { TestWorkletGlobalScopeBinding::Wrap(runtime.cx(), global) }
unsafe { TestWorkletGlobalScopeBinding::Wrap(JSContext::from_ptr(runtime.cx()), global) }
}
pub fn perform_a_worklet_task(&self, task: TestWorkletTask) {