aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index 83e60a50549..2230f254320 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -1785,6 +1785,7 @@ impl ScriptThread {
self.mem_profiler_chan.clone(),
self.devtools_chan.clone(),
self.constellation_chan.clone(),
+ self.control_chan.clone(),
self.scheduler_chan.clone(),
ipc_timer_event_chan,
incomplete.layout_chan,
@@ -1840,6 +1841,9 @@ impl ScriptThread {
let ConstellationChan(ref chan) = self.constellation_chan;
chan.send(ConstellationMsg::ActivateDocument(incomplete.pipeline_id)).unwrap();
+ // Notify devtools that a new script global exists.
+ self.notify_devtools(document.Title(), final_url.clone(), (page.pipeline(), None));
+
let is_javascript = incomplete.url.scheme == "javascript";
let parse_input = if is_javascript {
use url::percent_encoding::percent_decode_to;
@@ -2199,15 +2203,10 @@ impl ScriptThread {
document.process_deferred_scripts();
window.set_fragment_name(final_url.fragment.clone());
-
- // Notify devtools that a new script global exists.
- //TODO: should this happen as soon as the global is created, or at least once the first
- // script runs?
- self.notify_devtools(document.Title(), (*final_url).clone(), (id, None));
}
fn handle_css_error_reporting(&self, pipeline_id: PipelineId, filename: String,
- line: u32, column: u32, msg: String) {
+ line: usize, column: usize, msg: String) {
let parent_page = self.root_page();
let page = match parent_page.find(pipeline_id) {
Some(page) => page,