Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Unified Diff: test/mjsunit/getter-in-prototype.js

Issue 6451004: Propagate exceptions thrown when setting elements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()");

Powered by Google App Engine
This is Rietveld 408576698