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

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

Issue 2882193002: [devtools] Add DOMSnapshot domain for dom+layout+style snapshots. (Closed)
Patch Set: add domain to schema agent Created 3 years, 7 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: 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 e1fea63aac13cc0c1b89c0460a58943a5a043df8..65d51d3846818bc299d5e0f4dfbf6b4bad07e8ca 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
@@ -2308,7 +2308,11 @@ Response InspectorCSSAgent::getLayoutTreeAndStyles(
layout_tree_nodes,
std::unique_ptr<protocol::Array<protocol::CSS::ComputedStyle>>*
computed_styles) {
- dom_agent_->GetDocument()->UpdateStyleAndLayoutTree();
+ Document* document = dom_agent_->GetDocument();
+ if (!document)
+ return Response::Error("Document is not available");
+
+ document->UpdateStyleAndLayoutTree();
// Look up the CSSPropertyIDs for each entry in |styleWhitelist|.
Vector<std::pair<String, CSSPropertyID>> css_property_whitelist;

Powered by Google App Engine
This is Rietveld 408576698