Changeset 202426 in webkit


Ignore:
Timestamp:
Jun 24, 2016 10:13:38 AM (8 years ago)
Author:
Chris Dumez
Message:

[WK2] PageConfiguration.m_relatedPage keeps WebPageProxy alive after its WebView has been destroyed
https://bugs.webkit.org/show_bug.cgi?id=159080
<rdar://problem/26982642>

Reviewed by Anders Carlsson.

PageConfiguration.m_relatedPage keeps WebPageProxy alive after its WebView has been destroyed.
This leads to WebPageProxy object leaks when the client keeps chaining related views.

In this patch, we null our the PageConfiguration's relatedPage in WebPageProxy::close()
to break the chain and make sure we only keep alive 1 relatedPage rather than a chain of
them.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::close):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r202425 r202426  
     12016-06-24  Chris Dumez  <cdumez@apple.com>
     2
     3        [WK2] PageConfiguration.m_relatedPage keeps WebPageProxy alive after its WebView has been destroyed
     4        https://bugs.webkit.org/show_bug.cgi?id=159080
     5        <rdar://problem/26982642>
     6
     7        Reviewed by Anders Carlsson.
     8
     9        PageConfiguration.m_relatedPage keeps WebPageProxy alive after its WebView has been destroyed.
     10        This leads to WebPageProxy object leaks when the client keeps chaining related views.
     11
     12        In this patch, we null our the PageConfiguration's relatedPage in WebPageProxy::close()
     13        to break the chain and make sure we only keep alive 1 relatedPage rather than a chain of
     14        them.
     15
     16        * UIProcess/WebPageProxy.cpp:
     17        (WebKit::WebPageProxy::close):
     18
    1192016-06-24  Jer Noble  <jer.noble@apple.com>
    220
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r202408 r202426  
    871871    m_process->processPool().supplement<WebNotificationManagerProxy>()->clearNotifications(this);
    872872
     873    // Null out related WebPageProxy to avoid leaks.
     874    m_configuration->setRelatedPage(nullptr);
     875
    873876#if PLATFORM(IOS)
    874877    // Make sure we don't hold a process assertion after getting closed.
Note: See TracChangeset for help on using the changeset viewer.