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

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

Issue 2425663002: Add an error page for resources blocked via XSS Auditor. (Closed)
Patch Set: frameNavigation test. Created 4 years, 2 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/Frame.cpp
diff --git a/third_party/WebKit/Source/core/frame/Frame.cpp b/third_party/WebKit/Source/core/frame/Frame.cpp
index 299e4b1da6900db3fc45ed4a10c1fe5a68ce3846..8b6d37dadd2951532ebb2010cb3c661efe130cec 100644
--- a/third_party/WebKit/Source/core/frame/Frame.cpp
+++ b/third_party/WebKit/Source/core/frame/Frame.cpp
@@ -49,6 +49,7 @@
#include "platform/Histogram.h"
#include "platform/InstanceCounters.h"
#include "platform/UserGestureIndicator.h"
+#include "platform/network/ResourceError.h"
namespace blink {
@@ -192,9 +193,10 @@ bool Frame::canNavigate(const Frame& targetFrame) {
"user gesture. See "
"https://www.chromestatus.com/features/5851021045661696.";
printNavigationErrorMessage(targetFrame, errorReason.latin1().data());
- if (isLocalFrame())
+ if (isLocalFrame()) {
toLocalFrame(this)->navigationScheduler().schedulePageBlock(
- toLocalFrame(this)->document());
+ toLocalFrame(this)->document(), ResourceError::ACCESS_DENIED);
+ }
return false;
}
if (!isAllowedNavigation && !errorReason.isNull())

Powered by Google App Engine
This is Rietveld 408576698