Index: test/mjsunit/harmony/computed-property-names.js |
diff --git a/test/mjsunit/harmony/computed-property-names.js b/test/mjsunit/harmony/computed-property-names.js |
index 69360771c149006cfbde1fed952a49da27fe2608..36e141116930c7d028f2bffbdadaff1bc536e994 100644 |
--- a/test/mjsunit/harmony/computed-property-names.js |
+++ b/test/mjsunit/harmony/computed-property-names.js |
@@ -277,3 +277,26 @@ function ID(x) { |
assertEquals('X', object.x); |
assertEquals(proto, Object.getPrototypeOf(object)); |
})(); |
+ |
+ |
+(function TestExceptionInName() { |
+ function MyError() {}; |
+ function throwMyError() { |
+ throw new MyError(); |
+ } |
+ assertThrows(function() { |
+ var o = { |
+ [throwMyError()]: 42 |
+ }; |
+ }, MyError); |
+ assertThrows(function() { |
+ var o = { |
+ get [throwMyError()]() { return 42; } |
+ }; |
+ }, MyError); |
+ assertThrows(function() { |
+ var o = { |
+ set [throwMyError()](_) { } |
+ }; |
+ }, MyError); |
+})(); |