| Summary: | [StressGC] ASSERTION FAILED: m_wrapper under WebCore::MainThreadGenericEventQueue::dispatchOneEvent | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||
| Component: | Bindings | Assignee: | Chris Dumez <cdumez> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | calvaris, cdumez, eric.carlson, esprehn+autocc, ews-watchlist, ggaren, glenn, gyuyoung.kim, jer.noble, kondapallykalyan, philipj, rniwa, sergio, webkit-bug-importer, youennf | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Chris Dumez
2020-03-27 09:12:14 PDT
Created attachment 394721 [details]
Patch
Comment on attachment 394721 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=394721&action=review r=me > Source/WebCore/html/track/VideoTrackList.h:41 > + list->suspendIfNeeded(); Can these suspend calls happen in the constructors instead? (In reply to Geoffrey Garen from comment #3) > Comment on attachment 394721 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=394721&action=review > > r=me > > > Source/WebCore/html/track/VideoTrackList.h:41 > > + list->suspendIfNeeded(); > > Can these suspend calls happen in the constructors instead? I am trying to remember why but I am 100% sure that what you are suggesting is bad practice because it does not work in all cases and leads to assertions. The good practice is definitely to do it in the factory like I did. I definitely had to write patches to move the suspendIfNeeded() calls to the constructor call site to address crashes in the past. (In reply to Chris Dumez from comment #4) > (In reply to Geoffrey Garen from comment #3) > > Comment on attachment 394721 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=394721&action=review > > > > r=me > > > > > Source/WebCore/html/track/VideoTrackList.h:41 > > > + list->suspendIfNeeded(); > > > > Can these suspend calls happen in the constructors instead? > > I am trying to remember why but I am 100% sure that what you are suggesting > is bad practice because it does not work in all cases and leads to > assertions. The good practice is definitely to do it in the factory like I > did. I definitely had to write patches to move the suspendIfNeeded() calls > to the constructor call site to address crashes in the past. Ok, found an example: http://trac.webkit.org/r252497 From my changelog: """ Call suspendIfNeeded() in the factory and not in the constructor. It is never safe to call suspendIfNeeded() from inside the constructor because it may call the suspend() method, which may ref |this|. """ Okeedokee. Committed r259122: <https://trac.webkit.org/changeset/259122> All reviewed patches have been landed. Closing bug and clearing flags on attachment 394721 [details]. |