mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Auto merge of #7006 - Wafflespeanut:script_cleanup, r=jdm
Splitting ScriptMsg into various enums... ... for #3734, which is also one of the oldest issues. (/cc @jdm) <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7006) <!-- Reviewable:end -->
This commit is contained in:
commit
6a52ec9484
18 changed files with 261 additions and 164 deletions
|
@ -15,7 +15,7 @@ use dom::document::DocumentHelpers;
|
|||
use dom::workerglobalscope::{WorkerGlobalScope, WorkerGlobalScopeHelpers};
|
||||
use dom::window::{self, WindowHelpers, ScriptHelpers};
|
||||
use devtools_traits::ScriptToDevtoolsControlMsg;
|
||||
use script_task::{ScriptChan, ScriptPort, ScriptMsg, ScriptTask};
|
||||
use script_task::{ScriptChan, ScriptPort, CommonScriptMsg, ScriptTask};
|
||||
|
||||
use msg::constellation_msg::{ConstellationChan, PipelineId, WorkerId};
|
||||
use net_traits::ResourceTask;
|
||||
|
@ -168,7 +168,7 @@ impl<'a> GlobalRef<'a> {
|
|||
|
||||
/// Process a single event as if it were the next event in the task queue for
|
||||
/// this global.
|
||||
pub fn process_event(&self, msg: ScriptMsg) {
|
||||
pub fn process_event(&self, msg: CommonScriptMsg) {
|
||||
match *self {
|
||||
GlobalRef::Window(_) => ScriptTask::process_event(msg),
|
||||
GlobalRef::Worker(ref worker) => worker.process_event(msg),
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
use dom::bindings::js::Root;
|
||||
use dom::bindings::utils::{Reflector, Reflectable};
|
||||
use dom::bindings::trace::trace_reflector;
|
||||
use script_task::{ScriptMsg, ScriptChan};
|
||||
use script_task::{ScriptChan, CommonScriptMsg};
|
||||
|
||||
use js::jsapi::{JSContext, JSTracer};
|
||||
|
||||
|
@ -130,7 +130,7 @@ impl<T: Reflectable> Drop for Trusted<T> {
|
|||
// It's possible this send will fail if the script task
|
||||
// has already exited. There's not much we can do at this
|
||||
// point though.
|
||||
let msg = ScriptMsg::RefcountCleanup(TrustedReference(self.ptr));
|
||||
let msg = CommonScriptMsg::RefcountCleanup(TrustedReference(self.ptr));
|
||||
let _ = self.script_chan.send(msg);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue