mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 207306 plugin host should be destoryed on Observe() "NS_XPCOM_SHUTDOWN_OBSERVER_ID" rarther than on "quit-application"
patch by bugspam.Callek@gmail.com r=jst sr=jst a=asa
This commit is contained in:
parent
bebbf3cada
commit
dc8fcace3d
@ -2550,7 +2550,6 @@ nsPluginHostImpl::nsPluginHostImpl()
|
||||
nsCOMPtr<nsIObserverService> obsService = do_GetService("@mozilla.org/observer-service;1");
|
||||
if (obsService)
|
||||
{
|
||||
obsService->AddObserver(this, "quit-application", PR_FALSE);
|
||||
obsService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_FALSE);
|
||||
}
|
||||
|
||||
@ -6120,11 +6119,9 @@ NS_IMETHODIMP nsPluginHostImpl::Observe(nsISupports *aSubject,
|
||||
#ifdef NS_DEBUG
|
||||
printf("nsPluginHostImpl::Observe \"%s\"\n", aTopic ? aTopic : "");
|
||||
#endif
|
||||
if (!nsCRT::strcmp("quit-application", aTopic))
|
||||
if (!nsCRT::strcmp(NS_XPCOM_SHUTDOWN_OBSERVER_ID, aTopic))
|
||||
{
|
||||
Destroy();
|
||||
} else if (!nsCRT::strcmp(NS_XPCOM_SHUTDOWN_OBSERVER_ID, aTopic))
|
||||
{
|
||||
UnloadUnusedLibraries();
|
||||
}
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user