Chromium Code Reviews| Index: third_party/WebKit/Source/platform/v8_inspector/JavaScriptCallFrame.cpp |
| diff --git a/third_party/WebKit/Source/platform/v8_inspector/JavaScriptCallFrame.cpp b/third_party/WebKit/Source/platform/v8_inspector/JavaScriptCallFrame.cpp |
| index f5bfdd4a632601e699f7935234199949989b8f17..3a4068127f041b70057c8a51e7e662cd0a493ccf 100644 |
| --- a/third_party/WebKit/Source/platform/v8_inspector/JavaScriptCallFrame.cpp |
| +++ b/third_party/WebKit/Source/platform/v8_inspector/JavaScriptCallFrame.cpp |
| @@ -149,6 +149,24 @@ v8::Local<v8::String> JavaScriptCallFrame::scopeName(int scopeIndex) const |
| return scopeType->Get(scopeIndex)->ToString(); |
| } |
| +v8::Local<v8::Value> JavaScriptCallFrame::scopeStartLocation(int scopeIndex) const |
| +{ |
| + return callScopeLocationFunction("scopeStartLocation", scopeIndex); |
| +} |
| + |
| +v8::Local<v8::Value> JavaScriptCallFrame::scopeEndLocation(int scopeIndex) const |
| +{ |
| + return callScopeLocationFunction("scopeEndLocation", scopeIndex); |
| +} |
| + |
| +v8::Local<v8::Value> JavaScriptCallFrame::callScopeLocationFunction(const char* name, int scopeIndex) const |
| +{ |
| + v8::Local<v8::Object> callFrame = v8::Local<v8::Object>::New(m_isolate, m_callFrame); |
| + v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(callFrame->Get(toV8StringInternalized(m_isolate, name))); |
| + v8::Local<v8::Array> locations = v8::Local<v8::Array>::Cast(m_client->callInternalFunction(func, callFrame, 0, 0).ToLocalChecked()); |
|
dgozman
2016/02/22 17:24:57
0, nullptr
sergeyv
2016/02/22 21:42:54
Done.
|
| + return locations->Get(scopeIndex); |
| +} |
| + |
| v8::Local<v8::Value> JavaScriptCallFrame::thisObject() const |
| { |
| return v8::Local<v8::Object>::New(m_isolate, m_callFrame)->Get(toV8StringInternalized(m_isolate, "thisObject")); |