зеркало из https://github.com/mozilla/gecko-dev.git
Bug 965898 - All properties from cross-origin objects are "configurable", non-enumerable, and non-writable. r=gabor
This commit is contained in:
Родитель
80a57aee8e
Коммит
1845c65894
|
@ -189,6 +189,13 @@ CrossOriginXrayWrapper::getPropertyDescriptor(JSContext *cx,
|
|||
if (desc.object()) {
|
||||
// All properties on cross-origin DOM objects are |own|.
|
||||
desc.object().set(wrapper);
|
||||
|
||||
// All properties on cross-origin DOM objects are non-enumerable and
|
||||
// "configurable". Any value attributes are read-only.
|
||||
desc.attributesRef() &= ~JSPROP_ENUMERATE;
|
||||
desc.attributesRef() &= ~JSPROP_PERMANENT;
|
||||
if (!desc.getter() && !desc.setter())
|
||||
desc.attributesRef() |= JSPROP_READONLY;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче