зеркало из https://github.com/mozilla/gecko-dev.git
Bug 963701 - Unscope the JSAutoCompartment in InitTargetObjects. r=bz
This commit is contained in:
Родитель
8aa8afcb8d
Коммит
a338b8d9f0
|
@ -172,13 +172,11 @@ nsXBLProtoImpl::InitTargetObjects(nsXBLPrototypeBinding* aBinding,
|
|||
JS::Rooted<JSObject*> global(cx, sgo->GetGlobalJSObject());
|
||||
JS::Rooted<JS::Value> v(cx);
|
||||
|
||||
{
|
||||
JSAutoCompartment ac(cx, global);
|
||||
// Make sure the interface object is created before the prototype object
|
||||
// so that XULElement is hidden from content. See bug 909340.
|
||||
bool defineOnGlobal = dom::XULElementBinding::ConstructorEnabled(cx, global);
|
||||
dom::XULElementBinding::GetConstructorObject(cx, global, defineOnGlobal);
|
||||
}
|
||||
JSAutoCompartment ac(cx, global);
|
||||
// Make sure the interface object is created before the prototype object
|
||||
// so that XULElement is hidden from content. See bug 909340.
|
||||
bool defineOnGlobal = dom::XULElementBinding::ConstructorEnabled(cx, global);
|
||||
dom::XULElementBinding::GetConstructorObject(cx, global, defineOnGlobal);
|
||||
|
||||
rv = nsContentUtils::WrapNative(cx, global, aBoundElement, &v);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
|
Загрузка…
Ссылка в новой задаче