BUG=http://code.google.com/p/v8/issues/detail?id=809
TEST=Seal/freeze an object and check if Object.seal and Object.freeze returns the given object.
Burcu Dogan <burcujdogan@gmail.com>
Review URL: http://codereview.chromium.org/
3056049
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5176
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
Rodolph Perfetta <rodolph.perfetta@arm.com>
Ryan Dahl <coldredlemur@gmail.com>
Subrato K De <subratokde@codeaurora.org>
+Burcu Dogan <burcujdogan@gmail.com>
if (desc.isConfigurable()) desc.setConfigurable(false);
DefineOwnProperty(obj, name, desc, true);
}
- ObjectPreventExtension(obj);
+ return ObjectPreventExtension(obj);
}
if (desc.isConfigurable()) desc.setConfigurable(false);
DefineOwnProperty(obj, name, desc, true);
}
- ObjectPreventExtension(obj);
+ return ObjectPreventExtension(obj);
}
Object.preventExtensions(obj5);
assertFalse(Object.isFrozen(obj5));
+
+// Make sure that Object.freeze returns the frozen object.
+var obj6 = {}
+assertTrue(obj6 === Object.freeze(obj6))
Object.preventExtensions(obj4);
assertFalse(Object.isSealed(obj4));
+
+// Make sure that Object.seal returns the sealed object.
+var obj4 = {}
+assertTrue(obj4 === Object.seal(obj4))