In a strict mode, it should throw a TypeError exception, when attempting to update a non-writable property of a coerced primitive object, but Safari does not. According to ES5, Section 8.7.2 PutValue (V, W), [[Put]] internal method, Step 2.a, http://es5.github.io/#x8.7.2 the following code is supposed to throw a TypeError exception, since "x" is not writable in the coerced number object for "1": "use strict"; Object.defineProperty(Number.prototype, "x", { "value" : 0, "writable" : false, "enumerable" : true, "configurable" : true }); 1["x"] = 10; // TypeError However, Safari does not report any exception, while Firefox correctly throws a TypeError exception. I've tested this using the Web Inspector console of Safari 7.0.4. Thanks, Daejun
I'm sorry for the noise. It turns out that I've missed how Web Inspector works. The above example works correctly when I wrapped the code with a function, ensuring the strict mode, as follows: function f() { "use strict"; Object.defineProperty(Number.prototype, "x", { "value" : 0, "writable" : false, "enumerable" : true, "configurable" : true }); 1["x"] = 10; // TypeError } f(); I close this issue. Thanks, Daejun