Remove mutex from Trusted

Use weak references rather than message passing to
garbage-collect dead references.
This commit is contained in:
Alan Jeffrey 2016-08-16 19:02:57 -05:00 committed by Anthony Ramine
parent d37d4d697a
commit 6a271b0527
5 changed files with 54 additions and 91 deletions

View file

@ -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();