Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp

Issue 1622213002: DevTools: make InjectedScript heap-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed protocol tests. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptState.h ('k') | third_party/WebKit/Source/core/inspector/InjectedScript.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698