mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix bogus assert when using SETMETHOD on a property with a setter, bug 559912. r=brendan
This commit is contained in:
parent
7a459eb198
commit
2f26f4e870
12
js/src/jit-test/tests/basic/bug559912.js
Normal file
12
js/src/jit-test/tests/basic/bug559912.js
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
function s(f) { this._m = f; }
|
||||
function C() {
|
||||
Object.defineProperty(this, "m", {set: s});
|
||||
this.m = function () {};
|
||||
}
|
||||
var last = {};
|
||||
for (var i = 0; i < 20; i++) {
|
||||
var a = new C;
|
||||
assertEq(a._m === last._m, false);
|
||||
last = a;
|
||||
}
|
@ -5515,7 +5515,6 @@ js_SetPropertyHelper(JSContext *cx, JSObject *obj, jsid id, uintN defineHow,
|
||||
return false;
|
||||
|
||||
JS_ASSERT(IsFunctionObject(*vp));
|
||||
JS_ASSERT(!(attrs & (JSPROP_GETTER | JSPROP_SETTER)));
|
||||
|
||||
JSObject *funobj = &vp->toObject();
|
||||
JSFunction *fun = GET_FUNCTION_PRIVATE(cx, funobj);
|
||||
|
Loading…
Reference in New Issue
Block a user