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

Unified Diff: test/mjsunit/object-seal.js

Issue 6712059: Follow jsc on not throwing when trying to add a property to a non-extensible object. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 9 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/object-seal.js
===================================================================
--- test/mjsunit/object-seal.js (revision 7276)
+++ test/mjsunit/object-seal.js (working copy)
@@ -75,12 +75,8 @@
assertFalse(Object.isFrozen(obj));
// We should not allow new properties to be added.
-try {
- obj.foo = 42;
- assertUnreachable();
-} catch(e) {
- assertTrue(/object is not extensible/.test(e));
-}
+obj.foo = 42;
+assertEquals(obj.foo, undefined);
desc = Object.getOwnPropertyDescriptor(obj, 'x');
assertTrue(desc.writable);
@@ -125,14 +121,9 @@
assertEquals(set, desc.set);
assertEquals(get, desc.get);
-try {
- obj2.foo = 42;
- assertUnreachable();
-} catch(e) {
- assertTrue(/object is not extensible/.test(e));
-}
+obj2.foo = 42;
+assertEquals(obj2.foo, undefined);
-
// Test seal on arrays.
var arr = new Array(42,43);

Powered by Google App Engine
This is Rietveld 408576698