[Webkit-unassigned] [Bug 48632] New: ES5 Strict mode: Assignment to property with [[Writable]] false must produce a TypeError
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 29 07:03:01 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=48632
Summary: ES5 Strict mode: Assignment to property with
[[Writable]] false must produce a TypeError
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: asen.bozhilov at gmail.com
The follow test case has been used:
/**
* Assignment to an undeclared identifier or otherwise unresolvable reference does not create a
* property in the global object. When a simple assignment occurs within strict mode code, its
* LeftHandSide must not evaluate to an unresolvable Reference. If it does a ReferenceError
* exception is thrown (8.7.2). The LeftHandSide also may not be a reference to a data property
* with the attribute value {[[Writable]]:false}, to an accessor property with the attribute value
* {[[Set]]:undefined}, nor to a non-existent property of an object whose [[Extensible]] internal
* property has the value false. In these cases a TypeError exception is thrown (11.13.1).
*/
var testDesc = 'Assignment to property with [[Writable]] false must produce a TypeError: ';
try {
eval('"use strict"; (function(){}).length = 20;');
util.printLine(testDesc + 'FALSE');
} catch (e) {
if (e instanceof TypeError) {
util.printLine(testDesc + 'TRUE');
}
else {
util.printLine(testDesc + 'UNDEFINED BEHAVIOR');
}
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list