mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 965413 part 11. Use a LoadInfo as needed for loading stylesheets. r=smaug
This commit is contained in:
parent
b8297ece4e
commit
5717f7fbc6
@ -17,6 +17,7 @@
|
||||
/* loading of CSS style sheets using the network APIs */
|
||||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
|
||||
#include "mozilla/css/Loader.h"
|
||||
@ -1560,12 +1561,17 @@ Loader::LoadSheet(SheetLoadData* aLoadData, StyleSheetState aSheetState)
|
||||
rv = NS_URIChainHasFlags(aLoadData->mURI,
|
||||
nsIProtocolHandler::URI_INHERITS_SECURITY_CONTEXT,
|
||||
&inherit);
|
||||
if ((NS_SUCCEEDED(rv) && inherit) ||
|
||||
(nsContentUtils::URIIsLocalFile(aLoadData->mURI) &&
|
||||
NS_SUCCEEDED(aLoadData->mLoaderPrincipal->
|
||||
CheckMayLoad(aLoadData->mURI, false, false)))) {
|
||||
channel->SetOwner(aLoadData->mLoaderPrincipal);
|
||||
}
|
||||
inherit =
|
||||
((NS_SUCCEEDED(rv) && inherit) ||
|
||||
(nsContentUtils::URIIsLocalFile(aLoadData->mURI) &&
|
||||
NS_SUCCEEDED(aLoadData->mLoaderPrincipal->
|
||||
CheckMayLoad(aLoadData->mURI, false, false))));
|
||||
nsCOMPtr<nsILoadInfo> loadInfo =
|
||||
new LoadInfo(aLoadData->mLoaderPrincipal,
|
||||
inherit ?
|
||||
LoadInfo::eInheritPrincipal : LoadInfo::eDontInheritPrincipal,
|
||||
LoadInfo::eNotSandboxed);
|
||||
channel->SetLoadInfo(loadInfo);
|
||||
}
|
||||
|
||||
// We don't have to hold on to the stream loader. The ownership
|
||||
|
Loading…
Reference in New Issue
Block a user