diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-03-22 16:38:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-22 16:38:32 -0400 |
commit | f467bdce1ba95e950b01f59ba284873137bca5d5 (patch) | |
tree | 34a249c2341216233d407c1e9c7a568698ccf5d5 /components/script/dom/history.rs | |
parent | c20d0c00d711cda61ad1b35f15f2fb563c042c5e (diff) | |
parent | 7d4e2b11e940545eaa74877b75908e1e02f6eeb5 (diff) | |
download | servo-f467bdce1ba95e950b01f59ba284873137bca5d5.tar.gz servo-f467bdce1ba95e950b01f59ba284873137bca5d5.zip |
Auto merge of #20132 - nakul02:issue_19223, r=jdm
Profiler for blocked IpcReceiver::recv()
<!-- Please describe your changes on the following line: -->
Implements feature #19223
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19223 (github issue number if applicable).
<!-- Either: -->
- [x] There are tests for these changes
<!-- 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. -->
WIP.
@jdm - this is the new profiler : "Blocked at IPC Receive"
Should I dig through all the calls to `ipc::channel` and replace them with this profiled `IpcReceiver`?

<!-- 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/20132)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/history.rs')
-rw-r--r-- | components/script/dom/history.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/dom/history.rs b/components/script/dom/history.rs index 17ee0d29cb6..d70c58963b5 100644 --- a/components/script/dom/history.rs +++ b/components/script/dom/history.rs @@ -8,17 +8,17 @@ use dom::bindings::codegen::Bindings::LocationBinding::LocationBinding::Location use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use dom::bindings::error::{Error, ErrorResult, Fallible}; use dom::bindings::inheritance::Castable; -use dom::bindings::reflector::{Reflector, reflect_dom_object}; +use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object}; use dom::bindings::root::{Dom, DomRoot}; use dom::bindings::str::{DOMString, USVString}; use dom::bindings::structuredclone::StructuredCloneData; use dom::globalscope::GlobalScope; use dom::window::Window; use dom_struct::dom_struct; -use ipc_channel::ipc; use js::jsapi::{HandleValue, Heap, JSContext}; use js::jsval::{JSVal, NullValue, UndefinedValue}; use msg::constellation_msg::TraversalDirection; +use profile_traits::ipc::channel; use script_traits::ScriptMsg; enum PushOrReplace { @@ -128,7 +128,8 @@ impl HistoryMethods for History { if !self.window.Document().is_fully_active() { return Err(Error::Security); } - let (sender, recv) = ipc::channel().expect("Failed to create channel to send jsh length."); + let (sender, recv) = + channel(self.global().time_profiler_chan().clone()).expect("Failed to create channel to send jsh length."); let msg = ScriptMsg::JointSessionHistoryLength(sender); let _ = self.window.upcast::<GlobalScope>().script_to_constellation_chan().send(msg); Ok(recv.recv().unwrap()) |