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:
nboyd%atg.com
2008-07-03 20:16:59 +00:00
parent a972b43fbc
commit 73e6d8be93

View File

@@ -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;