Index: third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp |
index eae715ecb8fc1ea73285aaecf23851870f34ed3c..1f80618c34fbc13adc71246ca61ffde32862ddd5 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp |
@@ -8,6 +8,7 @@ |
#include "core/dom/ExecutionContext.h" |
#include "core/frame/LocalDOMWindow.h" |
#include "core/frame/LocalFrame.h" |
+#include "core/inspector/v8/V8Debugger.h" |
namespace blink { |
@@ -127,6 +128,12 @@ LocalDOMWindow* ScriptState::domWindow() const |
return toLocalDOMWindow(toDOMWindow(context())); |
} |
+int ScriptState::contextIdInDebugger() |
+{ |
+ v8::HandleScope scope(m_isolate); |
+ return V8Debugger::contextId(m_context.newLocal(m_isolate)); |
+} |
+ |
ScriptState* ScriptState::forMainWorld(LocalFrame* frame) |
{ |
return ScriptState::forWorld(frame, DOMWrapperWorld::mainWorld()); |