Bug 128204
| Summary: | Functions cannot freeze themselves. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | bsw |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | bsw, ggaren, oliver |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://jsfiddle.net/q2FAC/ | ||
bsw
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |