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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp

Issue 2623273006: Fix crash in CSS.getLayoutTreeAndStyles (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
index 7d71f1b9105d8de85a088945826cb2b7e214565c..a9cece0fac4142bcbf56fc0013e133c534711868 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
@@ -2369,10 +2369,12 @@ void InspectorCSSAgent::visitLayoutTreeNodes(
if (node->isFrameOwnerElement()) {
Document* contentDocument =
toHTMLFrameOwnerElement(node)->contentDocument();
- contentDocument->updateStyleAndLayoutTree();
- visitLayoutTreeNodes(contentDocument->documentElement(), layoutTreeNodes,
- cssPropertyWhitelist, styleToIndexMap,
- computedStyles);
+ if (contentDocument) {
+ contentDocument->updateStyleAndLayoutTree();
+ visitLayoutTreeNodes(contentDocument->documentElement(),
+ layoutTreeNodes, cssPropertyWhitelist,
+ styleToIndexMap, computedStyles);
+ }
}
LayoutObject* layoutObject = node->layoutObject();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698