• dimich@chromium.org's avatar
    2009-04-14 Dmitry Titov <dimich@chromium.org> · 6c22fc2d
    dimich@chromium.org authored
            Reviewed by Dimitri Glazkov.
    
            https://bugs.webkit.org/show_bug.cgi?id=25163
            Upstream fix for releasing v8 objects on worker thread termination in Chromium.
    
            * bindings/v8/V8DOMMap.cpp:
            (WebCore::domDataList): Now uses Vector instead of HashMap.
            (WebCore::domDataListMutex):
            (WebCore::ThreadSpecificDOMData::ThreadSpecificDOMData):  remove usage of currentThread();
            (WebCore::ThreadSpecificDOMData::~ThreadSpecificDOMData): ditto.
            (WebCore::NonMainThreadSpecificDOMData::~NonMainThreadSpecificDOMData): moved call to removeAllDOMObjectsInCurrentThread() to ~WorkerScriptController.
            (WebCore::handleWeakObjectInOwningThread):
            (WebCore::derefDelayedObjects):
            (WebCore::removeAllDOMObjectsInCurrentThread): not static anymore.
            * bindings/v8/V8DOMMap.h:
            * bindings/v8/WorkerContextExecutionProxy.cpp:
            (WebCore::WorkerContextExecutionProxy::dispose): removed code that avoided dual-dereference of WorkerContext.
            (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): this ref() is countered in removeAllDOMObjectsInCurrentThread(), when the WorkerContext is removed from the v8 map.
            * bindings/v8/WorkerScriptController.cpp:
            (WebCore::WorkerScriptController::~WorkerScriptController):
    
    git-svn-id: svn://svn.chromium.org/blink/trunk@42504 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    6c22fc2d
ChangeLog 3.07 MB
The source could not be displayed because it is larger than 1 MB. You can load it anyway or download it instead.