Bug 12987 - Fix and import 4XPath test_numeric_expr.html
Summary: Fix and import 4XPath test_numeric_expr.html
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks: 12953
  Show dependency treegraph
 
Reported: 2007-03-06 10:54 PST by Alexey Proskuryakov
Modified: 2007-03-06 22:19 PST (History)
0 users

See Also:


Attachments
proposed fix (39.32 KB, patch)
2007-03-06 11:09 PST, Alexey Proskuryakov
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2007-03-06 10:54:55 PST
P1, because one of the problems is a crasher. Patch forthcoming.
Comment 1 Alexey Proskuryakov 2007-03-06 11:09:26 PST
Created attachment 13491 [details]
proposed fix

Not converting to DeprecatedString in Value::toNumber() helps because DeprecatedString::ascii() has an apparent bug: all characters above 0xFF are converted to \0, so toDouble("\u2022abc") returns 0 instead of failure.

I thought about fixing this globally, but the problem is deep inside DeprecatedStringData:makeAscii(), and changing it now seems too dangerous to me.
Comment 2 Sam Weinig 2007-03-06 20:26:17 PST
Comment on attachment 13491 [details]
proposed fix

This looks good.  I am not sure whether putting a comment in DeprecatedString is worth it (since it is deprecated), but perhaps noting the bug in source might be a good idea.

r=me!
Comment 3 Alexey Proskuryakov 2007-03-06 22:19:49 PST
Committed revision 20008.