Bug 735781 - Make sure nsScreen don't call RemoveObserver twice in a row. r=jlebar

This commit is contained in:
Mounir Lamouri 2012-03-15 10:58:56 +01:00
parent a0c55021dc
commit 37cde3b716
2 changed files with 1 additions and 8 deletions

View File

@ -1313,7 +1313,6 @@ nsGlobalWindow::FreeInnerObjects()
}
if (mScreen) {
mScreen->Invalidate();
mScreen = nsnull;
}

View File

@ -84,12 +84,6 @@ nsScreen::Initialize()
"dom.screenBrightnessProperty.enabled");
}
void
nsScreen::Invalidate()
{
hal::UnregisterScreenOrientationObserver(this);
}
/* static */ already_AddRefed<nsScreen>
nsScreen::Create(nsPIDOMWindow* aWindow)
{
@ -120,7 +114,7 @@ nsScreen::nsScreen()
nsScreen::~nsScreen()
{
Invalidate();
hal::UnregisterScreenOrientationObserver(this);
}