mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove mutex from Trusted
Use weak references rather than message passing to garbage-collect dead references.
This commit is contained in:
parent
d37d4d697a
commit
6a271b0527
5 changed files with 54 additions and 91 deletions
|
@ -12,7 +12,6 @@ use dom::bindings::codegen::Bindings::ServiceWorkerGlobalScopeBinding::ServiceWo
|
|||
use dom::bindings::global::{GlobalRef, global_root_from_context};
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::{Root, RootCollection};
|
||||
use dom::bindings::refcounted::LiveDOMReferences;
|
||||
use dom::bindings::reflector::Reflectable;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::eventtarget::EventTarget;
|
||||
|
@ -238,9 +237,6 @@ impl ServiceWorkerGlobalScope {
|
|||
CommonWorker(WorkerScriptMsg::Common(CommonScriptMsg::RunnableMsg(_, runnable))) => {
|
||||
runnable.handler()
|
||||
},
|
||||
CommonWorker(WorkerScriptMsg::Common(CommonScriptMsg::RefcountCleanup(addr))) => {
|
||||
LiveDOMReferences::cleanup(addr);
|
||||
},
|
||||
CommonWorker(WorkerScriptMsg::Common(CommonScriptMsg::CollectReports(reports_chan))) => {
|
||||
let scope = self.upcast::<WorkerGlobalScope>();
|
||||
let cx = scope.get_cx();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue