Permalink
Browse files

Bug 653936: fix: StartupCache uses nsZipItemPtr without ensuring that…

… the JAR module is loaded, causes leak r=mwu
  • Loading branch information...
1 parent e52abee commit 392e63bd3ec2e652f21ae75eea0330aef8c84190 Taras Glek committed Jun 30, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 startupcache/StartupCache.cpp
@@ -67,6 +67,7 @@
#include "mozilla/FunctionTimer.h"
#include "nsThreadUtils.h"
#include "nsXULAppAPI.h"
+#include "nsIProtocolHandler.h"
#ifdef IS_BIG_ENDIAN
#define SC_ENDIAN "big"
@@ -142,7 +143,9 @@ StartupCache::Init()
NS_WARNING("Startup cache is only available in the chrome process");
return NS_ERROR_NOT_AVAILABLE;
}
-
+ // workaround for bug 653936
+ nsCOMPtr<nsIProtocolHandler> jarInitializer(do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "jar"));
+
nsresult rv;
mTable.Init();
#ifdef DEBUG

0 comments on commit 392e63b

Please sign in to comment.