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

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: 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/WebEmbeddedWorkerImpl.cpp
diff --git a/Source/web/WebEmbeddedWorkerImpl.cpp b/Source/web/WebEmbeddedWorkerImpl.cpp
index 25a22ce17c7b41314c3c222d42bc02e0d8e97b35..ced63cd654a7c6d20de49dd0fd72d38edc384e0b 100644
--- a/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -281,7 +281,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::createMainResourceRequest(
+ m_workerStartData.scriptURL, !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