Bug 202370 - Allow pages using EventSource to enter the back/forward cache
Summary: Allow pages using EventSource to enter the back/forward cache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on: 202373
Blocks: 202293
  Show dependency treegraph
 
Reported: 2019-09-30 13:47 PDT by Chris Dumez
Modified: 2019-10-04 18:38 PDT (History)
7 users (show)

See Also:


Attachments
Patch (9.45 KB, patch)
2019-09-30 16:33 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (9.48 KB, patch)
2019-10-01 08:46 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (17.09 KB, patch)
2019-10-01 12:47 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (17.13 KB, patch)
2019-10-01 13:02 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (17.37 KB, patch)
2019-10-01 14:23 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (18.41 KB, patch)
2019-10-04 16:54 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2019-09-30 13:47:29 PDT
Allow pages using EventSource to enter the back/forward cache.
Comment 1 Chris Dumez 2019-09-30 13:47:49 PDT
<rdar://problem/55853142>
Comment 2 Chris Dumez 2019-09-30 16:33:00 PDT
Created attachment 379853 [details]
Patch
Comment 3 Chris Dumez 2019-10-01 08:46:47 PDT
Created attachment 379904 [details]
Patch
Comment 4 Chris Dumez 2019-10-01 12:47:58 PDT
Created attachment 379931 [details]
Patch
Comment 5 Chris Dumez 2019-10-01 13:02:25 PDT
Created attachment 379936 [details]
Patch
Comment 6 Chris Dumez 2019-10-01 14:23:03 PDT
Created attachment 379950 [details]
Patch
Comment 7 Chris Dumez 2019-10-03 14:04:08 PDT
Patch is ready for review.
Comment 8 Chris Dumez 2019-10-04 16:01:20 PDT
ping review?
Comment 9 Geoffrey Garen 2019-10-04 16:11:49 PDT
Comment on attachment 379950 [details]
Patch

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

r=me

> Source/WebCore/page/EventSource.cpp:427
> +    if (std::exchange(m_shouldDispatchErrorEventOnResume, false)) {
> +        scriptExecutionContext()->postTask([this, pendingActivity = makePendingActivity(*this)](ScriptExecutionContext&) {
> +            if (!isContextStopped())
> +                dispatchErrorEvent();
> +        });

Would it be crazy just to silently reconnect instead?
Comment 10 Chris Dumez 2019-10-04 16:15:23 PDT
Comment on attachment 379950 [details]
Patch

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

>> Source/WebCore/page/EventSource.cpp:427
>> +        });
> 
> Would it be crazy just to silently reconnect instead?

I can give it a shot. It would be nice.
Comment 11 Chris Dumez 2019-10-04 16:54:19 PDT
Created attachment 380268 [details]
Patch
Comment 12 Chris Dumez 2019-10-04 16:55:10 PDT
Requesting review again since I changed the approach to reconnect the EventSource when restoring from page cache.
Comment 13 Geoffrey Garen 2019-10-04 17:09:56 PDT
Comment on attachment 380268 [details]
Patch

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

r=me

> Source/WebCore/page/EventSource.cpp:429
> +                scheduleReconnect();

Shiny! :P
Comment 14 WebKit Commit Bot 2019-10-04 18:38:28 PDT
Comment on attachment 380268 [details]
Patch

Clearing flags on attachment: 380268

Committed r250761: <https://trac.webkit.org/changeset/250761>
Comment 15 WebKit Commit Bot 2019-10-04 18:38:29 PDT
All reviewed patches have been landed.  Closing bug.