bug 897503 - part 1 - HttpChannelParent reference count bug of nsHttpHandler r=sworkman

This commit is contained in:
Patrick McManus 2013-08-13 15:36:56 -04:00
parent dd7fc67a3f
commit 8fe5f89fa7
2 changed files with 7 additions and 4 deletions

View File

@ -48,16 +48,17 @@ HttpChannelParent::HttpChannelParent(PBrowserParent* iframeEmbedding,
, mLoadContext(aLoadContext)
{
// Ensure gHttpHandler is initialized: we need the atom table up and running.
nsIHttpProtocolHandler* handler;
CallGetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &handler);
MOZ_ASSERT(handler);
nsCOMPtr<nsIHttpProtocolHandler> dummyInitializer =
do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http");
MOZ_ASSERT(gHttpHandler);
mHttpHandler = gHttpHandler;
mTabParent = static_cast<mozilla::dom::TabParent*>(iframeEmbedding);
}
HttpChannelParent::~HttpChannelParent()
{
gHttpHandler->Release();
}
void

View File

@ -19,6 +19,7 @@
class nsICacheEntryDescriptor;
class nsIAssociatedContentSecurity;
class nsHttpHandler;
namespace mozilla {
@ -120,6 +121,7 @@ private:
PBOverrideStatus mPBOverride;
nsCOMPtr<nsILoadContext> mLoadContext;
nsRefPtr<nsHttpHandler> mHttpHandler;
};
} // namespace net