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

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: 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/frame/FrameView.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ba8cca0f7d5d8ef99e1b655de4918b0e15d4b823 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -394,13 +394,15 @@ 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()) {
- LayerFrameMap::iterator iter = map->find(containingLayer);
- if (iter == map->end())
- map->add(containingLayer, Vector<const LocalFrame*>()).storedValue->value.append(child);
- else
- iter->value.append(child);
- }
+ const RenderObject* ownerRenderer = child->ownerRenderer();
+ if (!ownerRenderer)
+ continue;
+ 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);
+ else
+ iter->value.append(child);
}
}
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698