[webkit-reviews] review granted: [Bug 120314] Object.defineProperty should be able to create a PropertyDescriptor where m_attributes == 0 : [Attachment 209660] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 26 10:15:01 PDT 2013
Darin Adler <darin at apple.com> has granted Mark Hahnenberg
<mhahnenberg at apple.com>'s request for review:
Bug 120314: Object.defineProperty should be able to create a PropertyDescriptor
where m_attributes == 0
https://bugs.webkit.org/show_bug.cgi?id=120314
Attachment 209660: Patch
https://bugs.webkit.org/attachment.cgi?id=209660&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=209660&action=review
> Source/JavaScriptCore/ChangeLog:17
> + This is due to the fact that the lowest non-zero attribute
(ReadOnly) is represented as 1 << 1
> + instead of 1 << 0. We then calculate the default attributes as ((1
<< 3) << 1) - 1, which is 0xF,
> + but only the top three bits mean anything. Even in the case above,
the top three bits are set
> + to 0 but the bottom bit remains set, which causes us to think
m_attributes is non-zero.
I think the real problem is in the code that calculates the default attributes.
Where is that code? Is there some reason it has to do "((1 << 3) << 1) - 1"
instead of just or'ing together the specific attributes?
More information about the webkit-reviews
mailing list