[Webkit-unassigned] [Bug 138858] New: Updating an immutable binding does not throw a TypeError exception in a strict mode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 18 19:05:53 PST 2014


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

            Bug ID: 138858
           Summary: Updating an immutable binding does not throw a
                    TypeError exception in a strict mode
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Macintosh Intel
                OS: Mac OS X 10.9
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: daejunpark at gmail.com

In a strict mode, it should throw a TypeError exception, when attempting to update an immutable binding, but Safari does not.

According to ES5, Section 10.2.1.1.3 SetMutableBinding (N,V,S), Step 4,
http://es5.github.io/#x10.2.1.1.3

the following code is supposed to throw a TypeError exception, since "g" is an immutable binding inside the function body (according to ES5, Section 13 Function Definition, Step 3 of the third block).

"use strict";
var f = function g() {
  g = 0;
}; 
f(); // 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

-- 
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/8dac9fb3/attachment-0002.html>


More information about the webkit-unassigned mailing list