Index: test/mjsunit/object-freeze.js |
=================================================================== |
--- test/mjsunit/object-freeze.js (revision 7276) |
+++ test/mjsunit/object-freeze.js (working copy) |
@@ -70,12 +70,8 @@ |
assertFalse(Object.isExtensible(obj)); |
assertTrue(Object.isFrozen(obj)); |
-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'); |
assertFalse(desc.writable); |
@@ -88,7 +84,7 @@ |
assertEquals("foobar", desc.value); |
// Make sure that even if we try overwrite a value that is not writable, it is |
-// not changed. |
+// not changed. |
obj.x = "tete"; |
assertEquals(42, obj.x); |
obj.x = { get: function() {return 43}, set: function() {} }; |
@@ -118,12 +114,8 @@ |
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 freeze on arrays. |