diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-04-29 06:33:34 -0700 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-04-29 06:33:34 -0700 |
commit | 9770e3c1e37a29c4b01ebfc243db2c7be58ec006 (patch) | |
tree | 674b1c2ccf97b1913fe05f0d679c91a13e921355 /components/script/dom/htmliframeelement.rs | |
parent | 26be403e3c8351af638cce3a2a1ed4d3be8022df (diff) | |
parent | 897be5f6eefeaf0620460215b340e8a5b2c0fc95 (diff) | |
download | servo-9770e3c1e37a29c4b01ebfc243db2c7be58ec006.tar.gz servo-9770e3c1e37a29c4b01ebfc243db2c7be58ec006.zip |
Auto merge of #10918 - Ms2ger:clones, r=SimonSapin
Avoid some clones.
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10918)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r-- | components/script/dom/htmliframeelement.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index ad172fabb99..0ccf72ef66a 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -124,7 +124,7 @@ impl HTMLIFrameElement { let new_pipeline_id = self.pipeline_id.get().unwrap(); let private_iframe = self.privatebrowsing(); - let ConstellationChan(ref chan) = window.constellation_chan(); + let ConstellationChan(ref chan) = *window.constellation_chan(); let load_info = IFrameLoadInfo { url: url, containing_pipeline_id: window.pipeline(), @@ -144,7 +144,7 @@ impl HTMLIFrameElement { pub fn process_the_iframe_attributes(&self) { let url = match self.get_url() { - Some(url) => url.clone(), + Some(url) => url, None => Url::parse("about:blank").unwrap(), }; @@ -371,7 +371,7 @@ pub fn Navigate(iframe: &HTMLIFrameElement, direction: NavigationDirection) -> E let pipeline_info = Some((window.pipeline(), iframe.subpage_id().unwrap())); - let ConstellationChan(ref chan) = window.constellation_chan(); + let ConstellationChan(ref chan) = *window.constellation_chan(); let msg = ConstellationMsg::Navigate(pipeline_info, direction); chan.send(msg).unwrap(); } @@ -575,7 +575,7 @@ impl VirtualMethods for HTMLIFrameElement { // // Since most of this cleanup doesn't happen on same-origin // iframes, and since that would cause a deadlock, don't do it. - let ConstellationChan(ref chan) = window.constellation_chan(); + let ConstellationChan(ref chan) = *window.constellation_chan(); let same_origin = if let Some(self_url) = self.get_url() { let win_url = window_from_node(self).get_url(); UrlHelper::SameOrigin(&self_url, &win_url) |