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 489cdb8e53e5dc485078ff8ddb81fe99b214d5d5..044a9fffaf9b1be5fbe8474c4fdd4cd52e1ffe0c 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()); |