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

Unified Diff: test/mjsunit/object-define-properties.js

Issue 8404030: Version 3.7.1 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 2 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/mjsunit.status ('k') | test/mjsunit/optimized-typeof.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/object-define-properties.js
===================================================================
--- test/mjsunit/object-define-properties.js (revision 9808)
+++ test/mjsunit/object-define-properties.js (working copy)
@@ -54,3 +54,19 @@
assertEquals(x.foo, 10);
assertEquals(x.bar, 42);
+
+
+// Make sure that all property descriptors are calculated before any
+// modifications are done.
+
+var object = {};
+
+assertThrows(function() {
+ Object.defineProperties(object, {
+ foo: { value: 1 },
+ bar: { value: 2, get: function() { return 3; } }
+ });
+ }, TypeError);
+
+assertEquals(undefined, object.foo);
+assertEquals(undefined, object.bar);
« no previous file with comments | « test/mjsunit/mjsunit.status ('k') | test/mjsunit/optimized-typeof.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698