mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
cb240a8164
commit
dcf0aa1c00
@ -167,12 +167,16 @@ XPCWrapper::NewResolve(JSContext *cx, JSObject *wrapperObj,
|
|||||||
}
|
}
|
||||||
|
|
||||||
JSBool isXOW = (JS_GET_CLASS(cx, wrapperObj) == &sXPC_XOW_JSClass.base);
|
JSBool isXOW = (JS_GET_CLASS(cx, wrapperObj) == &sXPC_XOW_JSClass.base);
|
||||||
JSScopeProperty *sprop = reinterpret_cast<JSScopeProperty *>(prop);
|
uintN attrs = JSPROP_ENUMERATE;
|
||||||
uintN attrs = sprop->attrs;
|
if (OBJ_IS_NATIVE(innerObjp)) {
|
||||||
if ((preserveVal || isXOW) &&
|
JSScopeProperty *sprop = reinterpret_cast<JSScopeProperty *>(prop);
|
||||||
SPROP_HAS_VALID_SLOT(sprop, OBJ_SCOPE(innerObjp))) {
|
attrs = sprop->attrs;
|
||||||
v = OBJ_GET_SLOT(cx, innerObjp, sprop->slot);
|
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);
|
OBJ_DROP_PROPERTY(cx, innerObjp, prop);
|
||||||
|
|
||||||
// Hack alert: we only do this for same-origin calls on XOWs: we want
|
// Hack alert: we only do this for same-origin calls on XOWs: we want
|
||||||
|
Loading…
Reference in New Issue
Block a user