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

Unified Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2239303003: Remove SandboxBlocksModals runtime flag (status=stable) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index 7379a49a1a7d082a1f730431b2a5679d546146c9..d7d5e161dc9c6ea4d7bc98ed2b9d165ed6e1ce0b 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -732,10 +732,8 @@ void LocalDOMWindow::print(ScriptState* scriptState)
if (document()->isSandboxed(SandboxModals)) {
UseCounter::count(document(), UseCounter::DialogInSandboxedContext);
- if (RuntimeEnabledFeatures::sandboxBlocksModalsEnabled()) {
- frameConsole()->addMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel, "Ignored call to 'print()'. The document is sandboxed, and the 'allow-modals' keyword is not set."));
- return;
- }
+ frameConsole()->addMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel, "Ignored call to 'print()'. The document is sandboxed, and the 'allow-modals' keyword is not set."));
+ return;
}
if (scriptState && v8::MicrotasksScope::IsRunningMicrotasks(scriptState->isolate())) {
@@ -767,10 +765,8 @@ void LocalDOMWindow::alert(ScriptState* scriptState, const String& message)
if (document()->isSandboxed(SandboxModals)) {
UseCounter::count(document(), UseCounter::DialogInSandboxedContext);
- if (RuntimeEnabledFeatures::sandboxBlocksModalsEnabled()) {
- frameConsole()->addMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel, "Ignored call to 'alert()'. The document is sandboxed, and the 'allow-modals' keyword is not set."));
- return;
- }
+ frameConsole()->addMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel, "Ignored call to 'alert()'. The document is sandboxed, and the 'allow-modals' keyword is not set."));
+ return;
}
if (v8::MicrotasksScope::IsRunningMicrotasks(scriptState->isolate())) {
@@ -795,10 +791,8 @@ bool LocalDOMWindow::confirm(ScriptState* scriptState, const String& message)
if (document()->isSandboxed(SandboxModals)) {
UseCounter::count(document(), UseCounter::DialogInSandboxedContext);
- if (RuntimeEnabledFeatures::sandboxBlocksModalsEnabled()) {
- frameConsole()->addMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel, "Ignored call to 'confirm()'. The document is sandboxed, and the 'allow-modals' keyword is not set."));
- return false;
- }
+ frameConsole()->addMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel, "Ignored call to 'confirm()'. The document is sandboxed, and the 'allow-modals' keyword is not set."));
+ return false;
}
if (v8::MicrotasksScope::IsRunningMicrotasks(scriptState->isolate())) {
@@ -823,10 +817,8 @@ String LocalDOMWindow::prompt(ScriptState* scriptState, const String& message, c
if (document()->isSandboxed(SandboxModals)) {
UseCounter::count(document(), UseCounter::DialogInSandboxedContext);
- if (RuntimeEnabledFeatures::sandboxBlocksModalsEnabled()) {
- frameConsole()->addMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel, "Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set."));
- return String();
- }
+ frameConsole()->addMessage(ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel, "Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set."));
+ return String();
}
if (v8::MicrotasksScope::IsRunningMicrotasks(scriptState->isolate())) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/SandboxFlags.cpp ('k') | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698