Bug 739019: Allow chrome code to use PowerManager. r=cjones

This commit is contained in:
Kan-Ru Chen 2012-03-25 00:11:00 -07:00
parent 14d1cfa7ce
commit e1064ff503

View File

@ -90,6 +90,10 @@ PowerManager::Shutdown()
nsresult
PowerManager::CheckPermission()
{
if (nsContentUtils::IsCallerChrome()) {
return NS_OK;
}
nsCOMPtr<nsPIDOMWindow> win = do_QueryReferent(mWindow);
NS_ENSURE_STATE(win);
nsCOMPtr<nsIDocument> doc = do_QueryInterface(win->GetExtantDocument());