Changeset 253006 in webkit


Ignore:
Timestamp:
Dec 2, 2019 12:32:54 PM (4 years ago)
Author:
ysuzuki@apple.com
Message:

Document::setWindowAttributeEventListener should check m_domWindow::frame()
https://bugs.webkit.org/show_bug.cgi?id=204759
<rdar://problem/50098787>

Reviewed by Mark Lam.

JSLazyEventListener::create assumes that m_domWindow::frame() exists.
But this check was removed at r196888 accidentally.
This patch adds this check back to fix the crash.

  • dom/Document.cpp:

(WebCore::Document::setWindowAttributeEventListener):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r253004 r253006  
     12019-12-02  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        Document::setWindowAttributeEventListener should check `m_domWindow::frame()`
     4        https://bugs.webkit.org/show_bug.cgi?id=204759
     5        <rdar://problem/50098787>
     6
     7        Reviewed by Mark Lam.
     8
     9        JSLazyEventListener::create assumes that `m_domWindow::frame()` exists.
     10        But this check was removed at r196888 accidentally.
     11        This patch adds this check back to fix the crash.
     12
     13        * dom/Document.cpp:
     14        (WebCore::Document::setWindowAttributeEventListener):
     15
    1162019-12-02  Zalan Bujtas  <zalan@apple.com>
    217
  • trunk/Source/WebCore/dom/Document.cpp

    r252965 r253006  
    46914691    if (!m_domWindow)
    46924692        return;
     4693    if (!m_domWindow->frame())
     4694        return;
    46934695    setWindowAttributeEventListener(eventType, JSLazyEventListener::create(*m_domWindow, attributeName, attributeValue), isolatedWorld);
    46944696}
Note: See TracChangeset for help on using the changeset viewer.