Index: third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp |
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp |
index e7f9bed382349bc0b32e6472c52243f76e168f2c..c2251d0d22ca10f3243cc3fc7eb19e4cabb6867a 100644 |
--- a/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp |
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp |
@@ -46,7 +46,6 @@ v8::Local<v8::Object> V8InjectedScriptHost::create(v8::Local<v8::Context> contex |
setFunctionProperty(context, injectedScriptHost, "formatAccessorsAsProperties", V8InjectedScriptHost::formatAccessorsAsProperties, debuggerExternal); |
setFunctionProperty(context, injectedScriptHost, "isTypedArray", V8InjectedScriptHost::isTypedArrayCallback, debuggerExternal); |
setFunctionProperty(context, injectedScriptHost, "subtype", V8InjectedScriptHost::subtypeCallback, debuggerExternal); |
- setFunctionProperty(context, injectedScriptHost, "collectionEntries", V8InjectedScriptHost::collectionEntriesCallback, debuggerExternal); |
setFunctionProperty(context, injectedScriptHost, "getInternalProperties", V8InjectedScriptHost::getInternalPropertiesCallback, debuggerExternal); |
setFunctionProperty(context, injectedScriptHost, "suppressWarningsAndCallFunction", V8InjectedScriptHost::suppressWarningsAndCallFunctionCallback, debuggerExternal); |
setFunctionProperty(context, injectedScriptHost, "bind", V8InjectedScriptHost::bindCallback, debuggerExternal); |
@@ -55,6 +54,11 @@ v8::Local<v8::Object> V8InjectedScriptHost::create(v8::Local<v8::Context> contex |
return injectedScriptHost; |
} |
+v8::Local<v8::Private> V8InjectedScriptHost::internalEntryPrivate(v8::Isolate* isolate) |
+{ |
+ return v8::Private::ForApi(isolate, toV8StringInternalized(isolate, "V8InjectedScriptHost#internalEntry")); |
+} |
+ |
void V8InjectedScriptHost::internalConstructorNameCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
if (info.Length() < 1 || !info[0]->IsObject()) |
@@ -132,25 +136,18 @@ void V8InjectedScriptHost::subtypeCallback(const v8::FunctionCallbackInfo<v8::Va |
info.GetReturnValue().Set(toV8String(isolate, subtype)); |
return; |
} |
-} |
- |
-void V8InjectedScriptHost::collectionEntriesCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
-{ |
- if (info.Length() < 1 || !info[0]->IsObject()) |
+ if (value->IsObject() && value.As<v8::Object>()->HasPrivate(isolate->GetCurrentContext(), internalEntryPrivate(isolate)).FromMaybe(false)) { |
dgozman
2016/06/28 18:58:09
Let's do this before consulting debugger client.
kozy
2016/06/28 20:55:46
Done.
|
+ info.GetReturnValue().Set(toV8StringInternalized(isolate, "internal#entry")); |
return; |
- |
- v8::Local<v8::Object> object = info[0].As<v8::Object>(); |
- info.GetReturnValue().Set(unwrapDebugger(info)->collectionEntries(object)); |
+ } |
} |
void V8InjectedScriptHost::getInternalPropertiesCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
{ |
- if (info.Length() < 1 || !info[0]->IsObject()) |
+ if (info.Length() < 1) |
return; |
- |
- v8::Local<v8::Object> object = info[0].As<v8::Object>(); |
v8::Local<v8::Array> properties; |
- if (v8::Debug::GetInternalProperties(info.GetIsolate(), object).ToLocal(&properties)) |
+ if (unwrapDebugger(info)->internalProperties(info.GetIsolate()->GetCurrentContext(), info[0]).ToLocal(&properties)) |
info.GetReturnValue().Set(properties); |
} |