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

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: Switched to constructors 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
« no previous file with comments | « Source/web/WebEmbeddedWorkerImpl.cpp ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index e06ecff1eafe1df066479e45aa3588a14eeb1793..ec60aee28aa13546e3130623e7b9757b6208327d 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -874,9 +874,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(baseURL, !this->parent());
+ }
FrameLoadRequest frameRequest(0, request, SubstituteData(data, mimeType, textEncoding, unreachableURL));
ASSERT(frameRequest.substituteData().isValid());
« no previous file with comments | « Source/web/WebEmbeddedWorkerImpl.cpp ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698