Implements profiler for blocked recv

This commit is contained in:
Nakul Jindal 2018-02-26 09:07:08 -08:00
parent 563f0ec824
commit 7d4e2b11e9
27 changed files with 176 additions and 58 deletions

View file

@ -93,7 +93,7 @@ use fetch::FetchCanceller;
use html5ever::{LocalName, Namespace, QualName};
use hyper::header::{Header, SetCookie};
use hyper_serde::Serde;
use ipc_channel::ipc::{self, IpcSender};
use ipc_channel::ipc::IpcSender;
use js::jsapi::{JSContext, JSObject, JSRuntime};
use js::jsapi::JS_GetRuntime;
use metrics::{InteractiveFlag, InteractiveMetrics, InteractiveWindow, ProfilerMetadataFactory, ProgressiveWebMetric};
@ -106,6 +106,7 @@ use net_traits::pub_domains::is_pub_domain;
use net_traits::request::RequestInit;
use net_traits::response::HttpsState;
use num_traits::ToPrimitive;
use profile_traits::ipc;
use profile_traits::time::{TimerMetadata, TimerMetadataFrameType, TimerMetadataReflowType};
use ref_slice::ref_slice;
use script_layout_interface::message::{Msg, NodesFromPointQueryType, ReflowGoal};
@ -3448,7 +3449,7 @@ impl DocumentMethods for Document {
}
let url = self.url();
let (tx, rx) = ipc::channel().unwrap();
let (tx, rx) = ipc::channel(self.global().time_profiler_chan().clone()).unwrap();
let _ = self.window
.upcast::<GlobalScope>()
.resource_threads()