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

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

Issue 2468803002: [DevTools] migrate InspectorDOMAgent to new style (Closed)
Patch Set: addressed comments and rebased 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
Index: third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp
index 87c413b318d12fb2d0eea1ff545f99518ee25672..67d508354c9010eda92d708fca1539850db5601f 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp
@@ -417,9 +417,12 @@ static String domTypeName(int type) {
void InspectorDOMDebuggerAgent::setDOMBreakpoint(ErrorString* errorString,
int nodeId,
const String& typeString) {
- Node* node = m_domAgent->assertNode(errorString, nodeId);
- if (!node)
+ Node* node = nullptr;
+ Response response = m_domAgent->assertNode(nodeId, node);
+ if (!response.isSuccess()) {
+ *errorString = response.errorMessage();
return;
+ }
int type = domTypeForName(errorString, typeString);
if (type == -1)
@@ -438,9 +441,12 @@ void InspectorDOMDebuggerAgent::setDOMBreakpoint(ErrorString* errorString,
void InspectorDOMDebuggerAgent::removeDOMBreakpoint(ErrorString* errorString,
int nodeId,
const String& typeString) {
- Node* node = m_domAgent->assertNode(errorString, nodeId);
- if (!node)
+ Node* node = nullptr;
+ Response response = m_domAgent->assertNode(nodeId, node);
+ if (!response.isSuccess()) {
+ *errorString = response.errorMessage();
return;
+ }
int type = domTypeForName(errorString, typeString);
if (type == -1)
return;

Powered by Google App Engine
This is Rietveld 408576698