зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
f28d6cecc9
Коммит
4d852b3582
|
@ -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);
|
Загрузка…
Ссылка в новой задаче