mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 951511. If jar module shutdown happens before all the jar channels are destroyed, we still shouldn't crash. r=bsmedberg
This commit is contained in:
parent
e223f9691c
commit
09c5605923
@ -45,7 +45,10 @@ static const mozilla::Module::ContractIDEntry kJARContracts[] = {
|
||||
// Jar module shutdown hook
|
||||
static void nsJarShutdown()
|
||||
{
|
||||
NS_IF_RELEASE(gJarHandler);
|
||||
// Make sure to not null out gJarHandler here, because we may have
|
||||
// still-live nsJARChannels that will want to release it.
|
||||
nsJARProtocolHandler *handler = gJarHandler;
|
||||
NS_IF_RELEASE(handler);
|
||||
}
|
||||
|
||||
static const mozilla::Module kJARModule = {
|
||||
|
@ -39,6 +39,8 @@ nsJARProtocolHandler::nsJARProtocolHandler()
|
||||
|
||||
nsJARProtocolHandler::~nsJARProtocolHandler()
|
||||
{
|
||||
MOZ_ASSERT(gJarHandler == this);
|
||||
gJarHandler = nullptr;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
Loading…
Reference in New Issue
Block a user