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

Unified Diff: ash/common/devtools/ash_devtools_css_agent.cc

Issue 2524863004: Fix bug where CSS styles are requested after node is destroyed (Closed)
Patch Set: Created 4 years, 1 month 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: ash/common/devtools/ash_devtools_css_agent.cc
diff --git a/ash/common/devtools/ash_devtools_css_agent.cc b/ash/common/devtools/ash_devtools_css_agent.cc
index 295b53a3b35307921173814b2b0cca68196a8fe4..a23405c9918e4b7d693716114fae8b99dd750198 100644
--- a/ash/common/devtools/ash_devtools_css_agent.cc
+++ b/ash/common/devtools/ash_devtools_css_agent.cc
@@ -68,6 +68,9 @@ ui::devtools::protocol::Response AshDevToolsCSSAgent::getMatchedStylesForNode(
ui::devtools::protocol::Maybe<ui::devtools::protocol::CSS::CSSStyle>*
inlineStyle) {
*inlineStyle = GetStylesForNode(nodeId);
+ if (!inlineStyle)
+ return ui::devtools::protocol::Response::Error(
+ "Node with that id not found");
sadrul 2016/11/25 18:30:32 Add {}
Sarmad Hashmi 2016/11/26 01:48:20 Done.
return ui::devtools::protocol::Response::OK();
}
@@ -85,7 +88,6 @@ AshDevToolsCSSAgent::GetStylesForNode(int nodeId) {
if (view)
return BuildStyles(view);
- NOTREACHED();
return nullptr;
}
« 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