[webkit-reviews] review granted: [Bug 210859] fast/events/event-handler-detached-document-dispatchEvent.html is crashing : [Attachment 397197] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 22 09:53:22 PDT 2020


Jer Noble <jer.noble at apple.com> has granted Eric Carlson
<eric.carlson at apple.com>'s request for review:
Bug 210859: fast/events/event-handler-detached-document-dispatchEvent.html is
crashing
https://bugs.webkit.org/show_bug.cgi?id=210859

Attachment 397197: Patch

https://bugs.webkit.org/attachment.cgi?id=397197&action=review




--- Comment #3 from Jer Noble <jer.noble at apple.com> ---
Comment on attachment 397197
  --> https://bugs.webkit.org/attachment.cgi?id=397197
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. ;)


More information about the webkit-reviews mailing list