object Object.freeze(O:object) throws TypeError
This is basically the same as Object.seal except the [[Writable]] attribute of all properties are also set to false. This makes the object O fairly immutable.
Object.freeze = function(O){
if (Type(O) != 'Object') throw TypeError;
for (P in O) {
var desc = O.[[GetOwnProperty]](P);
if (IsDataDescriptor(desc) && desc.[[Writable]]) desc.[[Writable]] = false;
if (desc.[[Configurable]]) desc.[[Configurable]] = false;
O.[[DefineOwnProperty]](P, desc, true);
}
return O;
}