Fix bug Bug 443491 for an assignment to a property with only a getter defined, the assignment should cancel out the getter
git-svn-id: svn://10.0.0.236/trunk@252841 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user