[Webkit-unassigned] [Bug 71208] New: StringImpl::empty() should have a 8-bit version
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Oct 31 00:47:23 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=71208
Summary: StringImpl::empty() should have a 8-bit version
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: Web Template Framework
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: wangxianzhu at chromium.org
CC: darin at apple.com, ggaren at apple.com, msaboff at apple.com,
sullivan at chromium.org
For now, some 8-bit version of static member function of StringImpl returns empty() which for now has only a 16-bit version. This will cause problems in the following scenario:
RefPtr<StringImpl> s(StringImpl::create8(""));
s.characters8(); // Assertion fails
I thought of two solutions:
1. Add StringImpl::empty8() which is the 8-bit version of StringImpl::empty();
2. Add StringImpl::is16Bit(). For empty strings, both is8Bit() and is16Bit() returns true. Change all ASSERT(!is8Bit()) to ASSERT(is16Bit()).
I prefer the second way because all existing callers of empty() could remain unchanged.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list