| Index: test/mjsunit/object-freeze.js
|
| ===================================================================
|
| --- test/mjsunit/object-freeze.js (revision 8618)
|
| +++ test/mjsunit/object-freeze.js (working copy)
|
| @@ -32,21 +32,25 @@
|
| // Test that we throw an error if an object is not passed as argument.
|
| var non_objects = new Array(undefined, null, 1, -1, 0, 42.43);
|
| for (var key in non_objects) {
|
| + var exception = false;
|
| try {
|
| Object.freeze(non_objects[key]);
|
| - assertUnreachable();
|
| } catch(e) {
|
| + exception = true;
|
| assertTrue(/Object.freeze called on non-object/.test(e));
|
| }
|
| + assertTrue(exception);
|
| }
|
|
|
| for (var key in non_objects) {
|
| + exception = false;
|
| try {
|
| Object.isFrozen(non_objects[key]);
|
| - assertUnreachable();
|
| } catch(e) {
|
| + exception = true;
|
| assertTrue(/Object.isFrozen called on non-object/.test(e));
|
| }
|
| + assertTrue(exception);
|
| }
|
|
|
| // Test normal data properties.
|
|
|