Changeset 150758 in webkit


Ignore:
Timestamp:
May 27, 2013 8:43:01 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Reset all clients on WebPage close
https://bugs.webkit.org/show_bug.cgi?id=112334

Patch by Xan Lopez <xlopez@igalia.com> on 2013-05-27
Reviewed by Anders Carlsson.

We do not reset the clients on WebPage::close(), so there's a
small chance that someone will try to access them after that. This
won't work and will generally cause runtime warnings, crashes or
other issues. Reset them all to null to prevent this situation.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::close):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r150753 r150758  
     12013-05-27  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reset all clients on WebPage close
     4        https://bugs.webkit.org/show_bug.cgi?id=112334
     5
     6        Reviewed by Anders Carlsson.
     7
     8        We do not reset the clients on WebPage::close(), so there's a
     9        small chance that someone will try to access them after that. This
     10        won't work and will generally cause runtime warnings, crashes or
     11        other issues. Reset them all to null to prevent this situation.
     12
     13        * WebProcess/WebPage/WebPage.cpp:
     14        (WebKit::WebPage::close):
     15
    1162013-05-27  Manuel Rego Casasnovas  <rego@igalia.com>
    217
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r150700 r150758  
    851851#endif
    852852
     853#if ENABLE(CONTEXT_MENUS)
     854    m_contextMenuClient.initialize(0);
     855#endif
     856    m_editorClient.initialize(0);
     857    m_formClient.initialize(0);
     858    m_loaderClient.initialize(0);
     859    m_policyClient.initialize(0);
     860    m_resourceLoadClient.initialize(0);
     861    m_uiClient.initialize(0);
     862#if ENABLE(FULLSCREEN_API)
     863    m_fullScreenClient.initialize(0);
     864#endif
     865    m_logDiagnosticMessageClient.initialize(0);
     866
    853867    m_underlayPage = nullptr;
    854868    m_printContext = nullptr;
Note: See TracChangeset for help on using the changeset viewer.