aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
authorGlenn Watson <gw@intuitionlibrary.com>2015-10-01 08:53:36 +1000
committerGlenn Watson <gw@intuitionlibrary.com>2015-10-06 17:06:53 +1000
commit5645dba1fa9180068eb0c59417448e7310de5299 (patch)
tree80aa70f5d99d8ff2bf1f8288fedc628cd92466af /components/script/script_task.rs
parent35888e5a1d48511ec54ddf8c58f1c7b0c47c5d3c (diff)
downloadservo-5645dba1fa9180068eb0c59417448e7310de5299.tar.gz
servo-5645dba1fa9180068eb0c59417448e7310de5299.zip
Make it possible for iframes to create their own pipeline ID.
This doesn't change any functionality, but it's the first step towards removing SubpageId. Adding this change now will allow us to gradually change over code referencing subpage id rather than in one massive PR. Introduces a namespace for pipeline ID generation - there is a namespace for the constellation thread, and one per script thread.
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index a935e4b91f5..ba4581cbdc1 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -66,6 +66,7 @@ use msg::compositor_msg::{LayerId, ScriptToCompositorMsg};
use msg::constellation_msg::Msg as ConstellationMsg;
use msg::constellation_msg::{ConstellationChan, FocusType, LoadData};
use msg::constellation_msg::{MozBrowserEvent, PipelineExitType, PipelineId};
+use msg::constellation_msg::{PipelineNamespace};
use msg::constellation_msg::{SubpageId, WindowSizeData, WorkerId};
use msg::webdriver_msg::WebDriverScriptCommand;
use net_traits::LoadData as NetLoadData;
@@ -468,6 +469,8 @@ impl ScriptTaskFactory for ScriptTask {
let layout_chan = LayoutChan(layout_chan.sender());
let failure_info = state.failure_info;
spawn_named_with_send_on_failure(format!("ScriptTask {:?}", state.id), task_state::SCRIPT, move || {
+ PipelineNamespace::install(state.pipeline_namespace_id);
+
let roots = RootCollection::new();
let _stack_roots_tls = StackRootTLS::new(&roots);
let chan = MainThreadScriptChan(script_chan);
@@ -490,7 +493,7 @@ impl ScriptTaskFactory for ScriptTask {
load_data.url.clone());
script_task.start_page_load(new_load, load_data);
- let reporter_name = format!("script-reporter-{}", id.0);
+ let reporter_name = format!("script-reporter-{}", id);
mem_profiler_chan.run_with_memory_reporting(|| {
script_task.start();
}, reporter_name, channel_for_reporter, CommonScriptMsg::CollectReports);