[Webkit-unassigned] [Bug 138857] Updating a non-writable property of a coerced primitive object does not throw a TypeError exception in a strict mode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 19 10:06:57 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=138857

Daejun Park <daejunpark at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Daejun Park <daejunpark at gmail.com> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141119/aabc605d/attachment-0002.html>


More information about the webkit-unassigned mailing list