From 537c445a65591ff97c0f5cac1569f13d763c1e31 Mon Sep 17 00:00:00 2001 From: Eric Rahm Date: Tue, 9 Jun 2015 18:25:47 -0700 Subject: [PATCH] Bug 1171716 - Part 4: Use NS_ReleaseOnMainThread in JarChannel dtor. r=froydnj --- modules/libjar/nsJARChannel.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/modules/libjar/nsJARChannel.cpp b/modules/libjar/nsJARChannel.cpp index 7addea33fa1..304deba2e5c 100644 --- a/modules/libjar/nsJARChannel.cpp +++ b/modules/libjar/nsJARChannel.cpp @@ -213,14 +213,7 @@ nsJARChannel::nsJARChannel() nsJARChannel::~nsJARChannel() { - if (mLoadInfo) { - nsCOMPtr mainThread; - NS_GetMainThread(getter_AddRefs(mainThread)); - - nsILoadInfo *forgetableLoadInfo; - mLoadInfo.forget(&forgetableLoadInfo); - NS_ProxyRelease(mainThread, forgetableLoadInfo, false); - } + NS_ReleaseOnMainThread(mLoadInfo); // release owning reference to the jar handler nsJARProtocolHandler *handler = gJarHandler;