mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1224865: Don't set a document in FetchDriver for requests in workers. r=bkelly
This commit is contained in:
parent
4ab9e210d3
commit
4e4332aa98
@ -136,11 +136,6 @@ public:
|
||||
nsCOMPtr<nsILoadGroup> loadGroup = proxy->GetWorkerPrivate()->GetLoadGroup();
|
||||
MOZ_ASSERT(loadGroup);
|
||||
RefPtr<FetchDriver> fetch = new FetchDriver(mRequest, principal, loadGroup);
|
||||
nsIDocument* doc = proxy->GetWorkerPrivate()->GetDocument();
|
||||
if (doc) {
|
||||
fetch->SetDocument(doc);
|
||||
}
|
||||
|
||||
nsresult rv = fetch->Fetch(mResolver);
|
||||
// Right now we only support async fetch, which should never directly fail.
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
|
@ -241,10 +241,8 @@ FetchDriver::HttpFetch()
|
||||
MOZ_ASSERT(mLoadGroup);
|
||||
nsCOMPtr<nsIChannel> chan;
|
||||
|
||||
// For dedicated workers mDocument refers to the parent document of the
|
||||
// worker (why do we do that?). In that case we don't want to use the
|
||||
// document here since that is not the correct principal.
|
||||
if (mDocument && mDocument->NodePrincipal() == mPrincipal) {
|
||||
if (mDocument) {
|
||||
MOZ_ASSERT(mDocument->NodePrincipal() == mPrincipal);
|
||||
rv = NS_NewChannel(getter_AddRefs(chan),
|
||||
uri,
|
||||
mDocument,
|
||||
|
Loading…
Reference in New Issue
Block a user