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

Unified Diff: test/mjsunit/indexed-accessors.js

Issue 7064027: Change calls to undefined property setters to not throw (fixes issue 1355). (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « test/mjsunit/getter-in-prototype.js ('k') | test/mjsunit/regress/regress-1355.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/indexed-accessors.js
===================================================================
--- test/mjsunit/indexed-accessors.js (revision 8026)
+++ test/mjsunit/indexed-accessors.js (working copy)
@@ -81,10 +81,11 @@
expected[0] = 111;
testArray();
-// Using a setter where only a getter is defined throws an exception.
+// Using a setter where only a getter is defined does not throw an exception,
+// unless we are in strict mode.
var q = {};
q.__defineGetter__('0', function() { return 42; });
-assertThrows('q[0] = 7');
+assertDoesNotThrow('q[0] = 7');
// Using a getter where only a setter is defined returns undefined.
var q1 = {};
« no previous file with comments | « test/mjsunit/getter-in-prototype.js ('k') | test/mjsunit/regress/regress-1355.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698