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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp

Issue 2192093004: [DevTools] Rename findObject to unwrapObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp
index b2233e802afd879822710e442c5f9f8717c7409e..4e8e159c64d09ffa9e1615118151bda3ec6ae283 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp
@@ -193,23 +193,19 @@ void V8InspectorSessionImpl::releaseObjectGroup(const String16& objectGroup)
}
}
-v8::Local<v8::Value> V8InspectorSessionImpl::findObject(ErrorString* errorString, const String16& objectId, v8::Local<v8::Context>* context, String16* groupName)
+bool V8InspectorSessionImpl::unwrapObject(ErrorString* errorString, const String16& objectId, v8::Local<v8::Value>* object, v8::Local<v8::Context>* context, String16* objectGroup)
{
std::unique_ptr<RemoteObjectId> remoteId = RemoteObjectId::parse(errorString, objectId);
if (!remoteId)
- return v8::Local<v8::Value>();
+ return false;
InjectedScript* injectedScript = findInjectedScript(errorString, remoteId.get());
if (!injectedScript)
- return v8::Local<v8::Value>();
- v8::Local<v8::Value> objectValue;
- injectedScript->findObject(errorString, *remoteId, &objectValue);
- if (objectValue.IsEmpty())
- return v8::Local<v8::Value>();
- if (context)
- *context = injectedScript->context()->context();
- if (groupName)
- *groupName = injectedScript->objectGroupName(*remoteId);
- return objectValue;
+ return false;
+ if (!injectedScript->findObject(errorString, *remoteId, object))
+ return false;
+ *context = injectedScript->context()->context();
+ *objectGroup = injectedScript->objectGroupName(*remoteId);
+ return true;
}
std::unique_ptr<protocol::Runtime::API::RemoteObject> V8InspectorSessionImpl::wrapObject(v8::Local<v8::Context> context, v8::Local<v8::Value> value, const String16& groupName)

Powered by Google App Engine
This is Rietveld 408576698