Bug 26360

Summary: UString shouldn't create sharedBuffer for SmallStrings.
Product: WebKit Reporter: David Levin <levin>
Component: JavaScriptCoreAssignee: David Levin <levin>
Status: RESOLVED FIXED    
Severity: Normal CC: atwilson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed fix. darin: review+

David Levin
Reported 2009-06-12 16:18:58 PDT
The problem is that UString::sharedBuffer() is using the length of the BaseString which is 256 for SmallStrings as opposed to Rep::len, the length of the string being shared (which is 1 for SmallStrings).
Attachments
Proposed fix. (5.62 KB, patch)
2009-06-12 16:32 PDT, David Levin
darin: review+
David Levin
Comment 1 2009-06-12 16:32:58 PDT
Created attachment 31220 [details] Proposed fix.
David Levin
Comment 2 2009-06-12 17:53:12 PDT
Committed as http://trac.webkit.org/changeset/44641. And a follow up change to fix the dll exports on windows: http://trac.webkit.org/changeset/44642
Note You need to log in before you can comment on or make changes to this bug.