[Webkit-unassigned] [Bug 209467] REGRESSION(r258871): [GTK] test bot exiting early due to too many crashes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 24 09:13:10 PDT 2020


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

--- Comment #4 from Darin Adler <darin at apple.com> ---
Should be trivial to fix. Presumably the it’s dereferencing a null pointer. I think this code needs checks for null:

    postLayoutData.surroundingContextCursorPosition = characterCount(*makeRange(surroundingStart, selectionStart));
    postLayoutData.surroundingContextSelectionPosition = characterCount(*makeRange(surroundingStart, selection.visibleEnd()));

If surroundingStart, selectionStart, or selection.visibleEnd is null, then we can’t call characterCount. Maybe have it be zero instead. Simplest change is probably this:

    if (surroundingStart.isNull() || selectionStart.isNull())
        postLayoutData.surroundingContextCursorPosition = 0;
    else
        postLayoutData.surroundingContextCursorPosition = characterCount(*makeRange(surroundingStart, selectionStart));

Then something similar for surroundingContextSelectionPosition.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200324/c90cc7ea/attachment.htm>


More information about the webkit-unassigned mailing list