[Webkit-unassigned] [Bug 78435] UString.h will crash if is8bit is checked and UString::isNull() == true

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 13 16:05:42 PST 2012


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





--- Comment #14 from Benjamin Poulain <benjamin at webkit.org>  2012-02-13 16:05:41 PST ---
(In reply to comment #13)
> > In bug 77593, we didn't add a null check because it's not there by design, for better performance. Sadly, this discussion was not captured in the bug, it was on IRC.
> 
> I wasn't privy to that discussion, but considering performance, I still think the null check is the right move.
> 
> All C++ code that checks is8Bit() goes on to dereference the string, which checks for NULL. I'd expect the standard control-flow analysis in any optimizing compiler to merge the two NULL checks, resulting in no runtime performance cost.

In my opinion, either is8Bit() should have the null check, or characters8() and characters16() should have their null check removed. 

The problem was not so much against adding the null check, but about making sure this does not causes any regression.
This has impact on the whole codebase. I had no time to ensure no regressions are introduced, so we fixed the bug the same way this problem is solved everywhere else.

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