Index: test/mjsunit/getter-in-prototype.js |
diff --git a/test/mjsunit/getter-in-prototype.js b/test/mjsunit/getter-in-prototype.js |
index dd26c533194c03b7703739d068ac095b48cb94c0..2c13573be402f5899779b4f0e2484622bb606fed 100644 |
--- a/test/mjsunit/getter-in-prototype.js |
+++ b/test/mjsunit/getter-in-prototype.js |
@@ -48,3 +48,20 @@ function g() { |
x = 42; |
} |
assertThrows("g()"); |
+ |
+p.__defineGetter__(0, function(){}); |
+ |
+assertThrows("o[0] = 42"); |
+ |
+function f2() { |
+ with(o) { |
+ this[0] = 42; |
Lasse Reichstein
2011/02/08 14:17:56
I would think "this" here refers to the global obj
antonm
2011/02/08 14:30:21
Very good catch. That works as we set p to be a p
|
+ } |
+} |
+assertThrows("f2()"); |
+ |
+__proto__ = p; |
+function g2() { |
+ this[0] = 42; |
+} |
+assertThrows("g2()"); |