RESOLVED FIXED183925
CacheStorage::Engine should not ref itself when hopping to a background thread
https://bugs.webkit.org/show_bug.cgi?id=183925
Summary CacheStorage::Engine should not ref itself when hopping to a background thread
youenn fablet
Reported 2018-03-22 17:14:11 PDT
Instead we can use a weakThis
Attachments
Patch (9.83 KB, patch)
2018-03-22 17:18 PDT, youenn fablet
no flags
Patch (9.79 KB, patch)
2018-03-23 07:54 PDT, youenn fablet
no flags
Patch (9.80 KB, patch)
2018-03-23 10:09 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2018-03-22 17:14:36 PDT
youenn fablet
Comment 2 2018-03-22 17:18:05 PDT
youenn fablet
Comment 3 2018-03-23 07:54:47 PDT
Chris Dumez
Comment 4 2018-03-23 08:47:58 PDT
Comment on attachment 336370 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=336370&action=review r=me with comments > Source/WebKit/ChangeLog:10 > + Use weak pointer when hopping ot background threads. typo: ot > Source/WebKit/ChangeLog:14 > + Made sure to use just oen Engine for all private sessions. typo: oen > Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:330 > + RunLoop::main().dispatch([this, weakThis = makeWeakPtr(this), identifier]() mutable { I do not think we should be calling makeWeakPtr() from a background thread. I doubt it is thread safe (In particular, createWeakPtr() that is being implicitly called). I'd suggest WTFMove() ing weakThis here.
youenn fablet
Comment 5 2018-03-23 10:09:27 PDT
youenn fablet
Comment 6 2018-03-23 10:09:59 PDT
(In reply to youenn fablet from comment #5) > Created attachment 336385 [details] > Patch Thanks for the review. Fixed the issues in this patch.
WebKit Commit Bot
Comment 7 2018-03-23 11:02:34 PDT
Comment on attachment 336385 [details] Patch Clearing flags on attachment: 336385 Committed r229904: <https://trac.webkit.org/changeset/229904>
WebKit Commit Bot
Comment 8 2018-03-23 11:02:36 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.