aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/workerglobalscope.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-10-25 15:53:57 -0500
committerGitHub <noreply@github.com>2017-10-25 15:53:57 -0500
commite438b094f675469b8bdbb1ab4ff84c374fc399d4 (patch)
treeac770703c621ba261b264d6f079f669c6537af4c /components/script/dom/workerglobalscope.rs
parentce890be0b958dd4623defd789c19e02f4da6ea1d (diff)
parent52b63def44b4819184d2badcc4d123b770a7878a (diff)
downloadservo-e438b094f675469b8bdbb1ab4ff84c374fc399d4.tar.gz
servo-e438b094f675469b8bdbb1ab4ff84c374fc399d4.zip
Auto merge of #18670 - avadacatavra:interactive-metrics, r=jdm
added time to interactive metrics <!-- Please describe your changes on the following line: --> Added time to interactive metrics and refactored metrics/lib I need to write tests, but wanted to submit the PR for review --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18670) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/workerglobalscope.rs')
-rw-r--r--components/script/dom/workerglobalscope.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/components/script/dom/workerglobalscope.rs b/components/script/dom/workerglobalscope.rs
index 0dfc2a83196..039cbd235dd 100644
--- a/components/script/dom/workerglobalscope.rs
+++ b/components/script/dom/workerglobalscope.rs
@@ -29,6 +29,7 @@ use ipc_channel::ipc::IpcSender;
use js::jsapi::{HandleValue, JSAutoCompartment, JSContext, JSRuntime};
use js::jsval::UndefinedValue;
use js::panic::maybe_resume_unwind;
+use msg::constellation_msg::PipelineId;
use net_traits::{IpcSend, load_whole_resource};
use net_traits::request::{CredentialsMode, Destination, RequestInit as NetRequestInit};
use script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort, get_reports, Runtime};
@@ -165,6 +166,10 @@ impl WorkerGlobalScope {
cancelled: self.closing.clone(),
}
}
+
+ pub fn pipeline_id(&self) -> PipelineId {
+ self.globalscope.pipeline_id()
+ }
}
impl WorkerGlobalScopeMethods for WorkerGlobalScope {
@@ -363,15 +368,15 @@ impl WorkerGlobalScope {
}
pub fn file_reading_task_source(&self) -> FileReadingTaskSource {
- FileReadingTaskSource(self.script_chan())
+ FileReadingTaskSource(self.script_chan(), self.pipeline_id())
}
pub fn networking_task_source(&self) -> NetworkingTaskSource {
- NetworkingTaskSource(self.script_chan())
+ NetworkingTaskSource(self.script_chan(), self.pipeline_id())
}
pub fn performance_timeline_task_source(&self) -> PerformanceTimelineTaskSource {
- PerformanceTimelineTaskSource(self.script_chan())
+ PerformanceTimelineTaskSource(self.script_chan(), self.pipeline_id())
}
pub fn new_script_pair(&self) -> (Box<ScriptChan + Send>, Box<ScriptPort + Send>) {
@@ -385,7 +390,7 @@ impl WorkerGlobalScope {
pub fn process_event(&self, msg: CommonScriptMsg) {
match msg {
- CommonScriptMsg::Task(_, task) => {
+ CommonScriptMsg::Task(_, task, _) => {
task.run_box()
},
CommonScriptMsg::CollectReports(reports_chan) => {