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

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

Issue 1810283003: [DevTools] Move getCollectionEntries to native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-get-function-details
Patch Set: Created 4 years, 9 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/InjectedScript.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
index 7e532896bbc3db686b4525ffc9a10d644fd22e24..93ad7f030d5451843de1c301a374e9ad7c266670 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
@@ -76,16 +76,6 @@ InjectedScript::~InjectedScript()
{
}
-void InjectedScript::getCollectionEntries(ErrorString* errorString, const String16& objectId, OwnPtr<Array<CollectionEntry>>* result)
-{
- v8::HandleScope handles(m_isolate);
- V8FunctionCall function(m_manager->debugger(), context(), v8Value(), "getCollectionEntries");
- function.appendArgument(objectId);
- OwnPtr<protocol::Value> resultValue = makeCall(function);
- protocol::ErrorSupport errors(errorString);
- *result = Array<CollectionEntry>::parse(resultValue.get(), &errors);
-}
-
void InjectedScript::getProperties(ErrorString* errorString, const String16& objectId, bool ownProperties, bool accessorPropertiesOnly, bool generatePreview, OwnPtr<Array<PropertyDescriptor>>* properties, Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails)
{
v8::HandleScope handles(m_isolate);
@@ -166,6 +156,22 @@ bool InjectedScript::wrapObjectProperty(ErrorString* error, v8::Local<v8::Object
return true;
}
+bool InjectedScript::wrapPropertyInArray(ErrorString* errorString, v8::Local<v8::Array> array, v8::Local<v8::String> property, const String16& groupName, bool forceValueType, bool generatePreview) const
+{
+ V8FunctionCall function(m_manager->debugger(), context(), v8Value(), "wrapPropertyInArray");
+ function.appendArgument(array);
+ function.appendArgument(property);
+ function.appendArgument(groupName);
+ function.appendArgument(canAccessInspectedWindow());
+ function.appendArgument(forceValueType);
+ function.appendArgument(generatePreview);
+ bool hadException = false;
+ callFunctionWithEvalEnabled(function, hadException);
+ if (hadException)
+ *errorString = "Internal error.";
+ return !hadException;
+}
+
v8::MaybeLocal<v8::Value> InjectedScript::wrapValue(ErrorString* error, v8::Local<v8::Value> value, const String16& groupName, bool forceValueType, bool generatePreview) const
{
V8FunctionCall function(m_manager->debugger(), context(), v8Value(), "wrapObject");

Powered by Google App Engine
This is Rietveld 408576698