Summary: | tryMakeString should fail on error in length calculation | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Gavin Barraclough <barraclough> | ||||
Component: | JavaScriptCore | Assignee: | Gavin Barraclough <barraclough> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | ||||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Gavin Barraclough
2010-02-15 10:51:33 PST
Created attachment 48759 [details]
The patch
No perf impact.
Comment on attachment 48759 [details]
The patch
r=me
Sending JavaScriptCore/ChangeLog Sending JavaScriptCore/runtime/UString.h Transmitting file data .. Committed revision 54788. Errk! - thanks darin/aroben, made the output bool a reference in r54795. Darin - I will separately check the performance of using |=. My instinct is often to go with the branch, since on x86 the setcc instruction used to be multiple cycle, and a well predicted branch can be free. In this case there may be little performance difference, since I don't think makeString is heavily used or performance critical. As such perhaps I should switch to |=, since it's a line shorter. :o) |