Bug 812887 - Fix nsUserFontSet not dropping the channel when nsIChannel::AsyncOpen fails. r=bz

This commit is contained in:
Nils Maier 2012-11-21 13:31:57 -05:00
parent 9a65eb5ce2
commit 9f3f38d2c9

View File

@ -385,12 +385,12 @@ nsUserFontSet::StartLoad(gfxProxyFontEntry *aProxy,
new nsCORSListenerProxy(streamLoader, principal,
false);
rv = listener->Init(channel);
if (NS_SUCCEEDED(rv)) {
rv = channel->AsyncOpen(listener, nullptr);
}
if (NS_FAILED(rv)) {
fontLoader->DropChannel(); // explicitly need to break ref cycle
}
NS_ENSURE_SUCCESS(rv, rv);
rv = channel->AsyncOpen(listener, nullptr);
}
if (NS_SUCCEEDED(rv)) {