зеркало из https://github.com/mozilla/gecko-dev.git
Bug 781476 - Cross-compartment wrap same-origin objects with PreCreate even if PreCreate requests one wrapper per scope. r=mrbkap
This commit is contained in:
Родитель
87ebeee92c
Коммит
e9fce7a3ae
|
@ -229,6 +229,15 @@ WrapperFactory::PrepareForWrapping(JSContext *cx, JSObject *scope, JSObject *obj
|
|||
|
||||
// Ok, must be case (1). Fall through and create a new wrapper.
|
||||
}
|
||||
|
||||
// Nasty hack for late-breaking bug 781476. This will confuse identity checks,
|
||||
// but it's probably better than any of our alternatives.
|
||||
if (!AccessCheck::isChrome(js::GetObjectCompartment(scope)) &&
|
||||
AccessCheck::subsumes(js::GetObjectCompartment(scope),
|
||||
js::GetObjectCompartment(obj)))
|
||||
{
|
||||
return DoubleWrap(cx, obj, flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче