Bug 597114 - Actually pass the new value when calling setters and set argc correctly. r=gal

--HG--
extra : rebase_source : 596c02dff54a3608eba86213e4a80d97bf0f297b
This commit is contained in:
Blake Kaplan 2010-09-16 11:43:33 -07:00
parent a49526d99e
commit 67c5e81443

View File

@ -127,7 +127,7 @@ JSProxyHandler::get(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id,
}
if (desc.attrs & JSPROP_GETTER) {
return ExternalGetOrSet(cx, proxy, id, CastAsObjectJsval(desc.getter),
JSACC_READ, 0, 0, vp);
JSACC_READ, 0, NULL, vp);
}
if (desc.attrs & JSPROP_SHORTID)
id = INT_TO_JSID(desc.shortid);
@ -146,7 +146,7 @@ JSProxyHandler::set(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id,
if (desc.setter && ((desc.attrs & JSPROP_SETTER) || desc.setter != PropertyStub)) {
if (desc.attrs & JSPROP_SETTER) {
return ExternalGetOrSet(cx, proxy, id, CastAsObjectJsval(desc.setter),
JSACC_READ, 0, 0, vp);
JSACC_WRITE, 1, vp, vp);
}
if (desc.attrs & JSPROP_SHORTID)
id = INT_TO_JSID(desc.shortid);
@ -163,7 +163,7 @@ JSProxyHandler::set(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id,
if (desc.setter && ((desc.attrs & JSPROP_SETTER) || desc.setter != PropertyStub)) {
if (desc.attrs & JSPROP_SETTER) {
return ExternalGetOrSet(cx, proxy, id, CastAsObjectJsval(desc.setter),
JSACC_READ, 0, 0, vp);
JSACC_WRITE, 1, vp, vp);
}
if (desc.attrs & JSPROP_SHORTID)
id = INT_TO_JSID(desc.shortid);