Index: third_party/WebKit/Source/platform/v8_inspector/V8JavaScriptCallFrame.cpp |
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8JavaScriptCallFrame.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8JavaScriptCallFrame.cpp |
index 6d831c8dd2ea8e0d28cac6504b377fc6e19f11b2..5d1be8e1a04818c4ee7f8cdf9cdff788182fe71a 100644 |
--- a/third_party/WebKit/Source/platform/v8_inspector/V8JavaScriptCallFrame.cpp |
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8JavaScriptCallFrame.cpp |
@@ -143,6 +143,26 @@ void scopeNameMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
info.GetReturnValue().Set(impl->scopeName(scopeIndex)); |
} |
+void scopeStartLocationMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ JavaScriptCallFrame* impl = V8JavaScriptCallFrame::unwrap(info.GetIsolate()->GetCurrentContext(), info.Holder()); |
+ v8::Maybe<int32_t> maybeScopeIndex = info[0]->Int32Value(info.GetIsolate()->GetCurrentContext()); |
+ if (maybeScopeIndex.IsNothing()) |
+ return; |
+ int scopeIndex = maybeScopeIndex.FromJust(); |
+ info.GetReturnValue().Set(impl->scopeStartLocation(scopeIndex)); |
+} |
+ |
+void scopeEndLocationMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
+{ |
+ JavaScriptCallFrame* impl = V8JavaScriptCallFrame::unwrap(info.GetIsolate()->GetCurrentContext(), info.Holder()); |
+ v8::Maybe<int32_t> maybeScopeIndex = info[0]->Int32Value(info.GetIsolate()->GetCurrentContext()); |
+ if (maybeScopeIndex.IsNothing()) |
+ return; |
+ int scopeIndex = maybeScopeIndex.FromJust(); |
+ info.GetReturnValue().Set(impl->scopeEndLocation(scopeIndex)); |
+} |
+ |
char hiddenPropertyName[] = "v8inspector::JavaScriptCallFrame"; |
char className[] = "V8JavaScriptCallFrame"; |
using JavaScriptCallFrameWrapper = InspectorWrapper<JavaScriptCallFrame, hiddenPropertyName, className>; |
@@ -168,7 +188,9 @@ const JavaScriptCallFrameWrapper::V8MethodConfiguration V8JavaScriptCallFrameMet |
{"restart", restartMethodCallback}, |
{"setVariableValue", setVariableValueMethodCallback}, |
{"scopeType", scopeTypeMethodCallback}, |
- {"scopeName", scopeNameMethodCallback} |
+ {"scopeName", scopeNameMethodCallback}, |
+ {"scopeStartLocation", scopeStartLocationMethodCallback}, |
+ {"scopeEndLocation", scopeEndLocationMethodCallback}, |
}; |
} // namespace |