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

@ -14,7 +14,6 @@ use dom::bindings::error::ErrorResult;
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::bindings::structuredclone::StructuredCloneData;
@ -298,9 +297,6 @@ impl DedicatedWorkerGlobalScope {
WorkerScriptMsg::Common(CommonScriptMsg::RunnableMsg(_, runnable)) => {
runnable.handler()
},
WorkerScriptMsg::Common(CommonScriptMsg::RefcountCleanup(addr)) => {
LiveDOMReferences::cleanup(addr);
},
WorkerScriptMsg::Common(CommonScriptMsg::CollectReports(reports_chan)) => {
let scope = self.upcast::<WorkerGlobalScope>();
let cx = scope.get_cx();