Bug 187287 - Add a release assert to diagnose infinite recursions in removeAllEventListeners()
Summary: Add a release assert to diagnose infinite recursions in removeAllEventListene...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-03 00:55 PDT by Ryosuke Niwa
Modified: 2018-07-03 19:33 PDT (History)
10 users (show)

See Also:


Attachments
Adds the assertion (5.61 KB, patch)
2018-07-03 17:26 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Adds the assertion (2.62 KB, patch)
2018-07-03 17:27 PDT, Ryosuke Niwa
keith_miller: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>