[Webkit-unassigned] [Bug 88936] StringImpl::characters can return NULL for an empty string

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 12 16:50:29 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=88936





--- Comment #2 from Myles C. Maxfield <mmaxfield at google.com>  2012-06-12 16:50:29 PST ---
This is pretty hacky, but I'm not sure I can think of a better way.

Callers of characters() shouldn't be free()ing the pointer, so this should be relatively safe.

One alternative would be to assign a non-NULL value to the m_copyData16 variable, and check for it on destruction, but I think this is a little cleaner. 

Another alternative would be to add a "is-valid" byte to each string, but the overhead of an extra byte to each string is probably not worth it.

If a reviewer can think of a less-hacky way to handle this, I'd be happy to do that instead.

-- 
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