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

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

Issue 1823883002: [DevTools] Removed InjectedScriptHost.eval and InjectedScriptHost.objectForId (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-get-collection-entries
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/V8RuntimeAgentImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
index c743b7cbe827ff43d233dd5696771636d48f168d..c12661dd66750b9362e184ad993de9af9ec205cc 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
@@ -239,18 +239,21 @@ void V8RuntimeAgentImpl::getProperties(
v8::HandleScope handles(injectedScript->isolate());
v8::Context::Scope scope(injectedScript->context());
- v8::Local<v8::Value> object;
- if (!injectedScript->findObject(errorString, *remoteId, &object))
+ v8::Local<v8::Value> objectValue;
+ if (!injectedScript->findObject(errorString, *remoteId, &objectValue))
return;
- String16 objectGroupName = injectedScript->objectGroupName(*remoteId);
+ if (!objectValue->IsObject()) {
+ *errorString = "Value with given id is not an object";
+ return;
+ }
- injectedScript->getProperties(errorString, objectId, ownProperties.fromMaybe(false), accessorPropertiesOnly.fromMaybe(false), generatePreview.fromMaybe(false), result, exceptionDetails);
+ v8::Local<v8::Object> object = objectValue.As<v8::Object>();
+ String16 objectGroupName = injectedScript->objectGroupName(*remoteId);
+ injectedScript->getProperties(errorString, object, objectGroupName, ownProperties.fromMaybe(false), accessorPropertiesOnly.fromMaybe(false), generatePreview.fromMaybe(false), result, exceptionDetails);
if (!errorString->isEmpty() || exceptionDetails->isJust() || accessorPropertiesOnly.fromMaybe(false))
return;
- if (object->IsSymbol())
- return;
v8::Local<v8::Array> propertiesArray;
- if (hasInternalError(errorString, !v8::Debug::GetInternalProperties(injectedScript->isolate(), object).ToLocal(&propertiesArray)))
+ if (hasInternalError(errorString, !v8::Debug::GetInternalProperties(injectedScript->isolate(), objectValue).ToLocal(&propertiesArray)))
return;
OwnPtr<protocol::Array<InternalPropertyDescriptor>> propertiesProtocolArray = protocol::Array<InternalPropertyDescriptor>::create();
for (uint32_t i = 0; i < propertiesArray->Length(); i += 2) {

Powered by Google App Engine
This is Rietveld 408576698