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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 339593005: Set the target type when creating the request for main resource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 6 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: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 4cf0271048dea4240fef8f8ffca80aef95d126f5..70079be015ea27072467ba1fee77a85a890518f1 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -876,9 +876,12 @@ void WebLocalFrameImpl::loadData(const WebData& data, const WebString& mimeType,
// unreachableURL informs FrameLoader::reload to load unreachableURL
// instead of the currently loaded URL.
ResourceRequest request;
- if (replace && !unreachableURL.isEmpty() && frame()->loader().provisionalDocumentLoader())
+ if (replace && !unreachableURL.isEmpty() && frame()->loader().provisionalDocumentLoader()) {
request = frame()->loader().provisionalDocumentLoader()->originalRequest();
- request.setURL(baseURL);
+ request.setURL(baseURL);
+ } else {
+ request = ResourceRequest::createMainResourceRequest(baseURL, !this->parent());
+ }
FrameLoadRequest frameRequest(0, request, SubstituteData(data, mimeType, textEncoding, unreachableURL));
ASSERT(frameRequest.substituteData().isValid());

Powered by Google App Engine
This is Rietveld 408576698