diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index 51d22e1129c..07ace83d561 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -903,7 +903,6 @@ impl Constellation self.handle_init_load(url); } // Handle a forward or back request - // Handle a forward or back request FromCompositorMsg::TraverseHistory(top_level_browsing_context_id, direction) => { debug!("constellation got traverse history message from compositor"); self.handle_traverse_history_msg(top_level_browsing_context_id, direction); @@ -2800,7 +2799,7 @@ impl Constellation let top_level_browsing_context_id = self.browsing_contexts.get(&pipeline.browsing_context_id) .map(|browsing_context| browsing_context.top_level_id) .unwrap_or(self.root_browsing_context_id); - let url = pipeline.url.clone(); + let url = pipeline.url.to_string(); let can_go_forward = !self.joint_session_future_is_empty(top_level_browsing_context_id); let can_go_back = !self.joint_session_past_is_empty(top_level_browsing_context_id); let event = MozBrowserEvent::LocationChange(url, can_go_back, can_go_forward); diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 3621bf3f4f9..23feab87329 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -498,7 +498,7 @@ unsafe fn build_mozbrowser_event_detail(event: MozBrowserEvent, } MozBrowserEvent::LocationChange(url, can_go_back, can_go_forward) => { BrowserElementLocationChangeEventDetail { - url: Some(DOMString::from(url.as_str())), + url: Some(DOMString::from(url)), canGoBack: Some(can_go_back), canGoForward: Some(can_go_forward), }.to_jsval(cx, rval); diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index c5e62b6ee81..51725abc3b8 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -602,7 +602,7 @@ pub enum MozBrowserEvent { /// Sent when the browser `