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+

Description David Levin 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).
Comment 1 David Levin 2009-06-12 16:32:58 PDT
Created attachment 31220 [details]
Proposed fix.
Comment 2 David Levin 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