Bug 1233922 - Skip Camera preinit for browser elements. r=fabrice

--HG--
extra : rebase_source : bde01b4e80b1f868a8b2a497c9031c766fd803ac
This commit is contained in:
Alexandre Lissy 2015-12-19 17:02:00 +01:00
parent 61313a12f5
commit 3601667fc4

View File

@ -1498,7 +1498,12 @@ TabChild::ApplyShowInfo(const ShowInfo& aInfo)
void
TabChild::MaybeRequestPreinitCamera()
{
// Check if this tab will use the `camera` permission.
// Check if this tab is an app (not a browser frame) and will use the
// `camera` permission,
if (IsBrowserElement()) {
return;
}
nsCOMPtr<nsIAppsService> appsService = do_GetService("@mozilla.org/AppsService;1");
if (NS_WARN_IF(!appsService)) {
return;