WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
195130
Introduce ServiceWorkerFetchTask
https://bugs.webkit.org/show_bug.cgi?id=195130
Summary
Introduce ServiceWorkerFetchTask
youenn fablet
Reported
2019-02-27 16:37:12 PST
Introduce ServiceWorkerFetchTask so that later on we can link it with NetworkResourceLoader.
Attachments
Patch
(54.17 KB, patch)
2019-02-27 16:43 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(53.00 KB, patch)
2019-02-27 17:26 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(52.96 KB, patch)
2019-02-27 19:07 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(54.59 KB, patch)
2019-02-27 19:42 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(54.68 KB, patch)
2019-02-28 13:26 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(54.14 KB, patch)
2019-03-05 10:50 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(54.15 KB, patch)
2019-03-05 12:28 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2019-02-27 16:43:26 PST
Created
attachment 363155
[details]
Patch
youenn fablet
Comment 2
2019-02-27 17:26:22 PST
Created
attachment 363164
[details]
Patch
youenn fablet
Comment 3
2019-02-27 19:07:50 PST
Created
attachment 363181
[details]
Patch
youenn fablet
Comment 4
2019-02-27 19:42:48 PST
Created
attachment 363184
[details]
Patch
youenn fablet
Comment 5
2019-02-28 13:26:20 PST
Created
attachment 363258
[details]
Patch
Daniel Bates
Comment 6
2019-03-03 13:36:41 PST
Comment on
attachment 363258
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=363258&action=review
> Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:60 > + inline unsigned hash() const
Inline?
> Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:62 > + unsigned hashes[2];
Old style. New hotness is std::array.
> Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:65 > +
Ok as-is. Empty line to rich for me. I don’t think it improves readability.
> Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:77 > + ServiceWorkerFetchTask(PAL::SessionID sessionID, Ref<IPC::Connection>&& connection, WebCore::SWServerConnectionIdentifier connectionIdentifier, WebCore::FetchIdentifier fetchIdentifier) > + : m_sessionID(sessionID) > + , m_connection(WTFMove(connection)) > + , m_identifier(Identifier {connectionIdentifier, fetchIdentifier}) > + { }
Uniform initialized syntax (UIS)? Also, you’re use of UIS is in bad taste. Put spaces after { and before }.
> Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:117 > + typedef ServiceWorkerFetchTaskIdentifierHash Hash;
Using?
> Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:63 > + auto fetches = WTFMove(m_ongoingFetches);
std::exchange()? Or old object left in sane state?
youenn fablet
Comment 7
2019-03-05 10:50:37 PST
Created
attachment 363654
[details]
Patch
youenn fablet
Comment 8
2019-03-05 10:50:45 PST
Thanks for the review. (In reply to Daniel Bates from
comment #6
)
> Comment on
attachment 363258
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=363258&action=review
> > > Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:60 > > + inline unsigned hash() const > > Inline?
Removed.
> > Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:62 > > + unsigned hashes[2]; > > Old style. New hotness is std::array.
That probably requires to have hashMemory take a std::array, otherwise this makes the code more complex. Might be better tackled outside of this patch.
> > Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:65 > > + > > Ok as-is. Empty line to rich for me. I don’t think it improves readability.
Removed the line.
> > Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:77 > > + ServiceWorkerFetchTask(PAL::SessionID sessionID, Ref<IPC::Connection>&& connection, WebCore::SWServerConnectionIdentifier connectionIdentifier, WebCore::FetchIdentifier fetchIdentifier) > > + : m_sessionID(sessionID) > > + , m_connection(WTFMove(connection)) > > + , m_identifier(Identifier {connectionIdentifier, fetchIdentifier}) > > + { } > > Uniform initialized syntax (UIS)? > > Also, you’re use of UIS is in bad taste. Put spaces after { and before }.
Fixed
> > Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:117 > > + typedef ServiceWorkerFetchTaskIdentifierHash Hash; > > Using?
OK
> > Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:63 > > + auto fetches = WTFMove(m_ongoingFetches); > > std::exchange()? Or old object left in sane state?
I kept WTFMove, it reads better to me and m_ongoingFetches is a map so is left in a good state.
Chris Dumez
Comment 9
2019-03-05 12:06:59 PST
Comment on
attachment 363654
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=363654&action=review
> Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:69 > + Identifier identifier() const { return m_identifier; }
const Identifier&
youenn fablet
Comment 10
2019-03-05 12:28:26 PST
Created
attachment 363669
[details]
Patch for landing
WebKit Commit Bot
Comment 11
2019-03-05 13:49:34 PST
Comment on
attachment 363669
[details]
Patch for landing Clearing flags on attachment: 363669 Committed
r242503
: <
https://trac.webkit.org/changeset/242503
>
WebKit Commit Bot
Comment 12
2019-03-05 13:49:36 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 13
2019-03-05 13:50:29 PST
<
rdar://problem/48612687
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug