Bug 558249 - Followup fixes to bug 550402 to record setting getter-only properties better. r=jorendorff

--HG--
extra : rebase_source : 0cfef9aca97c243b1d45e5b6e4d68181cd3cea5c
This commit is contained in:
Jeff Walden 2010-04-12 11:11:33 -07:00
Родитель f28d6cecc9
Коммит 4d852b3582
2 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -5021,6 +5021,8 @@ js_SetPropertyHelper(JSContext *cx, JSObject *obj, jsid id, uintN defineHow,
if (sprop->isAccessorDescriptor()) {
if (sprop->hasDefaultSetter()) {
JS_UNLOCK_SCOPE(cx, scope);
if (defineHow & JSDNP_CACHE_RESULT)
TRACE_2(SetPropHit, JS_NO_PROP_CACHE_FILL, sprop);
return js_ReportGetterOnlyAssignment(cx);
}
} else {

Просмотреть файл

@ -0,0 +1,5 @@
var o = { get x() { return 17; } };
for (var j = 0; j < 5; ++j)
o.x = 42;
assertEq(true, true);