mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1124268, part 1 - Take advantage of the infallibility of nsContentUtils::GetSameOriginChecker(). r=smaug
This commit is contained in:
parent
e05321fd66
commit
53e1f836f4
@ -5652,7 +5652,7 @@ nsContentUtils::GetSameOriginChecker()
|
||||
{
|
||||
if (!sSameOriginChecker) {
|
||||
sSameOriginChecker = new SameOriginChecker();
|
||||
NS_IF_ADDREF(sSameOriginChecker);
|
||||
NS_ADDREF(sSameOriginChecker);
|
||||
}
|
||||
return sSameOriginChecker;
|
||||
}
|
||||
|
@ -1338,7 +1338,6 @@ nsExternalResourceMap::PendingLoad::StartLoad(nsIURI* aURI,
|
||||
nsIDocument* doc = aRequestingNode->OwnerDoc();
|
||||
|
||||
nsCOMPtr<nsIInterfaceRequestor> req = nsContentUtils::GetSameOriginChecker();
|
||||
NS_ENSURE_TRUE(req, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
nsCOMPtr<nsILoadGroup> loadGroup = doc->GetDocumentLoadGroup();
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
|
@ -1101,7 +1101,6 @@ nsXBLService::FetchBindingDocument(nsIContent* aBoundElement, nsIDocument* aBoun
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIInterfaceRequestor> sameOriginChecker = nsContentUtils::GetSameOriginChecker();
|
||||
NS_ENSURE_TRUE(sameOriginChecker, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
channel->SetNotificationCallbacks(sameOriginChecker);
|
||||
|
||||
|
@ -435,10 +435,6 @@ XMLDocument::Load(const nsAString& aUrl, ErrorResult& aRv)
|
||||
|
||||
// Create a channel
|
||||
nsCOMPtr<nsIInterfaceRequestor> req = nsContentUtils::GetSameOriginChecker();
|
||||
if (!req) {
|
||||
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
|
||||
return false;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
// nsIRequest::LOAD_BACKGROUND prevents throbber from becoming active,
|
||||
|
Loading…
Reference in New Issue
Block a user