Changeset 248431 in webkit


Ignore:
Timestamp:
Aug 8, 2019 11:41:23 AM (5 years ago)
Author:
Chris Dumez
Message:

Make IDBRequest ThreadSafeRefCounted
https://bugs.webkit.org/show_bug.cgi?id=200540

Reviewed by Alex Christensen.

Make IDBRequest ThreadSafeRefCounted, as it looks like it is being ref'd / deref'd
from several threads, in IDBConnectionProxy::notifyOpenDBRequestBlocked() for
example.

  • Modules/indexeddb/IDBRequest.h:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r248410 r248431  
     12019-08-08  Chris Dumez  <cdumez@apple.com>
     2
     3        Make IDBRequest ThreadSafeRefCounted
     4        https://bugs.webkit.org/show_bug.cgi?id=200540
     5
     6        Reviewed by Alex Christensen.
     7
     8        Make IDBRequest ThreadSafeRefCounted, as it looks like it is being ref'd / deref'd
     9        from several threads, in IDBConnectionProxy::notifyOpenDBRequestBlocked() for
     10        example.
     11
     12        * Modules/indexeddb/IDBRequest.h:
     13
    1142019-08-08  Brady Eidson  <beidson@apple.com>
    215
  • trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h

    r244436 r248431  
    4242#include <wtf/Function.h>
    4343#include <wtf/Scope.h>
     44#include <wtf/ThreadSafeRefCounted.h>
    4445#include <wtf/WeakPtr.h>
    4546
     
    6162}
    6263
    63 class IDBRequest : public EventTargetWithInlineData, public IDBActiveDOMObject, public RefCounted<IDBRequest>, public CanMakeWeakPtr<IDBRequest> {
     64class IDBRequest : public EventTargetWithInlineData, public IDBActiveDOMObject, public ThreadSafeRefCounted<IDBRequest>, public CanMakeWeakPtr<IDBRequest> {
    6465    WTF_MAKE_ISO_ALLOCATED(IDBRequest);
    6566public:
     
    103104    ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
    104105
    105     using RefCounted::ref;
    106     using RefCounted::deref;
     106    using ThreadSafeRefCounted::ref;
     107    using ThreadSafeRefCounted::deref;
    107108
    108109    void completeRequestAndDispatchEvent(const IDBResultData&);
     
    161162    virtual void cancelForStop();
    162163
    163     void refEventTarget() final { RefCounted::ref(); }
    164     void derefEventTarget() final { RefCounted::deref(); }
     164    void refEventTarget() final { ThreadSafeRefCounted::ref(); }
     165    void derefEventTarget() final { ThreadSafeRefCounted::deref(); }
    165166    void uncaughtExceptionInEventHandler() final;
    166167
Note: See TracChangeset for help on using the changeset viewer.