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

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: 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 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());

Powered by Google App Engine
This is Rietveld 408576698