Bug 187287

Summary: Add a release assert to diagnose infinite recursions in removeAllEventListeners()
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: UI EventsAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, dbates, ddkilzer, esprehn+autocc, ews-watchlist, kangil.han, keith_miller, mark.lam, msaboff, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Adds the assertion
none
Adds the assertion keith_miller: review+

Description Ryosuke Niwa 2018-07-03 00:55:31 PDT
Somehow we're encountering infinite recursions inside removeAllEventListeners():
e.g.

Thread 0 Crashed ↩:: Dispatch queue: com.apple.main-thread
0   com.apple.WebCore             	0x00007fff53718587 WebCore::EventTarget::removeAllEventListeners() + 7
1   com.apple.WebCore             	0x00007fff5371858a WebCore::EventTarget::removeAllEventListeners() + 10
2   com.apple.WebCore             	0x00007fff5371858a WebCore::EventTarget::removeAllEventListeners() + 10
3   com.apple.WebCore             	0x00007fff5371858a WebCore::EventTarget::removeAllEventListeners() + 10
4   com.apple.WebCore             	0x00007fff5371858a WebCore::EventTarget::removeAllEventListeners() + 10
...
511 com.apple.WebCore             	0x00007fff5371858a WebCore::EventTarget::removeAllEventListeners() + 10
...

Add a release assertion to reveal the earlier stack trace in order to diagnose this crash.
Comment 1 Ryosuke Niwa 2018-07-03 17:26:38 PDT
Created attachment 344245 [details]
Adds the assertion
Comment 2 Ryosuke Niwa 2018-07-03 17:27:24 PDT
Created attachment 344246 [details]
Adds the assertion
Comment 3 Radar WebKit Bug Importer 2018-07-03 17:28:03 PDT
<rdar://problem/41799974>
Comment 4 Keith Miller 2018-07-03 19:23:39 PDT
Comment on attachment 344246 [details]
Adds the assertion

r=me.
Comment 5 Ryosuke Niwa 2018-07-03 19:33:09 PDT
Committed r233493: <https://trac.webkit.org/changeset/233493>