Summary: | Introduce WorkerMessagePortChannelRegistry | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||||||||
Component: | Page Loading | Assignee: | youenn fablet <youennf> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | achristensen, beidson, cdumez, commit-queue, dbates, esprehn+autocc, ews-watchlist, kangil.han, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=205357 https://bugs.webkit.org/show_bug.cgi?id=205414 |
||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 201299 | ||||||||||||
Attachments: |
|
Description
youenn fablet
2019-08-30 00:41:16 PDT
Created attachment 377689 [details]
Patch
Created attachment 377690 [details]
Patch
Comment on attachment 377690 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=377690&action=review > Source/WebCore/dom/MessagePort.cpp:252 > + auto scopeExit = makeScopeExit([&completionCallback] { > + completionCallback(); > + }); Why make a lambda that calls the Function instead of just using the Function itself? Why no WTFMove? Also, this seems like it should be a CompletionHandler. > Source/WebCore/dom/MessagePort.cpp:315 > + callOnMainThread([remoteIdentifier = m_remoteIdentifier, weakThis = makeWeakPtr(const_cast<MessagePort*>(this)), workerThread = WTFMove(workerThread)]() mutable { makeWeakPtr should take const T& instead of non-const T& and this const_cast shouldn't be necessary. Same with const T* Created attachment 377829 [details]
Patch
Created attachment 377839 [details]
Patch for landing
(In reply to Alex Christensen from comment #3) > Comment on attachment 377690 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=377690&action=review > > > Source/WebCore/dom/MessagePort.cpp:252 > > + auto scopeExit = makeScopeExit([&completionCallback] { > > + completionCallback(); > > + }); > > Why make a lambda that calls the Function instead of just using the Function > itself? Why no WTFMove? Also, this seems like it should be a > CompletionHandler. Right. > > Source/WebCore/dom/MessagePort.cpp:315 > > + callOnMainThread([remoteIdentifier = m_remoteIdentifier, weakThis = makeWeakPtr(const_cast<MessagePort*>(this)), workerThread = WTFMove(workerThread)]() mutable { > > makeWeakPtr should take const T& instead of non-const T& and this const_cast > shouldn't be necessary. Same with const T* makeWeakPtr can take a const pointer as input but it will create a WeakPtr of a const pointer. In that case, we want to have a non const weakThis to call updateActivity. Comment on attachment 377839 [details] Patch for landing Clearing flags on attachment: 377839 Committed r249378: <https://trac.webkit.org/changeset/249378> All reviewed patches have been landed. Closing bug. |