Changeset 150474 in webkit


Ignore:
Timestamp:
May 21, 2013 1:38:04 PM (11 years ago)
Author:
ap@apple.com
Message:

<rdar://problem/13929704> [WK2] WebKitTestRunner always crashes on exit
https://bugs.webkit.org/show_bug.cgi?id=116568

Reviewed by Anders Carlsson.

  • WebKitTestRunner/WebNotificationProvider.cpp: (WTR::WebNotificationProvider::~WebNotificationProvider):
  • WebKitTestRunner/WebNotificationProvider.h: When the provider is destroyed, it should no longer be registered with the manager.
  • WebKitTestRunner/GeolocationProviderMock.cpp: (WTR::GeolocationProviderMock::~GeolocationProviderMock):
  • WebKitTestRunner/GeolocationProviderMock.h: I wasn't seeing a crash here, but this code has the same issue as notification provider, so applying the same fix.
  • WebKitTestRunner/TestController.cpp: (WTR::TestController::~TestController): Close icon database. I started seeing ASSERT(!isOpen()) in WebCore IconDatabase destructor having fixed the above.
Location:
trunk/Tools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r150472 r150474  
     12013-05-21  Alexey Proskuryakov  <ap@apple.com>
     2
     3        <rdar://problem/13929704> [WK2] WebKitTestRunner always crashes on exit
     4        https://bugs.webkit.org/show_bug.cgi?id=116568
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * WebKitTestRunner/WebNotificationProvider.cpp:
     9        (WTR::WebNotificationProvider::~WebNotificationProvider):
     10        * WebKitTestRunner/WebNotificationProvider.h:
     11        When the provider is destroyed, it should no longer be registered with the manager.
     12
     13        * WebKitTestRunner/GeolocationProviderMock.cpp:
     14        (WTR::GeolocationProviderMock::~GeolocationProviderMock):
     15        * WebKitTestRunner/GeolocationProviderMock.h:
     16        I wasn't seeing a crash here, but this code has the same issue as notification
     17        provider, so applying the same fix.
     18
     19        * WebKitTestRunner/TestController.cpp: (WTR::TestController::~TestController):
     20        Close icon database. I started seeing ASSERT(!isOpen()) in WebCore IconDatabase
     21        destructor having fixed the above.
     22
    1232013-05-21  Commit Queue  <commit-queue@webkit.org>
    224
  • trunk/Tools/WebKitTestRunner/GeolocationProviderMock.cpp

    r130416 r150474  
    5959}
    6060
     61GeolocationProviderMock::~GeolocationProviderMock()
     62{
     63    WKGeolocationManagerSetProvider(m_geolocationManager, 0);
     64}
     65
    6166void GeolocationProviderMock::setPosition(double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
    6267{
  • trunk/Tools/WebKitTestRunner/GeolocationProviderMock.h

    r130416 r150474  
    3434public:
    3535    GeolocationProviderMock(WKContextRef);
     36    ~GeolocationProviderMock();
    3637
    3738    void setPosition(double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed);
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r149335 r150474  
    3434#include <WebKit2/WKContextPrivate.h>
    3535#include <WebKit2/WKCredential.h>
     36#include <WebKit2/WKIconDatabase.h>
    3637#include <WebKit2/WKNotification.h>
    3738#include <WebKit2/WKNotificationManager.h>
     
    121122TestController::~TestController()
    122123{
     124    WKIconDatabaseClose(WKContextGetIconDatabase(m_context.get()));
     125
    123126    platformDestroy();
    124127}
  • trunk/Tools/WebKitTestRunner/WebNotificationProvider.cpp

    r127028 r150474  
    6262WebNotificationProvider::WebNotificationProvider()
    6363{
     64}
     65
     66WebNotificationProvider::~WebNotificationProvider()
     67{
     68    WKNotificationManagerSetProvider(m_notificationManager.get(), 0);
    6469}
    6570
  • trunk/Tools/WebKitTestRunner/WebNotificationProvider.h

    r127026 r150474  
    3737public:
    3838    WebNotificationProvider();
     39    ~WebNotificationProvider();
    3940    WKNotificationProvider provider();
    4041
Note: See TracChangeset for help on using the changeset viewer.