[Webkit-unassigned] [Bug 70215] Generate WebKitCSSMatrix constructor for JSC by [Constructor] IDL

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 26 19:56:57 PDT 2011


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





--- Comment #5 from Kentaro Hara <haraken at chromium.org>  2011-10-26 19:56:57 PST ---
(From update of attachment 111545)
View in context: https://bugs.webkit.org/attachment.cgi?id=111545&action=review

>> Source/JavaScriptCore/runtime/JSString.h:712
>> +            return UString();
> 
> This is wrong.  The empty value JSValue should be treated like a null pointer, and you should never call functions on it.

Thanks, sam!

However, toNumber(), toFloat(), toInt32(), toUInt32() and toInteger() return 0 when an empty value is passed to them. Specifically, in case of the empty value, those methods fallback to JSValue::toNumberSlowCase(), which returns 0. toBoolean() returns false when the empty value is passed. Judging from these behaviors, I guess that it would make sense to return the "default value" of the given type when the empty value is passed. If so, returning UString() from toString() would also make sense. 

Why do you think that the empty value should be treated like a null pointer?

-- 
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