Bug 237156

Summary: Take down shared worker context connection less aggressively when it becomes idle
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, darin, ggaren, kkinnunen, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+

Description Chris Dumez 2022-02-24 13:33:42 PST
Take down shared worker context connection less aggressively when it becomes idle. Give it 5 seconds before shutting it down in case it ends up being used again in the near future.
This is similar to what we do for service workers.
Comment 1 Chris Dumez 2022-02-24 13:36:02 PST
Created attachment 453135 [details]
Patch
Comment 2 Darin Adler 2022-02-24 16:50:06 PST
Comment on attachment 453135 [details]
Patch

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

> Source/WebKit/NetworkProcess/SharedWorker/WebSharedWorkerServerToContextConnection.cpp:146
> +    // Terminate context connection after a little while if it is no longer used by any SharedWorker objects.

If I was doing this change, I’d put this comment on the constant rather than the code that uses it. Not sure that’s better, though.
Comment 3 Chris Dumez 2022-02-24 16:54:11 PST
Committed r290477 (247775@trunk): <https://commits.webkit.org/247775@trunk>
Comment 4 Radar WebKit Bug Importer 2022-02-24 16:55:18 PST
<rdar://problem/89447191>