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

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

Issue 1647493003: DevTools: check for scripts being forbinned when dispatching context menu events. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
diff --git a/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp b/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
index 437b3c828a2b153f484ce1ca2dfd3105aa04adc8..9854ebcd4eceab5bc6d0963d9c4cf95c16c25015 100644
--- a/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
+++ b/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
@@ -50,6 +50,7 @@
#include "platform/ContextMenu.h"
#include "platform/ContextMenuItem.h"
#include "platform/HostWindow.h"
+#include "platform/ScriptForbiddenScope.h"
#include "platform/SharedBuffer.h"
#include "platform/UserGestureIndicator.h"
#include "platform/network/ResourceError.h"
@@ -137,6 +138,8 @@ DEFINE_TRACE(DevToolsHost)
void DevToolsHost::evaluateScript(const String& expression)
{
+ if (ScriptForbiddenScope::isScriptForbidden())
+ return;
if (!m_frontendFrame)
return;
ScriptState* scriptState = ScriptState::forMainWorld(m_frontendFrame);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698