WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
183925
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
Details
Formatted Diff
Diff
Patch
(9.79 KB, patch)
2018-03-23 07:54 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(9.80 KB, patch)
2018-03-23 10:09 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2018-03-22 17:14:36 PDT
<
rdar://problem/38580483
>
youenn fablet
Comment 2
2018-03-22 17:18:05 PDT
Created
attachment 336340
[details]
Patch
youenn fablet
Comment 3
2018-03-23 07:54:47 PDT
Created
attachment 336370
[details]
Patch
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
Created
attachment 336385
[details]
Patch
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.
Top of Page
Format For Printing
XML
Clone This Bug