Status: New
Owner: ----
New issue 3702 by [email protected]: Updating a non-writiable property
of a coerced primitive object does not throw a TypeError exception in a
strict mode
https://code.google.com/p/v8/issues/detail?id=3702
In a strict mode, it should throw a TypeError exception, when attempting to
update a non-writiable property of a coerced primitive object, but v8 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, but v8 does
not, while SpiderMonkey correctly throws the exception:
"use strict";
Object.defineProperty(Number.prototype, "x", { "value" : 0, "writable" :
false, "enumerable" : true, "configurable" : true });
1["x"] = 10; // TypeError
I've tested this using the JavaScript console of Chrome 38.0.2125.122.
Thanks,
Daejun
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.