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

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

Issue 2194063002: [DevTools] Move canExecuteScript to V8DebuggerClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 0bf14219daeeec4816beb2971545c36d835153e9..7ab776bcd6f405c69597116faf4552edc2ce00bf 100644
--- a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
@@ -262,6 +262,12 @@ void MainThreadDebugger::endEnsureAllContextsInGroup(int contextGroupId)
frame->settings()->setForceMainWorldInitialization(false);
}
+bool MainThreadDebugger::canExecuteScripts(int contextGroupId)
+{
+ LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
kozy 2016/08/01 18:08:03 Could it return nullptr?
dgozman 2016/08/01 18:43:04 Nope. If it does, we crash. That's expected.
+ return frame->script().canExecuteScripts(NotAboutToExecuteScript);
+}
+
void MainThreadDebugger::consoleAPIMessage(int contextGroupId, V8ConsoleAPIType type, 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