[Webkit-unassigned] [Bug 39958] [Qt] TextBreakIteratorQt performance

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 1 03:22:08 PDT 2010


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





--- Comment #12 from Simon Hausmann <hausmann at webkit.org>  2010-06-01 03:22:07 PST ---
(From update of attachment 57508)
WebCore/platform/text/qt/TextBreakIteratorQt.cpp:40
 +      static const UChar* previousstring;
The main problem I see with this patch is that this variable becomes a dangling pointer. There is _no_ guarantee at all that the caller of the text iterator functions isn't going to free the memory later. I'm convinced that this is going to cause random crashes at run-time.

One solution I think would be to "fix" the caller side in WebKit to re-use iterator objects - as one way to avoid repeated text analysis. An alternative would be to improve QTextBoundaryFinder to perform the analysis lazily and from within the string and not always from the start.

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