зеркало из https://github.com/mozilla/pjs.git
Fix bug Bug 443491 for an assignment to a property with only a getter defined, the assignment should cancel out the getter
This commit is contained in:
Родитель
03fb0e0b51
Коммит
48da715e4b
|
@ -2067,7 +2067,11 @@ public abstract class ScriptableObject implements Scriptable, Serializable,
|
|||
return true;
|
||||
if (slot instanceof GetterSlot) {
|
||||
Object setterObj = ((GetterSlot)slot).setter;
|
||||
if (setterObj != null) {
|
||||
if (setterObj == null) {
|
||||
// Odd case: Assignment to a property with only a getter
|
||||
// defined. The assignment cancels out the getter.
|
||||
((GetterSlot)slot).getter = null;
|
||||
} else {
|
||||
Context cx = Context.getContext();
|
||||
if (setterObj instanceof MemberBox) {
|
||||
MemberBox nativeSetter = (MemberBox)setterObj;
|
||||
|
|
Загрузка…
Ссылка в новой задаче