Bug 48689
Summary: | ES5 Strict mode: `arguments' identifier in strict mode is immutable | ||
---|---|---|---|
Product: | WebKit | Reporter: | Asen Bozhilov <asen.bozhilov> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | oliver |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Linux |
Asen Bozhilov
/**
* For strict mode functions, if an arguments object is created the binding of the local identifier
* arguments to the arguments object is immutable and hence may not be the target of an
* assignment expression. (10.5).
*/
var testDesc = 'In function body assigning value of arguments must produce an Error: ';
function F(arg, arg1, arg2) {
'use strict';
arguments = false;
};
try {
F(1, 2, 3);
util.printLine(testDesc + 'FALSE');
} catch (e) {
util.printLine(testDesc + 'TRUE');
}
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Asen Bozhilov
Great work WebKit! I've made 53 tests. There is only one fail and one test which cannot be done with current state of WebKit. You can see the test cases:
http://github.com/abozhilov/strict-tester-
Asen Bozhilov
The proper url is: http://github.com/abozhilov/strict-tester-/tree/
Oliver Hunt
I fixed this some time ago due to another report