Bug 1152106, part 1 - Don't try to redefine the non-configurable global Components property when EnableUniversalXPConnect is called multiple times. r=bholley.

--HG--
extra : rebase_source : 6509b0adaaa6be10bfd9c696f2d4368946877990
This commit is contained in:
Jason Orendorff 2015-04-10 12:58:38 -05:00
Родитель 638b28b8e0
Коммит 99666fb916
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -521,6 +521,8 @@ EnableUniversalXPConnect(JSContext* cx)
CompartmentPrivate* priv = CompartmentPrivate::Get(compartment);
if (!priv)
return true;
if (priv->universalXPConnectEnabled)
return true;
priv->universalXPConnectEnabled = true;
// Recompute all the cross-compartment wrappers leaving the newly-privileged