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

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

Issue 2179683002: [DevTools] Cleanup v8_inspector API part 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: breakDetails Created 4 years, 5 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 | third_party/WebKit/Source/core/inspector/InspectorSession.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4e8b106b7dc3d97c5e311f628d9ff456b19926d5..7241c7d1a461c557a89f9d5d50c9a35d1f2458ca 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp
@@ -310,7 +310,7 @@ void InspectorDOMDebuggerAgent::didInvalidateStyleAttr(Node* node)
if (hasBreakpoint(node, AttributeModified)) {
std::unique_ptr<protocol::DictionaryValue> eventData = protocol::DictionaryValue::create();
descriptionForDOMEvent(node, AttributeModified, false, eventData.get());
- m_v8Session->breakProgram(protocol::Debugger::API::Paused::ReasonEnum::DOM, std::move(eventData));
+ m_v8Session->breakProgram(protocol::Debugger::API::Paused::ReasonEnum::DOM, eventData->toJSONString());
}
}
@@ -483,7 +483,7 @@ void InspectorDOMDebuggerAgent::willInsertDOMNode(Node* parent)
if (hasBreakpoint(parent, SubtreeModified)) {
std::unique_ptr<protocol::DictionaryValue> eventData = protocol::DictionaryValue::create();
descriptionForDOMEvent(parent, SubtreeModified, true, eventData.get());
- m_v8Session->breakProgram(protocol::Debugger::API::Paused::ReasonEnum::DOM, std::move(eventData));
+ m_v8Session->breakProgram(protocol::Debugger::API::Paused::ReasonEnum::DOM, eventData->toJSONString());
}
}
@@ -493,11 +493,11 @@ void InspectorDOMDebuggerAgent::willRemoveDOMNode(Node* node)
if (hasBreakpoint(node, NodeRemoved)) {
std::unique_ptr<protocol::DictionaryValue> eventData = protocol::DictionaryValue::create();
descriptionForDOMEvent(node, NodeRemoved, false, eventData.get());
- m_v8Session->breakProgram(protocol::Debugger::API::Paused::ReasonEnum::DOM, std::move(eventData));
+ m_v8Session->breakProgram(protocol::Debugger::API::Paused::ReasonEnum::DOM, eventData->toJSONString());
} else if (parentNode && hasBreakpoint(parentNode, SubtreeModified)) {
std::unique_ptr<protocol::DictionaryValue> eventData = protocol::DictionaryValue::create();
descriptionForDOMEvent(node, SubtreeModified, false, eventData.get());
- m_v8Session->breakProgram(protocol::Debugger::API::Paused::ReasonEnum::DOM, std::move(eventData));
+ m_v8Session->breakProgram(protocol::Debugger::API::Paused::ReasonEnum::DOM, eventData->toJSONString());
}
didRemoveDOMNode(node);
}
@@ -507,7 +507,7 @@ void InspectorDOMDebuggerAgent::willModifyDOMAttr(Element* element, const Atomic
if (hasBreakpoint(element, AttributeModified)) {
std::unique_ptr<protocol::DictionaryValue> eventData = protocol::DictionaryValue::create();
descriptionForDOMEvent(element, AttributeModified, false, eventData.get());
- m_v8Session->breakProgram(protocol::Debugger::API::Paused::ReasonEnum::DOM, std::move(eventData));
+ m_v8Session->breakProgram(protocol::Debugger::API::Paused::ReasonEnum::DOM, eventData->toJSONString());
}
}
@@ -575,9 +575,9 @@ void InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded(std::unique_ptr<proto
if (!eventData)
return;
if (synchronous)
- m_v8Session->breakProgram(protocol::Debugger::API::Paused::ReasonEnum::EventListener, std::move(eventData));
+ m_v8Session->breakProgram(protocol::Debugger::API::Paused::ReasonEnum::EventListener, eventData->toJSONString());
else
- m_v8Session->schedulePauseOnNextStatement(protocol::Debugger::API::Paused::ReasonEnum::EventListener, std::move(eventData));
+ m_v8Session->schedulePauseOnNextStatement(protocol::Debugger::API::Paused::ReasonEnum::EventListener, eventData->toJSONString());
}
std::unique_ptr<protocol::DictionaryValue> InspectorDOMDebuggerAgent::preparePauseOnNativeEventData(const String& eventName, const String* targetName)
@@ -679,7 +679,7 @@ void InspectorDOMDebuggerAgent::willSendXMLHttpOrFetchNetworkRequest(const Strin
std::unique_ptr<protocol::DictionaryValue> eventData = protocol::DictionaryValue::create();
eventData->setString("breakpointURL", breakpointURL);
eventData->setString("url", url);
- m_v8Session->breakProgram(protocol::Debugger::API::Paused::ReasonEnum::XHR, std::move(eventData));
+ m_v8Session->breakProgram(protocol::Debugger::API::Paused::ReasonEnum::XHR, eventData->toJSONString());
}
void InspectorDOMDebuggerAgent::didAddBreakpoint()
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/inspector/InspectorSession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698