Bug 202112 - [iOS] REGRESSION(r250151): Occasional assertion failures in ShareableBitmap::~ShareableBitmap()
Summary: [iOS] REGRESSION(r250151): Occasional assertion failures in ShareableBitmap::...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-23 11:01 PDT by David Quesada
Modified: 2019-09-23 13:15 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.82 KB, patch)
2019-09-23 11:14 PDT, David Quesada
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Quesada 2019-09-23 11:01:09 PDT
CGImageRef's created from a ShareableBitmap can legitimately be deallocated on a background thread. When this happens, the data provider's release callback will be called. This derefs the ShareableBitmap, which might cause it to deallocate, isn't allowed on the background thread. releaseDataProviderData() should dispatch to the main runloop if it is called from a background thread. This is similar to what r250151 added for releaseBitmapContextData().
Comment 1 David Quesada 2019-09-23 11:01:33 PDT
rdar://problem/55624598
Comment 2 David Quesada 2019-09-23 11:14:21 PDT
Created attachment 379379 [details]
Patch
Comment 3 Chris Dumez 2019-09-23 12:30:16 PDT
Comment on attachment 379379 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=379379&action=review

> Source/WebKit/Shared/cg/ShareableBitmapCG.cpp:159
> +    if (!RunLoop::isMain()) {

This looks a lot like https://trac.webkit.org/changeset/250151 ?
Comment 4 Chris Dumez 2019-09-23 12:31:12 PDT
Comment on attachment 379379 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=379379&action=review

>> Source/WebKit/Shared/cg/ShareableBitmapCG.cpp:159
>> +    if (!RunLoop::isMain()) {
> 
> This looks a lot like https://trac.webkit.org/changeset/250151 ?

Oh, it is a different release function :)
Comment 5 WebKit Commit Bot 2019-09-23 13:15:25 PDT
Comment on attachment 379379 [details]
Patch

Clearing flags on attachment: 379379

Committed r250248: <https://trac.webkit.org/changeset/250248>
Comment 6 WebKit Commit Bot 2019-09-23 13:15:27 PDT
All reviewed patches have been landed.  Closing bug.