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

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: Test. Created 4 years, 1 month 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 d66ec64f38a8016ecd2c3064820618a28947371e..9680704918860464f3f63c78c599744ecda86538 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/feature_policy/FeaturePolicy.h"
+#include "platform/network/ResourceError.h"
namespace blink {
@@ -195,9 +196,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