Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: Source/core/rendering/RenderObject.cpp

Issue 215773002: Don't call RenderObject::enclosingLayer on a null pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index 22f2163d4574f6059c2da888d0f3fd37a377a01d..b0f243eb49648f81f1684d0e232728cd42c442e4 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -529,10 +529,9 @@ RenderLayer* RenderObject::enclosingLayer() const
if (current->hasLayer())
return toRenderLayerModelObject(current)->layer();
}
- // This line of code should be unreachable. However, if |this| is zero, we
- // can reach this line. Of course, it's undefined behavior to call a member
- // function on a zero pointer, but that doesn't stop
- // FrameView::paintContents. :)
+ // FIXME: We should remove the one caller that triggers this case and make
+ // this function return a reference.
+ ASSERT(!m_parent && !isRenderView());
return 0;
}
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698