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

Unified Diff: Source/web/WebEmbeddedWorkerImpl.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: 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/WebEmbeddedWorkerImpl.cpp
diff --git a/Source/web/WebEmbeddedWorkerImpl.cpp b/Source/web/WebEmbeddedWorkerImpl.cpp
index aec57b4648edfe710b518a0a6d3a15b39a1a3d59..8284817c5c18fe56efa13e275825beadd0667f52 100644
--- a/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -270,7 +270,9 @@ void WebEmbeddedWorkerImpl::prepareShadowPageForLoader()
CString content("");
int length = static_cast<int>(content.length());
RefPtr<SharedBuffer> buffer(SharedBuffer::create(content.data(), length));
- webFrame->frame()->loader().load(FrameLoadRequest(0, ResourceRequest(m_workerStartData.scriptURL), SubstituteData(buffer, "text/html", "UTF-8", KURL())));
+ ResourceRequest request = ResourceRequest(m_workerStartData.scriptURL);
+ request.initializeForMainResource(!webFrame->parent());
+ webFrame->frame()->loader().load(FrameLoadRequest(0, request, SubstituteData(buffer, "text/html", "UTF-8", KURL())));
}
void WebEmbeddedWorkerImpl::willSendRequest(

Powered by Google App Engine
This is Rietveld 408576698