[Webkit-unassigned] [Bug 22654] BooleanObject does not override toBoolean()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 5 02:37:19 PST 2008


https://bugs.webkit.org/show_bug.cgi?id=22654


tavestbo at trolltech.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Wrong behavior of           |BooleanObject does not
                   |toBoolean() of BooleanObject|override toBoolean()




------- Comment #4 from tavestbo at trolltech.com  2008-12-05 02:37 PDT -------
Alexey, what I think Jade is referring to here is the fact that JSObject
defines toBoolean() as always returning true, while neither JSWrapperObject or
BooleanObject override this method. 

Meaning, in native code, to evaluate a BooleanObject value you can't to
toBoolean(), you need to call asBooleanObject(value)->internalValue() first,
and then toBoolean on that, which seems strange.

So, should BooleanObject override toBoolean() to use the internal value? Or
should this perhaps be in JSWrapperObject, by forwarding the various toType
functions to internalValue()? 


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list