diff options
author | Rahul Sharma <rsconceptx@gmail.com> | 2016-08-24 23:22:02 +0530 |
---|---|---|
committer | Rahul Sharma <rsconceptx@gmail.com> | 2016-09-07 12:07:36 +0530 |
commit | 9dcb7348a2c69be69ae8284d56715177713091d2 (patch) | |
tree | 7890823d9280440d7db7b762905a9b060a0a7f93 /components/script/script_thread.rs | |
parent | 0996b38ade7e2fe368ad7bd21ba8cf9a48d8f866 (diff) | |
download | servo-9dcb7348a2c69be69ae8284d56715177713091d2.tar.gz servo-9dcb7348a2c69be69ae8284d56715177713091d2.zip |
store senders instead of buffering messages
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index fb5abc005d8..1edeaa7bdf7 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -42,7 +42,7 @@ use dom::element::Element; use dom::event::{Event, EventBubbles, EventCancelable}; use dom::htmlanchorelement::HTMLAnchorElement; use dom::node::{Node, NodeDamage, window_from_node}; -use dom::serviceworker::{TrustedServiceWorkerAddress, ServiceWorker}; +use dom::serviceworker::TrustedServiceWorkerAddress; use dom::serviceworkerregistration::ServiceWorkerRegistration; use dom::servohtmlparser::ParserContext; use dom::uievent::UIEvent; @@ -84,7 +84,7 @@ use script_traits::CompositorEvent::{TouchEvent, TouchpadPressureEvent}; use script_traits::webdriver_msg::WebDriverScriptCommand; use script_traits::{CompositorEvent, ConstellationControlMsg, EventResult}; use script_traits::{InitialScriptState, MouseButton, MouseEventType, MozBrowserEvent}; -use script_traits::{NewLayoutInfo, ScriptMsg as ConstellationMsg, DOMMessage}; +use script_traits::{NewLayoutInfo, ScriptMsg as ConstellationMsg}; use script_traits::{ScriptThreadFactory, TimerEvent, TimerEventRequest, TimerSource}; use script_traits::{TouchEventType, TouchId, UntrustedNodeAddress, WindowSizeData}; use std::borrow::ToOwned; @@ -924,8 +924,6 @@ impl ScriptThread { self.handle_css_error_reporting(pipeline_id, filename, line, column, msg), ConstellationControlMsg::Reload(pipeline_id) => self.handle_reload(pipeline_id), - ConstellationControlMsg::ConnectServiceWorker(scope_url, chan) => - self.connect_serviceworker_to_scope(scope_url, chan), msg @ ConstellationControlMsg::AttachLayout(..) | msg @ ConstellationControlMsg::Viewport(..) | msg @ ConstellationControlMsg::SetScrollState(..) | @@ -1462,15 +1460,6 @@ impl ScriptThread { } } - // Set the sender to the corresponding scope of the service worker object. - fn connect_serviceworker_to_scope(&self, scope_url: Url, chan: IpcSender<DOMMessage>) { - let ref maybe_registration_ref = *self.registration_map.borrow(); - if let Some(ref registration) = maybe_registration_ref.get(&scope_url) { - let trusted_worker = registration.get_trusted_worker(); - ServiceWorker::store_sender(trusted_worker, chan); - } - } - /// Handles a request for the window title. fn handle_get_title_msg(&self, pipeline_id: PipelineId) { let document = match self.root_browsing_context().find(pipeline_id) { |