aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread/dom_wrapper.rs
diff options
context:
space:
mode:
authorAlan Jeffrey <ajeffrey@mozilla.com>2017-09-14 15:53:12 -0500
committerAlan Jeffrey <ajeffrey@mozilla.com>2017-09-22 09:04:18 -0500
commitfbfb9a80b4f23854c984c7039c8dc30a8eb583b1 (patch)
tree937b48c64482d7d188804844bd5b0dbd0f2ca7f0 /components/layout_thread/dom_wrapper.rs
parent6a791cd7f26b42a6688099bea203c21fb3c9cc12 (diff)
downloadservo-fbfb9a80b4f23854c984c7039c8dc30a8eb583b1.tar.gz
servo-fbfb9a80b4f23854c984c7039c8dc30a8eb583b1.zip
Remove sources of panic when laying out an iframe without a nested browsing context.
Diffstat (limited to 'components/layout_thread/dom_wrapper.rs')
-rw-r--r--components/layout_thread/dom_wrapper.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/layout_thread/dom_wrapper.rs b/components/layout_thread/dom_wrapper.rs
index a9596f099a2..af999c60efc 100644
--- a/components/layout_thread/dom_wrapper.rs
+++ b/components/layout_thread/dom_wrapper.rs
@@ -979,12 +979,14 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
this.svg_data()
}
- fn iframe_browsing_context_id(&self) -> BrowsingContextId {
+ // Can return None if the iframe has no nested browsing context
+ fn iframe_browsing_context_id(&self) -> Option<BrowsingContextId> {
let this = unsafe { self.get_jsmanaged() };
this.iframe_browsing_context_id()
}
- fn iframe_pipeline_id(&self) -> PipelineId {
+ // Can return None if the iframe has no nested browsing context
+ fn iframe_pipeline_id(&self) -> Option<PipelineId> {
let this = unsafe { self.get_jsmanaged() };
this.iframe_pipeline_id()
}