Time distribution across script event categories.

This commit is contained in:
benshu 2015-08-23 21:02:40 +02:00
parent 71b277d567
commit 1e6a2f08fc
11 changed files with 184 additions and 50 deletions

View file

@ -32,6 +32,7 @@ use dom::window::ScriptHelpers;
use js::jsapi::RootedValue;
use js::jsval::UndefinedValue;
use network_listener::{NetworkListener, PreInvoke};
use script_task::ScriptTaskEventCategory::ScriptEvent;
use script_task::{ScriptChan, Runnable, CommonScriptMsg};
use encoding::all::UTF_8;
@ -426,7 +427,7 @@ impl HTMLScriptElement {
element: handler,
is_error: false,
};
chan.send(CommonScriptMsg::RunnableMsg(dispatcher)).unwrap();
chan.send(CommonScriptMsg::RunnableMsg(ScriptEvent, dispatcher)).unwrap();
}
}
@ -439,7 +440,7 @@ impl HTMLScriptElement {
element: handler,
is_error: true,
};
chan.send(CommonScriptMsg::RunnableMsg(dispatcher)).unwrap();
chan.send(CommonScriptMsg::RunnableMsg(ScriptEvent, dispatcher)).unwrap();
}
pub fn dispatch_before_script_execute_event(&self) -> bool {