Bug 178156

Summary: Add a SW context process (where SW scripts will actually execute)
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, aestes, cdumez, commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
EWS run
none
EWS run
none
EWS run
none
PFR
none
Patch none

Description Brady Eidson 2017-10-10 22:05:59 PDT
Add a SW context process (where SW scripts will actually execute)
Comment 1 Brady Eidson 2017-10-10 22:10:59 PDT
Created attachment 323386 [details]
EWS run
Comment 2 Brady Eidson 2017-10-10 22:12:02 PDT
Created attachment 323387 [details]
EWS run
Comment 3 Brady Eidson 2017-10-10 22:57:55 PDT
Created attachment 323389 [details]
EWS run
Comment 4 Brady Eidson 2017-10-10 23:32:13 PDT
Created attachment 323392 [details]
PFR
Comment 5 Andy Estes 2017-10-11 09:25:40 PDT
Comment on attachment 323392 [details]
PFR

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

> Source/WebCore/workers/service/server/SWServerRegistration.cpp:86
> +    auto worker = m_server.createWorker(connection, m_registrationKey, m_currentJob->scriptURL, result.script, WorkerType::Classic);

Surprised the compiler doesn't complain about worker not being used.

> Source/WebCore/workers/service/server/SWServerRegistration.cpp:92
> +    UNUSED_PARAM(workerID);

You could also remove "workerID" from the function signature.

> Source/WebCore/workers/service/server/SWServerRegistration.h:83
> +    double m_lastUpdateTime { 0.0 };

No need for ".0"
Comment 6 Brady Eidson 2017-10-11 09:35:31 PDT
(In reply to Andy Estes from comment #5)
> Comment on attachment 323392 [details]
> PFR
> 
> > Source/WebCore/workers/service/server/SWServerRegistration.cpp:92
> > +    UNUSED_PARAM(workerID);
> 
> You could also remove "workerID" from the function signature.

Explicitly left it to make it super obvious what it is without having to hop to the header (will be used very soon)
Comment 7 Brady Eidson 2017-10-11 09:45:55 PDT
Created attachment 323423 [details]
Patch
Comment 8 WebKit Commit Bot 2017-10-11 10:27:12 PDT
Comment on attachment 323423 [details]
Patch

Clearing flags on attachment: 323423

Committed r223191: <https://trac.webkit.org/changeset/223191>
Comment 9 WebKit Commit Bot 2017-10-11 10:27:13 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2017-10-11 10:28:13 PDT
<rdar://problem/34936051>