QScriptValue::toBool (and toBoolean) returns a bad value for a numbers like 0, NaN and for an empty strings.
Created attachment 48485 [details] Fix v1
Comment on attachment 48485 [details] Fix v1 LGTM
Comment on attachment 48485 [details] Fix v1 Clearing flags on attachment: 48485 Committed r54605: <http://trac.webkit.org/changeset/54605>
All reviewed patches have been landed. Closing bug.