| Summary: | fast/events/event-handler-detached-document-dispatchEvent.html is crashing | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Eric Carlson <eric.carlson> | ||||||
| Component: | Media | Assignee: | Eric Carlson <eric.carlson> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | cdumez, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, jer.noble, philipj, sergio, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | Other | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Eric Carlson
2020-04-22 08:43:27 PDT
Created attachment 397197 [details]
Patch
Comment on attachment 397197 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=397197&action=review r=me, with nit. > Source/WebCore/html/MediaElementSession.cpp:146 > + if (m_haveAddedMediaUsageManagerSession) > + return; > + > + auto page = m_element.document().page(); > + if (!page) > + return; > + > + page->chrome().client().addMediaUsageManagerSession(mediaSessionIdentifier(), m_element.sourceApplicationIdentifier(), m_element.document().url()); > + m_haveAddedMediaUsageManagerSession = true; A smart person once told me <https://bugs.webkit.org/show_bug.cgi?id=210589#c3> that they preferred to set this kind of state before calling the callback to protect against re-entrancy. ;) Comment on attachment 397197 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=397197&action=review >> Source/WebCore/html/MediaElementSession.cpp:146 >> + m_haveAddedMediaUsageManagerSession = true; > > A smart person once told me <https://bugs.webkit.org/show_bug.cgi?id=210589#c3> that they preferred to set this kind of state before calling the callback to protect against re-entrancy. ;) LOL, good point! Created attachment 397224 [details]
Patch for landing.
Committed r260529: <https://trac.webkit.org/changeset/260529> All reviewed patches have been landed. Closing bug and clearing flags on attachment 397224 [details]. |