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

Unified Diff: third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp

Issue 2179683002: [DevTools] Cleanup v8_inspector API part 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: breakDetails Created 4 years, 5 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/core/inspector/MainThreadDebugger.cpp
diff --git a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
index 2cdc2c1c90c9a0ab87cb33903dfc1f7cc222fc6c..97fb60cbeeabe94b27c4dd3c379495742e6b504a 100644
--- a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
@@ -45,6 +45,7 @@
#include "core/frame/FrameHost.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/Settings.h"
#include "core/frame/UseCounter.h"
#include "core/inspector/ConsoleMessage.h"
#include "core/inspector/ConsoleMessageStorage.h"
@@ -219,11 +220,6 @@ void MainThreadDebugger::unmuteWarningsAndDeprecations(int contextGroupId)
frame->host()->consoleMessageStorage().unmute();
}
-bool MainThreadDebugger::callingContextCanAccessContext(v8::Local<v8::Context> calling, v8::Local<v8::Context> target)
-{
- return BindingSecurity::shouldAllowAccessTo(m_isolate, calling, target, DoNotReportSecurityError);
-}
-
v8::Local<v8::Context> MainThreadDebugger::ensureDefaultContextInGroup(int contextGroupId)
{
LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
@@ -231,6 +227,18 @@ v8::Local<v8::Context> MainThreadDebugger::ensureDefaultContextInGroup(int conte
return scriptState ? scriptState->context() : v8::Local<v8::Context>();
}
+void MainThreadDebugger::beginEnsureAllContextsInGroup(int contextGroupId)
+{
+ LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
+ frame->settings()->setForceMainWorldInitialization(true);
+}
+
+void MainThreadDebugger::endEnsureAllContextsInGroup(int contextGroupId)
+{
+ LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
+ frame->settings()->setForceMainWorldInitialization(false);
+}
+
void MainThreadDebugger::consoleAPIMessage(int contextGroupId, MessageLevel level, const String16& message, const String16& url, unsigned lineNumber, unsigned columnNumber, V8StackTrace* stackTrace)
{
LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);

Powered by Google App Engine
This is Rietveld 408576698