mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
Move unsafe to the wrap method for global objects (#38896)
The method now doesn't need unsafe in its signature because it no longer accepts unsafe pointers as arguments. We move the unsafe marker to the method itself. Testing: I opened the browser and went to google.com; I ran some WPT (IndexedDB) tests. Fixes: #38361 --------- Signed-off-by: criskell <96352451+criskell@users.noreply.github.com>
This commit is contained in:
parent
b9dc228e51
commit
9082217272
11 changed files with 41 additions and 75 deletions
|
@ -265,7 +265,6 @@ impl ServiceWorkerGlobalScope {
|
|||
control_receiver: Receiver<ServiceWorkerControlMsg>,
|
||||
closing: Arc<AtomicBool>,
|
||||
) -> DomRoot<ServiceWorkerGlobalScope> {
|
||||
let cx = runtime.cx();
|
||||
let scope = Box::new(ServiceWorkerGlobalScope::new_inherited(
|
||||
init,
|
||||
worker_url,
|
||||
|
@ -279,12 +278,7 @@ impl ServiceWorkerGlobalScope {
|
|||
control_receiver,
|
||||
closing,
|
||||
));
|
||||
unsafe {
|
||||
ServiceWorkerGlobalScopeBinding::Wrap::<crate::DomTypeHolder>(
|
||||
SafeJSContext::from_ptr(cx),
|
||||
scope,
|
||||
)
|
||||
}
|
||||
ServiceWorkerGlobalScopeBinding::Wrap::<crate::DomTypeHolder>(GlobalScope::get_cx(), scope)
|
||||
}
|
||||
|
||||
/// <https://w3c.github.io/ServiceWorker/#run-service-worker-algorithm>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue