Bug 26600 - StringImpl::copy() no longer copies empty string correctly
: StringImpl::copy() no longer copies empty string correctly
Status: RESOLVED FIXED
: WebKit
Platform
: 528+ (Nightly build)
: Macintosh Mac OS X 10.5
: P2 Critical
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-06-22 00:54 PST by
Modified: 2009-06-25 21:27 PST (History)


Attachments
proposed fix (1.63 KB, patch)
2009-06-22 12:11 PST, Alexey Proskuryakov
levin: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-06-22 00:54:30 PST
StringImpl::copy() should not ever return per-thread empty string, because this function's result is for using on other threads.

This was broken in <http://trac.webkit.org/changeset/41917> - StringImpl::create() has a special case for empty strings, so calling it is not appropriate.
------- Comment #1 From 2009-06-22 12:11:52 PST -------
Created an attachment (id=31663) [details]
proposed fix
------- Comment #2 From 2009-06-22 13:14:51 PST -------
Committed revision 44952.
------- Comment #3 From 2009-06-25 21:27:02 PST -------
See <rdar://6964477> and its duplicates.