Summary: | REGRESSION (r260243): [ Mac WK1 ] fast/media/mq-inverted-colors-live-update-for-listener.html is a flaky failure | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Truitt Savell <tsavell> | ||||
Component: | CSS | Assignee: | Chris Dumez <cdumez> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | achristensen, ashvayka, cdumez, darin, eric.carlson, esprehn+autocc, ews-watchlist, ggaren, glenn, gyuyoung.kim, jer.noble, koivisto, kondapallykalyan, macpherson, menard, philipj, sergio, webkit-bot-watchers-bugzilla, webkit-bug-importer, ysuzuki | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=203288 | ||||||
Attachments: |
|
Description
Truitt Savell
2020-04-28 16:20:44 PDT
(In reply to Truitt Savell from comment #0) > History: > https://results.webkit.org/?suite=layout-tests&test=fast%2Fmedia%2Fmq-inverted-colors-live-update-for-listener.html Thank you tracking this down, Truitt! https://results.webkit.org/?suite=layout-tests&test=fast%2Fmedia%2Fmq-prefers-reduced-motion-live-update-for-listener.html is also flaky failing, yet https://results.webkit.org/?suite=layout-tests&test=fast%2Fmedia%2Fmq-prefers-reduced-motion-matchMedia.html is all green. The crucial difference between them is that latter references MQL instance inside addListener() callback, while former doesn't. All points to GC issue Darin mentioned in https://bugs.webkit.org/show_bug.cgi?id=203288#c19. Will fix this. (In reply to Chris Dumez from comment #3) > Will fix this. Chris, I am on it: we should make MediaQueryList an ActiveDOMObject. (In reply to Alexey Shvayka from comment #4) > (In reply to Chris Dumez from comment #3) > > Will fix this. > > Chris, I am on it: we should make MediaQueryList an ActiveDOMObject. I have the patch ready. The radar was assigned to me as P1, sorry. Created attachment 398114 [details]
Patch
(In reply to Chris Dumez from comment #5) > I have the patch ready. The radar was assigned to me as P1, sorry. No problem. http://webkit.org/b/209862 seems to be failing the same ASSERT. Comment on attachment 398114 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=398114&action=review > Source/WebCore/css/MediaQueryList.cpp:44 > + list->suspendIfNeeded(); I wonder if we could invoke this in constructor? Comment on attachment 398114 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=398114&action=review >> Source/WebCore/css/MediaQueryList.cpp:44 >> + list->suspendIfNeeded(); > > I wonder if we could invoke this in constructor? It is not safe to call this in the constructor in general (although it would work for this particular class). The reason is that suspendIfNeeded() may call suspend() which may ref |this|. RefCounted has an assertion that forbids increasing the refcount before adoption. This is why this is the usual pattern for calling suspendIfNeeded() on ActiveDOMObjects. (In reply to Chris Dumez from comment #9) > It is not safe to call this in the constructor in general (although it would > work for this particular class). The reason is that suspendIfNeeded() may > call suspend() which may ref |this|. RefCounted has an assertion that > forbids increasing the refcount before adoption. > This is why this is the usual pattern for calling suspendIfNeeded() on > ActiveDOMObjects. Thanks for your insight! Committed r261012: <https://trac.webkit.org/changeset/261012> All reviewed patches have been landed. Closing bug and clearing flags on attachment 398114 [details]. |