Skip to content
  • kbalazs@webkit.org's avatar
    [Qt][WK2] Left over files and shared memory segments · 792577a5
    kbalazs@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=48985
    
    Reviewed by Andreas Kling.
    
    * Platform/qt/SharedMemoryQt.cpp:
    (WebKit::SharedMemory::create): Force deletion of the QSharedMemory
    object on terminate by connecting QCoreApplication::aboutToQuit with
    deleteLater. Add the object to the CrashHandler as well to release the
    shared memory segment even on crash.
    (WebKit::SharedMemory::~SharedMemory):
    * Shared/qt/CrashHandler.cpp: Added.
    CrashHandler has a container for QObjects that we want to
    destroy on crash. When we got a signal that we interpret as
    a crash then it destroys those objects.
    (WebKit::CrashHandler::CrashHandler):
    (WebKit::CrashHandler::signalHandler):
    (WebKit::CrashHandler::deleteObjects):
    * Shared/qt/CrashHandler.h: Added.
    (WebKit::CrashHandler::instance):
    (WebKit::CrashHandler::didDelete):
    (WebKit::CrashHandler::markForDeletionOnCrash):
    * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
    (WebKit::ProcessLauncherHelper::ProcessLauncherHelper):
    Add the object itself to the CrashHandler to close the QLocalServer
    even on crash. Without that the QLocalServer leaves over socket files on the disk.
    (WebKit::ProcessLauncherHelper::~ProcessLauncherHelper):
    * WebKit2.pro:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    792577a5