RESOLVED FIXED 179147
Update SWServerJobQueue to follow the Service Worker specification more closely
https://bugs.webkit.org/show_bug.cgi?id=179147
Summary Update SWServerJobQueue to follow the Service Worker specification more closely
Chris Dumez
Reported 2017-11-01 18:56:52 PDT
Update SWServerJobQueue to follow the Service Worker specification more closely.
Attachments
Patch (12.93 KB, patch)
2017-11-01 19:00 PDT, Chris Dumez
no flags
Patch (13.41 KB, patch)
2017-11-02 10:07 PDT, Chris Dumez
no flags
Patch (13.16 KB, patch)
2017-11-02 10:22 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2017-11-01 19:00:06 PDT
youenn fablet
Comment 2 2017-11-02 10:02:50 PDT
Comment on attachment 325662 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325662&action=review > Source/WebCore/workers/service/server/SWServerJobQueue.cpp:103 > + m_jobTimer.startOneShot(0_s); Do we need a timer? Can't we do that with a lambda? > Source/WebCore/workers/service/server/SWServerJobQueue.cpp:108 > + ASSERT(!m_jobQueue.isEmpty()); Is it needed? Is firstJob() not asserting somehow that the queue is not empty? Ditto elsewhere > Source/WebCore/workers/service/server/SWServerJobQueue.cpp:212 > void SWServerJobQueue::finishCurrentJob() Since we remove the notion of current job, should we also remove it from some of the methods like this one.
Chris Dumez
Comment 3 2017-11-02 10:05:41 PDT
Comment on attachment 325662 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325662&action=review >> Source/WebCore/workers/service/server/SWServerJobQueue.cpp:103 >> + m_jobTimer.startOneShot(0_s); > > Do we need a timer? Can't we do that with a lambda? How? if you're suggesting callOnMainThread([] { }), then I prefer a timer because it cannot outlive the SWServerJobQueue object. >> Source/WebCore/workers/service/server/SWServerJobQueue.cpp:108 >> + ASSERT(!m_jobQueue.isEmpty()); > > Is it needed? Is firstJob() not asserting somehow that the queue is not empty? > Ditto elsewhere Not needed. >> Source/WebCore/workers/service/server/SWServerJobQueue.cpp:212 >> void SWServerJobQueue::finishCurrentJob() > > Since we remove the notion of current job, should we also remove it from some of the methods like this one. I did not remove the notion of current job. I only removed the m_currentJob member and the code now treats firstJob() as the current job.
Chris Dumez
Comment 4 2017-11-02 10:07:47 PDT
Chris Dumez
Comment 5 2017-11-02 10:22:22 PDT
Chris Dumez
Comment 6 2017-11-02 10:39:02 PDT
Comment on attachment 325729 [details] Patch Clearing flags on attachment: 325729 Committed r224341: <https://trac.webkit.org/changeset/224341>
Chris Dumez
Comment 7 2017-11-02 10:39:03 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2017-11-15 12:24:33 PST
Note You need to log in before you can comment on or make changes to this bug.