RESOLVED FIXED 210859
fast/events/event-handler-detached-document-dispatchEvent.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=210859
Summary fast/events/event-handler-detached-document-dispatchEvent.html is crashing
Eric Carlson
Reported 2020-04-22 08:43:27 PDT
r260182 causes fast/events/event-handler-detached-document-dispatchEvent.html to crash.
Attachments
Patch (4.28 KB, patch)
2020-04-22 08:55 PDT, Eric Carlson
no flags
Patch for landing. (4.28 KB, patch)
2020-04-22 10:52 PDT, Eric Carlson
no flags
Eric Carlson
Comment 1 2020-04-22 08:43:50 PDT
Eric Carlson
Comment 2 2020-04-22 08:55:40 PDT
Jer Noble
Comment 3 2020-04-22 09:53:22 PDT
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. ;)
Eric Carlson
Comment 4 2020-04-22 10:50:47 PDT
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!
Eric Carlson
Comment 5 2020-04-22 10:52:23 PDT
Created attachment 397224 [details] Patch for landing.
EWS
Comment 6 2020-04-22 12:38:04 PDT
Committed r260529: <https://trac.webkit.org/changeset/260529> All reviewed patches have been landed. Closing bug and clearing flags on attachment 397224 [details].
Note You need to log in before you can comment on or make changes to this bug.