Bug 197012 - REGRESSION (r243926): [iOS] Release assertion when computing editor state during an overflow scroll triggered by layout
Summary: REGRESSION (r243926): [iOS] Release assertion when computing editor state dur...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-17 08:13 PDT by Wenson Hsieh
Modified: 2019-04-17 11:04 PDT (History)
6 users (show)

See Also:


Attachments
Fixes the bug (8.45 KB, patch)
2019-04-17 09:45 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2019-04-17 08:13:05 PDT
<rdar://problem/49908848>
Comment 1 Wenson Hsieh 2019-04-17 09:45:34 PDT
Created attachment 367635 [details]
Fixes the bug
Comment 2 Simon Fraser (smfr) 2019-04-17 10:01:34 PDT
Comment on attachment 367635 [details]
Fixes the bug

View in context: https://bugs.webkit.org/attachment.cgi?id=367635&action=review

> Source/WebKit/WebProcess/WebPage/WebPage.cpp:5295
>  void WebPage::didChangeSelection()
> +{
> +    didChangeSelectionOrOverflowScrollPosition(EditorStateUpdateScheduling::Immediate);
> +}

Don't we run the risk that callers of this will trigger the same release assert?
Comment 3 Wenson Hsieh 2019-04-17 10:03:53 PDT
(In reply to Simon Fraser (smfr) from comment #2)
> Comment on attachment 367635 [details]
> Fixes the bug
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=367635&action=review
> 
> > Source/WebKit/WebProcess/WebPage/WebPage.cpp:5295
> >  void WebPage::didChangeSelection()
> > +{
> > +    didChangeSelectionOrOverflowScrollPosition(EditorStateUpdateScheduling::Immediate);
> > +}
> 
> Don't we run the risk that callers of this will trigger the same release
> assert?

Yes, we do; I'm hoping to remove EditorStateUpdateScheduling::Immediate altogether and always only schedule editor state updates in the (very near) future. This would also schedule rendering updates instead of scheduling compositing flushes, as it does now.
Comment 4 WebKit Commit Bot 2019-04-17 11:04:35 PDT
Comment on attachment 367635 [details]
Fixes the bug

Clearing flags on attachment: 367635

Committed r244388: <https://trac.webkit.org/changeset/244388>
Comment 5 WebKit Commit Bot 2019-04-17 11:04:36 PDT
All reviewed patches have been landed.  Closing bug.