Bug 1282554 - Provide helper function to check if channel can be openen using open2() and asyncOpen2() r=bholly

This commit is contained in:
Christoph Kerschbaumer
2016-06-28 19:03:56 +02:00
parent 5f3340f961
commit 9707ba1a13
7 changed files with 47 additions and 58 deletions

View File

@@ -1402,13 +1402,7 @@ WebSocketChannel::BeginOpenInternal()
}
#endif
nsCOMPtr<nsILoadInfo> loadInfo = localChannel->GetLoadInfo();
if (loadInfo && loadInfo->GetSecurityMode()) {
rv = localChannel->AsyncOpen2(this);
}
else {
rv = localChannel->AsyncOpen(this, nullptr);
}
rv = NS_MaybeOpenChannelUsingAsyncOpen2(localChannel, this);
if (NS_FAILED(rv)) {
LOG(("WebSocketChannel::BeginOpenInternal: cannot async open\n"));