Index: third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
index b238477105003a682e4f1cb4b27883b6aa3125cc..447bd423cc7bec19cfef2d5e9b00fcae3af807d3 100644 |
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp |
@@ -362,9 +362,18 @@ void DocumentLoader::cancelLoadAfterXFrameOptionsOrCSPDenied(const ResourceRespo |
setWasBlockedAfterXFrameOptionsOrCSP(); |
- // Pretend that this was an empty HTTP 200 response. |
+ // Pretend that this was an empty HTTP 200 response. Don't reuse the |
+ // original URL for the empty page (https://crbug.com/622385). |
+ // |
+ // TODO(mkwst): Remove this once XFO moves to the browser. |
+ // https://crbug.com/555418. |
clearMainResourceHandle(); |
- m_response = ResourceResponse(blankURL(), "text/html", 0, nullAtom, String()); |
+ KURL blockedURL = SecurityOrigin::urlWithUniqueSecurityOrigin(); |
+ m_originalRequest.setURL(blockedURL); |
+ m_request.setURL(blockedURL); |
+ m_redirectChain.removeLast(); |
+ appendRedirect(blockedURL); |
+ m_response = ResourceResponse(blockedURL, "text/html", 0, nullAtom, String()); |
finishedLoading(monotonicallyIncreasingTime()); |
return; |