Tapping a hyperlink or scrolling a page causes a crash.
<rdar://problem/15739334>
Created attachment 220249 [details] Patch
Committed r161227: <http://trac.webkit.org/changeset/161227>
Comment on attachment 220249 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220249&action=review > Source/WebCore/page/ios/EventHandlerIOS.mm:57 > static RetainPtr<WebEvent>& currentEventSlot() > { > - NeverDestroyed<RetainPtr<WebEvent>> event; > + static NeverDestroyed<RetainPtr<WebEvent>> event; > return event; Isn't a NeverDestroyed with a RetainPtr<> a bit overkill? Can we drop the RetainPtr wrapping?
(In reply to comment #4) > (From update of attachment 220249 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=220249&action=review > > > Source/WebCore/page/ios/EventHandlerIOS.mm:57 > > static RetainPtr<WebEvent>& currentEventSlot() > > { > > - NeverDestroyed<RetainPtr<WebEvent>> event; > > + static NeverDestroyed<RetainPtr<WebEvent>> event; > > return event; > > Isn't a NeverDestroyed with a RetainPtr<> a bit overkill? Can we drop the RetainPtr wrapping? As mentioned in person today (01/06), we cannot drop the RetainPtr<> without having the caller retain the WebEvent before assigning to currentEventSlot(). It seems error prone to depend on the caller to explicitly retain the WebEvent as opposed to letting RetainPtr<> implicitly retain it on assignment. I am open to suggestions on how to clean up this code.