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

Unified Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 215773002: Don't call RenderObject::enclosingLayer on a null pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
Index: Source/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp
index fb14b239c7a793aaa14b2e3d25578b73a064dfdc..bca52a84bda83b20e2a3c48346c4d952c8b71a8d 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -394,7 +394,8 @@ static void makeLayerChildFrameMap(const LocalFrame* currentFrame, LayerFrameMap
map->clear();
const FrameTree& tree = currentFrame->tree();
for (const LocalFrame* child = tree.firstChild(); child; child = child->tree().nextSibling()) {
- if (const RenderLayer* containingLayer = child->ownerRenderer()->enclosingLayer()) {
+ if (const RenderObject* ownerRenderer = child->ownerRenderer()) {
esprehn 2014/03/27 23:54:28 Might be nicer to use a "continue" instead of nest
+ const RenderLayer* containingLayer = ownerRenderer->enclosingLayer();
LayerFrameMap::iterator iter = map->find(containingLayer);
if (iter == map->end())
map->add(containingLayer, Vector<const LocalFrame*>()).storedValue->value.append(child);

Powered by Google App Engine
This is Rietveld 408576698