Bug 202308 - Move service worker process termination delay disabling from process pool to website data store
Summary: Move service worker process termination delay disabling from process pool to ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-27 06:49 PDT by Alex Christensen
Modified: 2019-09-27 09:08 PDT (History)
3 users (show)

See Also:


Attachments
Patch (29.23 KB, patch)
2019-09-27 06:55 PDT, Alex Christensen
cdumez: review+
cdumez: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2019-09-27 06:49:58 PDT
Move service worker process termination delay disabling from process pool to website data store
Comment 1 Alex Christensen 2019-09-27 06:55:17 PDT
Created attachment 379719 [details]
Patch
Comment 2 Chris Dumez 2019-09-27 08:53:01 PDT
Comment on attachment 379719 [details]
Patch

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

> Source/WebCore/workers/service/server/SWServer.cpp:305
> +    , m_processTerminationDelayEnabled(processTerminationDelayEnabled)

This needs a "is" prefix since this is a Boolean variable.

> Source/WebCore/workers/service/server/SWServer.h:257
> +    bool m_processTerminationDelayEnabled { true };

The new name is not as good because it is missing a prefix, violating coding style.

> Source/WebKit/NetworkProcess/NetworkProcess.h:532
> +        bool processTerminationDelayEnabled { true };

Can you explain why we need this and we cannot simply get this information from the SWServer in m_swServers ? You already store this boolean there.
Comment 3 Alex Christensen 2019-09-27 08:57:46 PDT
Comment on attachment 379719 [details]
Patch

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

>> Source/WebCore/workers/service/server/SWServer.cpp:305
>> +    , m_processTerminationDelayEnabled(processTerminationDelayEnabled)
> 
> This needs a "is" prefix since this is a Boolean variable.

I'll update the name when committing.

>> Source/WebKit/NetworkProcess/NetworkProcess.h:532
>> +        bool processTerminationDelayEnabled { true };
> 
> Can you explain why we need this and we cannot simply get this information from the SWServer in m_swServers ? You already store this boolean there.

This information is used when initializing the SWServer because they are lazily initialized.  If we don't have this, then we'll need another HashMap.
Comment 4 Chris Dumez 2019-09-27 08:58:19 PDT
(In reply to Alex Christensen from comment #3)
> Comment on attachment 379719 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=379719&action=review
> 
> >> Source/WebCore/workers/service/server/SWServer.cpp:305
> >> +    , m_processTerminationDelayEnabled(processTerminationDelayEnabled)
> > 
> > This needs a "is" prefix since this is a Boolean variable.
> 
> I'll update the name when committing.
> 
> >> Source/WebKit/NetworkProcess/NetworkProcess.h:532
> >> +        bool processTerminationDelayEnabled { true };
> > 
> > Can you explain why we need this and we cannot simply get this information from the SWServer in m_swServers ? You already store this boolean there.
> 
> This information is used when initializing the SWServer because they are
> lazily initialized.  If we don't have this, then we'll need another HashMap.

Ok, thanks.
Comment 5 Alex Christensen 2019-09-27 09:07:34 PDT
http://trac.webkit.org/r250426
Comment 6 Radar WebKit Bug Importer 2019-09-27 09:08:26 PDT
<rdar://problem/55783546>