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
Created attachment 432946 [details] Patch
Comment on attachment 432946 [details] Patch r=me
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].
<rdar://problem/80229177>