Review Request: kjs: All prototype constructor should be [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true

Maks Orlovich maksim at kde.org
Sat Apr 21 16:33:40 BST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104680/#review12762
-----------------------------------------------------------

Ship it!



kjs/interpreter.cpp
<http://git.reviewboard.kde.org/r/104680/#comment9976>

    These are not properties of the global object, though. These are the .constructor properties of the prototypes --- that is, these are not thing like "SyntaxError" (which is set above, in line 424), but rather "SyntaxError.prototype.constructor". Yes, those properties refer to the same object, but they're set on different things 
    (global/[Window] vs. SyntaxError.prototype).
    
    I think the rule that can justify this is actually in 15 (without any dot):
    "Every other property described in this 
    clause has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified"
    
    Looks good other than, so please just fix your changelog :)
    


- Maks Orlovich


On April 19, 2012, 7:41 p.m., Bernd Buschinski wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104680/
> -----------------------------------------------------------
> 
> (Updated April 19, 2012, 7:41 p.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Description
> -------
> 
> kjs: All prototype constructor should be [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true
> 
> 
> As said in ECMA Edition 5.1r6 - 15.1:
> 
> "Unless otherwise specified, the standard built-in properties of the global object have attributes {[[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}."
> 
> And it is not otherwise specified.
> 
> 
> Diffs
> -----
> 
>   kjs/interpreter.cpp cf1acf1 
> 
> Diff: http://git.reviewboard.kde.org/r/104680/diff/
> 
> 
> Testing
> -------
> 
> Confirmed by ecmascript tests checking the attributes of *.prototype.constrictor with Object.getOwnPropertyDescriptor
> like
> Object.getOwnPropertyDescriptor(Date.prototype, "constructor");
> 
> 
> Thanks,
> 
> Bernd Buschinski
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120421/a05351c8/attachment.htm>


More information about the kde-core-devel mailing list