Bug 227714 - Make sure PlatformCALayer gets destroyed on the main thread
Summary: Make sure PlatformCALayer gets destroyed on the main thread
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-06 11:12 PDT by Chris Dumez
Modified: 2021-07-06 13:48 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.53 KB, patch)
2021-07-06 11:13 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2021-07-06 11:12:29 PDT
Make sure PlatformCALayer gets destroyed on the main thread, to avoid crashes like these:
Thread 6 Crashed ↩:: Dispatch queue: com.apple.WebKit.EventDispatcher
0   com.apple.WebCore             	0x000000019ee50bd8 WTFCrashWithInfo(int, char const*, char const*, int) + 20
1   com.apple.WebCore             	0x000000019ec2ef8c WebCore::TimerBase::~TimerBase() + 236
2   com.apple.WebCore             	0x000000019ec601fc WebCore::TileController::~TileController() + 184
3   com.apple.WebCore             	0x000000019ec600fc -[WebTiledBackingLayer invalidate] + 40
4   com.apple.WebCore             	0x000000019f945630 WebCore::PlatformCALayerCocoa::~PlatformCALayerCocoa() + 484
5   com.apple.WebCore             	0x000000019f945b1c WebCore::PlatformCALayerCocoa::~PlatformCALayerCocoa() + 16
6   com.apple.WebCore             	0x000000019f7ab030 collectDescendantLayersAtPoint(WTF::Vector<std::__1::pair<CALayer*, WebCore::FloatPoint>, 16ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>&, CALayer*, CGPoint) + 1308
7   com.apple.WebCore             	0x000000019f7ab180 WebCore::ScrollingTreeMac::eventListenerRegionTypesForPoint(WebCore::FloatPoint) const + 136
8   com.apple.WebCore             	0x00000001a0901148 WebCore::ScrollingTree::determineWheelEventProcessing(WebCore::PlatformWheelEvent const&) + 540
9   com.apple.WebKit              	0x00000001a21e79a4 WebKit::EventDispatcher::wheelEvent(WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::WebWheelEvent const&, bool, bool, bool, bool) + 648
10  com.apple.WebKit              	0x00000001a1b4f634 WebKit::EventDispatcher::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 364
Comment 1 Chris Dumez 2021-07-06 11:13:43 PDT
Created attachment 432946 [details]
Patch
Comment 2 Geoffrey Garen 2021-07-06 13:00:51 PDT
Comment on attachment 432946 [details]
Patch

r=me
Comment 3 EWS 2021-07-06 13:47:07 PDT
Committed r279615 (239436@main): <https://commits.webkit.org/239436@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 432946 [details].
Comment 4 Radar WebKit Bug Importer 2021-07-06 13:48:24 PDT
<rdar://problem/80229177>