Bug 128204 - Functions cannot freeze themselves.
Summary: Functions cannot freeze themselves.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://jsfiddle.net/q2FAC/
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-04 12:51 PST by bsw
Modified: 2014-02-05 15:07 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bsw 2014-02-04 12:51:53 PST
If a function calls Object.freeze on itself, the call errors with "[Error] TypeError: Attempting to change value of a readonly property."

Example:

function freezeIt(obj) {
    Object.freeze(obj);
}

freezeIt(freezeIt);


This is inconsistent both with the ECMA specification and with the behavior in Chrome/V8.