Bug 904579 - don't use nsCOMPtr for concrete classes in android's nsWindow.cpp; r=blassey

This commit is contained in:
Nathan Froyd 2013-08-13 09:31:32 -04:00
parent eb5b0ed1bb
commit 63e8e6952a

View File

@ -72,7 +72,7 @@ static gfxIntSize gAndroidScreenBounds;
#include "nsThreadUtils.h"
class ContentCreationNotifier;
static nsCOMPtr<ContentCreationNotifier> gContentCreationNotifier;
static StaticRefPtr<ContentCreationNotifier> gContentCreationNotifier;
// A helper class to send updates when content processes
// are created. Currently an update for the screen size is sent.
@ -822,7 +822,7 @@ nsWindow::OnGlobalAndroidEvent(AndroidGeckoEvent *ae)
if (!obs)
break;
nsCOMPtr<ContentCreationNotifier> notifier = new ContentCreationNotifier;
nsRefPtr<ContentCreationNotifier> notifier = new ContentCreationNotifier;
if (NS_SUCCEEDED(obs->AddObserver(notifier, "ipc:content-created", false))) {
if (NS_SUCCEEDED(obs->AddObserver(notifier, "xpcom-shutdown", false)))
gContentCreationNotifier = notifier;