mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1171234 - Include triggering node in load info when doing prefetching (r=ckerschb)
This commit is contained in:
parent
d009a10f13
commit
d73650a72c
@ -1,3 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
@ -185,15 +186,17 @@ nsPrefetchNode::OpenChannel()
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsCOMPtr<nsILoadGroup> loadGroup = source->OwnerDoc()->GetDocumentLoadGroup();
|
||||
nsresult rv = NS_NewChannel(getter_AddRefs(mChannel),
|
||||
mURI,
|
||||
nsContentUtils::GetSystemPrincipal(),
|
||||
nsILoadInfo::SEC_NORMAL,
|
||||
nsIContentPolicy::TYPE_OTHER,
|
||||
loadGroup, // aLoadGroup
|
||||
this, // aCallbacks
|
||||
nsIRequest::LOAD_BACKGROUND |
|
||||
nsICachingChannel::LOAD_ONLY_IF_MODIFIED);
|
||||
nsresult rv = NS_NewChannelInternal(getter_AddRefs(mChannel),
|
||||
mURI,
|
||||
source,
|
||||
source->NodePrincipal(),
|
||||
nullptr, //aTriggeringPrincipal
|
||||
nsILoadInfo::SEC_NORMAL,
|
||||
nsIContentPolicy::TYPE_OTHER,
|
||||
loadGroup, // aLoadGroup
|
||||
this, // aCallbacks
|
||||
nsIRequest::LOAD_BACKGROUND |
|
||||
nsICachingChannel::LOAD_ONLY_IF_MODIFIED);
|
||||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user