Chromium Code Reviews| 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 b15db44c21703288b4e6047b7c00da5fb2eee47f..b81bdbfd0bf3f3e534474ceb3bd79433c0cd55ee 100644 |
| --- a/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp |
| +++ b/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp |
| @@ -69,9 +69,12 @@ void V8InjectedScriptHost::internalConstructorNameCallback(const v8::FunctionCal |
| void V8InjectedScriptHost::formatAccessorsAsProperties(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| - if (info.Length() < 1) |
| + ASSERT(info.Length() == 2); |
| + info.GetReturnValue().Set(false); |
| + if (!info[1]->IsFunction()) |
|
dgozman
2016/05/23 15:53:03
How this could be possible? Why do we return |fals
kozy
2016/05/23 17:05:12
It could be undefined and we don't want to format
|
| + return; |
| + if (info[1].As<v8::Function>()->ScriptId() != v8::UnboundScript::kNoScriptId) |
|
dgozman
2016/05/23 15:53:03
Let's comment that this means user-defined code.
kozy
2016/05/23 17:05:12
Done.
|
| return; |
| - |
| info.GetReturnValue().Set(unwrapDebugger(info)->client()->formatAccessorsAsProperties(info[0])); |
| } |