Index: test/mjsunit/object-define-property.js |
diff --git a/test/mjsunit/object-define-property.js b/test/mjsunit/object-define-property.js |
index 835d0e0a558895c882fa3071c1f777291064a641..cbb2d211f443523127d89df2c238578cae6b329e 100644 |
--- a/test/mjsunit/object-define-property.js |
+++ b/test/mjsunit/object-define-property.js |
@@ -1195,3 +1195,12 @@ Assign(new C); |
%OptimizeFunctionOnNextCall(Assign); |
Object.defineProperty(C.prototype, "blubb", {get: function() { return -42; }}); |
Assign(new C); |
+ |
+// Test that changes to the prototype of a simple constructor are not ignored, |
+// even after creating initial instances. |
+function C() { |
+ this.x = 23; |
+} |
+assertEquals(23, new C().x); |
+C.prototype.__defineSetter__('x', function(value) { this.y = 23; }); |
+assertEquals(void 0, new C().x); |