зеркало из https://github.com/mozilla/gecko-dev.git
Bug 399094 - "Wrappers don't deal with non-native objects". Patch by Blake Kaplan <mrbkap@gmail.com>, r+sr+a=jst.
This commit is contained in:
Родитель
c12daf308c
Коммит
be75612c31
|
@ -167,12 +167,16 @@ XPCWrapper::NewResolve(JSContext *cx, JSObject *wrapperObj,
|
|||
}
|
||||
|
||||
JSBool isXOW = (JS_GET_CLASS(cx, wrapperObj) == &sXPC_XOW_JSClass.base);
|
||||
JSScopeProperty *sprop = reinterpret_cast<JSScopeProperty *>(prop);
|
||||
uintN attrs = sprop->attrs;
|
||||
if ((preserveVal || isXOW) &&
|
||||
SPROP_HAS_VALID_SLOT(sprop, OBJ_SCOPE(innerObjp))) {
|
||||
v = OBJ_GET_SLOT(cx, innerObjp, sprop->slot);
|
||||
}
|
||||
uintN attrs = JSPROP_ENUMERATE;
|
||||
if (OBJ_IS_NATIVE(innerObjp)) {
|
||||
JSScopeProperty *sprop = reinterpret_cast<JSScopeProperty *>(prop);
|
||||
attrs = sprop->attrs;
|
||||
if ((preserveVal || isXOW) &&
|
||||
SPROP_HAS_VALID_SLOT(sprop, OBJ_SCOPE(innerObjp))) {
|
||||
v = OBJ_GET_SLOT(cx, innerObjp, sprop->slot);
|
||||
}
|
||||
}
|
||||
|
||||
OBJ_DROP_PROPERTY(cx, innerObjp, prop);
|
||||
|
||||
// Hack alert: we only do this for same-origin calls on XOWs: we want
|
||||
|
|
Загрузка…
Ссылка в новой задаче