mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset ffa4255ebaa7 (bug 1016875) for bustage on a CLOSED TREE
This commit is contained in:
parent
a927af1835
commit
89828810a9
@ -190,23 +190,14 @@ void ImportLoader::ReleaseResources()
|
||||
mImportParent = nullptr;
|
||||
}
|
||||
|
||||
nsIPrincipal*
|
||||
ImportLoader::Principal()
|
||||
{
|
||||
MOZ_ASSERT(mImportParent);
|
||||
nsCOMPtr<nsIDocument> master = mImportParent->MasterDocument();
|
||||
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(master);
|
||||
MOZ_ASSERT(sop);
|
||||
return sop->GetPrincipal();
|
||||
}
|
||||
|
||||
void
|
||||
ImportLoader::Open()
|
||||
{
|
||||
AutoError ae(this, false);
|
||||
// Imports should obey to the master documents CSP.
|
||||
nsCOMPtr<nsIDocument> master = mImportParent->MasterDocument();
|
||||
nsIPrincipal* principal = Principal();
|
||||
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(master);
|
||||
nsCOMPtr<nsIPrincipal> principal = sop->GetPrincipal();
|
||||
|
||||
int16_t shouldLoad = nsIContentPolicy::ACCEPT;
|
||||
nsresult rv = NS_CheckContentLoadPolicy(nsIContentPolicy::TYPE_SCRIPT,
|
||||
@ -333,7 +324,11 @@ NS_IMETHODIMP
|
||||
ImportLoader::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext)
|
||||
{
|
||||
AutoError ae(this);
|
||||
nsIPrincipal* principal = Principal();
|
||||
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(mImportParent);
|
||||
nsCOMPtr<nsIPrincipal> principal = sop->GetPrincipal();
|
||||
if (!sop) {
|
||||
return NS_ERROR_DOM_ABORT_ERR;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
|
||||
if (!channel) {
|
||||
|
@ -115,8 +115,6 @@ private:
|
||||
void BlockScripts();
|
||||
void UnblockScripts();
|
||||
|
||||
nsIPrincipal* Principal();
|
||||
|
||||
nsCOMPtr<nsIDocument> mDocument;
|
||||
nsCOMPtr<nsIURI> mURI;
|
||||
nsCOMPtr<nsIStreamListener> mParserStreamListener;
|
||||
|
Loading…
Reference in New Issue
Block a user