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

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

Issue 2251343003: [DevTools] Generate separate copies of inspector_protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/InspectorDOMAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
index 2c18a1e162151baa57281b1be50c0f5d97295b95..fac72c0b6cd4ee68edb27e6cb2c94c84466fcbfc 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
@@ -64,6 +64,7 @@
#include "core/inspector/InspectedFrames.h"
#include "core/inspector/InspectorHighlight.h"
#include "core/inspector/InspectorHistory.h"
+#include "core/inspector/V8InspectorStringConversion.h"
#include "core/layout/HitTestResult.h"
#include "core/layout/api/LayoutViewItem.h"
#include "core/loader/DocumentLoader.h"
@@ -1165,9 +1166,12 @@ Node* InspectorDOMAgent::nodeForRemoteId(ErrorString* errorString, const String&
v8::HandleScope handles(m_isolate);
v8::Local<v8::Value> value;
v8::Local<v8::Context> context;
- String16 objectGroup;
- if (!m_v8Session->unwrapObject(errorString, objectId, &value, &context, &objectGroup))
+ v8_inspector::String16 objectGroup;
+ v8_inspector::String16 error;
+ if (!m_v8Session->unwrapObject(&error, toV8InspectorString(objectId), &value, &context, &objectGroup)) {
+ *errorString = toCoreString(error);
return nullptr;
+ }
if (!V8Node::hasInstance(value, m_isolate)) {
*errorString = "Object id doesn't reference a Node";
return nullptr;
@@ -1363,7 +1367,7 @@ void InspectorDOMAgent::getNodeForLocation(ErrorString* errorString, int x, int
*nodeId = pushNodePathToFrontend(node);
}
-void InspectorDOMAgent::resolveNode(ErrorString* errorString, int nodeId, const Maybe<String>& objectGroup, std::unique_ptr<protocol::Runtime::API::RemoteObject>* result)
+void InspectorDOMAgent::resolveNode(ErrorString* errorString, int nodeId, const Maybe<String>& objectGroup, std::unique_ptr<v8_inspector::protocol::Runtime::API::RemoteObject>* result)
{
String objectGroupName = objectGroup.fromMaybe("");
Node* node = nodeForId(nodeId);
@@ -2040,7 +2044,7 @@ void InspectorDOMAgent::getHighlightObjectForTest(ErrorString* errorString, int
*result = highlight.asProtocolValue();
}
-std::unique_ptr<protocol::Runtime::API::RemoteObject> InspectorDOMAgent::resolveNode(Node* node, const String& objectGroup)
+std::unique_ptr<v8_inspector::protocol::Runtime::API::RemoteObject> InspectorDOMAgent::resolveNode(Node* node, const String& objectGroup)
{
Document* document = node->isDocumentNode() ? &node->document() : node->ownerDocument();
LocalFrame* frame = document ? document->frame() : nullptr;
@@ -2052,7 +2056,7 @@ std::unique_ptr<protocol::Runtime::API::RemoteObject> InspectorDOMAgent::resolve
return nullptr;
ScriptState::Scope scope(scriptState);
- return m_v8Session->wrapObject(scriptState->context(), nodeV8Value(scriptState->context(), node), objectGroup);
+ return m_v8Session->wrapObject(scriptState->context(), nodeV8Value(scriptState->context(), node), toV8InspectorString(objectGroup));
}
bool InspectorDOMAgent::pushDocumentUponHandlelessOperation(ErrorString* errorString)

Powered by Google App Engine
This is Rietveld 408576698