Changeset 95012 in webkit


Ignore:
Timestamp:
Sep 12, 2011 9:15:59 PM (13 years ago)
Author:
levin@chromium.org
Message:

[chromium] Remove AllowCrossThreadAccess for WorkerFileWriterCallbacksBridge.
https://bugs.webkit.org/show_bug.cgi?id=67943

Reviewed by Adam Barth.

  • src/WorkerFileWriterCallbacksBridge.cpp: Removed AllowCrossThreadAccess

allowing the automatic ref counting to work. This was previous needed when
the ref counting wasn't working but that was fixed in r94986. Note that the
design was to have ref counting since the methods take PassRefPtr and the
class is ThreadSafeRefCounted. (Ideally we have noticed this flaw when
adding in AllowCrossThreadAccess.)
(WebKit::WorkerFileWriterCallbacksBridge::postWriteToMainThread):
(WebKit::WorkerFileWriterCallbacksBridge::postTruncateToMainThread):
(WebKit::WorkerFileWriterCallbacksBridge::postAbortToMainThread):
(WebKit::WorkerFileWriterCallbacksBridge::didWrite):
(WebKit::WorkerFileWriterCallbacksBridge::didFail):
(WebKit::WorkerFileWriterCallbacksBridge::didTruncate):
(WebKit::WorkerFileWriterCallbacksBridge::postInitToMainThread):
(WebKit::WorkerFileWriterCallbacksBridge::dispatchTaskToMainThread):
(WebKit::WorkerFileWriterCallbacksBridge::dispatchTaskToWorkerThread):

Location:
trunk/Source/WebKit/chromium
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r94971 r95012  
     12011-09-12  David Levin  <levin@chromium.org>
     2
     3        [chromium] Remove AllowCrossThreadAccess for WorkerFileWriterCallbacksBridge.
     4        https://bugs.webkit.org/show_bug.cgi?id=67943
     5
     6        Reviewed by Adam Barth.
     7
     8        * src/WorkerFileWriterCallbacksBridge.cpp: Removed AllowCrossThreadAccess
     9        allowing the automatic ref counting to work. This was previous needed when
     10        the ref counting wasn't working but that was fixed in r94986. Note that the
     11        design was to have ref counting since the methods take PassRefPtr and the
     12        class is ThreadSafeRefCounted. (Ideally we have noticed this flaw when
     13        adding in AllowCrossThreadAccess.)
     14        (WebKit::WorkerFileWriterCallbacksBridge::postWriteToMainThread):
     15        (WebKit::WorkerFileWriterCallbacksBridge::postTruncateToMainThread):
     16        (WebKit::WorkerFileWriterCallbacksBridge::postAbortToMainThread):
     17        (WebKit::WorkerFileWriterCallbacksBridge::didWrite):
     18        (WebKit::WorkerFileWriterCallbacksBridge::didFail):
     19        (WebKit::WorkerFileWriterCallbacksBridge::didTruncate):
     20        (WebKit::WorkerFileWriterCallbacksBridge::postInitToMainThread):
     21        (WebKit::WorkerFileWriterCallbacksBridge::dispatchTaskToMainThread):
     22        (WebKit::WorkerFileWriterCallbacksBridge::dispatchTaskToWorkerThread):
     23
    1242011-09-08  Nat Duca  <nduca@chromium.org>
    225
  • trunk/Source/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.cpp

    r94231 r95012  
    6363    m_operationInProgress = true;
    6464    dispatchTaskToMainThread(createCallbackTask(&writeOnMainThread,
    65                                                 AllowCrossThreadAccess(this), position, data));
     65                                                this, position, data));
    6666}
    6767
     
    7171    m_operationInProgress = true;
    7272    dispatchTaskToMainThread(createCallbackTask(&truncateOnMainThread,
    73                                                 AllowCrossThreadAccess(this), length));
     73                                                this, length));
    7474}
    7575
     
    7777{
    7878    ASSERT(m_operationInProgress);
    79     dispatchTaskToMainThread(createCallbackTask(&abortOnMainThread, AllowCrossThreadAccess(this)));
     79    dispatchTaskToMainThread(createCallbackTask(&abortOnMainThread, this));
    8080}
    8181
     
    116116void WorkerFileWriterCallbacksBridge::didWrite(long long bytes, bool complete)
    117117{
    118     dispatchTaskToWorkerThread(createCallbackTask(&didWriteOnWorkerThread, AllowCrossThreadAccess(this), bytes, complete));
     118    dispatchTaskToWorkerThread(createCallbackTask(&didWriteOnWorkerThread, this, bytes, complete));
    119119}
    120120
    121121void WorkerFileWriterCallbacksBridge::didFail(WebFileError error)
    122122{
    123     dispatchTaskToWorkerThread(createCallbackTask(&didFailOnWorkerThread, AllowCrossThreadAccess(this), error));
     123    dispatchTaskToWorkerThread(createCallbackTask(&didFailOnWorkerThread, this, error));
    124124}
    125125
    126126void WorkerFileWriterCallbacksBridge::didTruncate()
    127127{
    128     dispatchTaskToWorkerThread(createCallbackTask(&didTruncateOnWorkerThread, AllowCrossThreadAccess(this)));
     128    dispatchTaskToWorkerThread(createCallbackTask(&didTruncateOnWorkerThread, this));
    129129}
    130130
     
    148148{
    149149    dispatchTaskToMainThread(
    150         createCallbackTask(&initOnMainThread, AllowCrossThreadAccess(this), path));
     150        createCallbackTask(&initOnMainThread, this, path));
    151151}
    152152
     
    201201    ASSERT(m_workerContext->isContextThread());
    202202    WebWorkerBase::dispatchTaskToMainThread(
    203         createCallbackTask(&runTaskOnMainThread, AllowCrossThreadAccess(this), task));
     203        createCallbackTask(&runTaskOnMainThread, this, task));
    204204}
    205205
     
    208208    ASSERT(isMainThread());
    209209    m_proxy->postTaskForModeToWorkerContext(
    210         createCallbackTask(&runTaskOnWorkerThread, AllowCrossThreadAccess(this), task), m_mode);
     210        createCallbackTask(&runTaskOnWorkerThread, this, task), m_mode);
    211211}
    212212
Note: See TracChangeset for help on using the changeset viewer.