mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1199491 - Use channel->ascynOpen2 in netwerk/base/nsURIChecker (r=sicking,jduell)
This commit is contained in:
parent
2767440adb
commit
5814f812b3
@ -6,10 +6,10 @@
|
||||
#include "nsURIChecker.h"
|
||||
#include "nsIAuthPrompt.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIAsyncVerifyRedirectCallback.h"
|
||||
#include "nsNullPrincipal.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@ -137,12 +137,10 @@ NS_IMETHODIMP
|
||||
nsURIChecker::Init(nsIURI *aURI)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPrincipal> nullPrincipal = nsNullPrincipal::Create();
|
||||
NS_ENSURE_TRUE(nullPrincipal, NS_ERROR_FAILURE);
|
||||
rv = NS_NewChannel(getter_AddRefs(mChannel),
|
||||
aURI,
|
||||
nullPrincipal,
|
||||
nsILoadInfo::SEC_NORMAL,
|
||||
nsContentUtils::GetSystemPrincipal(),
|
||||
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
|
||||
nsIContentPolicy::TYPE_OTHER);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
@ -180,9 +178,9 @@ nsURIChecker::AsyncCheck(nsIRequestObserver *aObserver,
|
||||
// Hook us up to listen to redirects and the like (this creates a reference
|
||||
// cycle!)
|
||||
mChannel->SetNotificationCallbacks(this);
|
||||
|
||||
|
||||
// and start the request:
|
||||
nsresult rv = mChannel->AsyncOpen(this, nullptr);
|
||||
nsresult rv = mChannel->AsyncOpen2(this);
|
||||
if (NS_FAILED(rv))
|
||||
mChannel = nullptr;
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user