Unreviewed, follow-up after r252642
authorysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Nov 2019 22:31:11 +0000 (22:31 +0000)
committerysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Nov 2019 22:31:11 +0000 (22:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=204346

* Modules/indexeddb/IDBActiveDOMObject.h:
* Modules/indexeddb/client/TransactionOperation.h:
(WebCore::IDBClient::TransactionOperation::~TransactionOperation):
(WebCore::IDBClient::TransactionOperation::perform):
(WebCore::IDBClient::TransactionOperation::transitionToCompleteOnThisThread):
(WebCore::IDBClient::TransactionOperation::transitionToComplete):
(WebCore::IDBClient::TransactionOperation::doComplete):
* platform/Supplementable.h:
(WebCore::Supplementable::provideSupplement):
(WebCore::Supplementable::removeSupplement):
(WebCore::Supplementable::requireSupplement):
* platform/Timer.cpp:
(WebCore::TimerBase::~TimerBase):
(WebCore::TimerBase::start):
(WebCore::TimerBase::stop):
(WebCore::TimerBase::setNextFireTime):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252651 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBActiveDOMObject.h
Source/WebCore/Modules/indexeddb/client/TransactionOperation.h
Source/WebCore/platform/Supplementable.h
Source/WebCore/platform/Timer.cpp

index 5df2b55..5f9c6a6 100644 (file)
@@ -1,3 +1,25 @@
+2019-11-19  Yusuke Suzuki  <ysuzuki@apple.com>
+
+        Unreviewed, follow-up after r252642
+        https://bugs.webkit.org/show_bug.cgi?id=204346
+
+        * Modules/indexeddb/IDBActiveDOMObject.h:
+        * Modules/indexeddb/client/TransactionOperation.h:
+        (WebCore::IDBClient::TransactionOperation::~TransactionOperation):
+        (WebCore::IDBClient::TransactionOperation::perform):
+        (WebCore::IDBClient::TransactionOperation::transitionToCompleteOnThisThread):
+        (WebCore::IDBClient::TransactionOperation::transitionToComplete):
+        (WebCore::IDBClient::TransactionOperation::doComplete):
+        * platform/Supplementable.h:
+        (WebCore::Supplementable::provideSupplement):
+        (WebCore::Supplementable::removeSupplement):
+        (WebCore::Supplementable::requireSupplement):
+        * platform/Timer.cpp:
+        (WebCore::TimerBase::~TimerBase):
+        (WebCore::TimerBase::start):
+        (WebCore::TimerBase::stop):
+        (WebCore::TimerBase::setNextFireTime):
+
 2019-11-19  Daniel Bates  <dabates@apple.com>
 
         ASSERTION FAILURE: useDownstream ? (result > vp) : (result < vp) in WebCore::nextSentenceBoundaryInDirection()
index 17842e0..d2f40d9 100644 (file)
@@ -38,7 +38,7 @@ public:
     Thread& originThread() const { return m_originThread.get(); }
 
     void contextDestroyed() final {
-        ASSERT(canCurrentThreadAccessThreadLocalData(m_originThread.get()));
+        ASSERT(canCurrentThreadAccessThreadLocalData(originThread()));
 
         Locker<Lock> lock(m_scriptExecutionContextLock);
         ActiveDOMObject::contextDestroyed();
index 3e13702..e2f148a 100644 (file)
@@ -51,12 +51,12 @@ class TransactionOperation : public ThreadSafeRefCounted<TransactionOperation> {
 public:
     virtual ~TransactionOperation()
     {
-        ASSERT(canCurrentThreadAccessThreadLocalData(m_originThread.get()));
+        ASSERT(canCurrentThreadAccessThreadLocalData(originThread()));
     }
 
     void perform()
     {
-        ASSERT(canCurrentThreadAccessThreadLocalData(m_originThread.get()));
+        ASSERT(canCurrentThreadAccessThreadLocalData(originThread()));
         ASSERT(m_performFunction);
         m_performFunction();
         m_performFunction = { };
@@ -64,7 +64,7 @@ public:
 
     void transitionToCompleteOnThisThread(const IDBResultData& data)
     {
-        ASSERT(canCurrentThreadAccessThreadLocalData(m_originThread.get()));
+        ASSERT(canCurrentThreadAccessThreadLocalData(originThread()));
         m_transaction->operationCompletedOnServer(data, *this);
     }
 
@@ -72,7 +72,7 @@ public:
     {
         ASSERT(isMainThread());
 
-        if (canCurrentThreadAccessThreadLocalData(m_originThread.get()))
+        if (canCurrentThreadAccessThreadLocalData(originThread()))
             transitionToCompleteOnThisThread(data);
         else {
             m_transaction->performCallbackOnOriginThread(*this, &TransactionOperation::transitionToCompleteOnThisThread, data);
@@ -83,7 +83,7 @@ public:
 
     void doComplete(const IDBResultData& data)
     {
-        ASSERT(canCurrentThreadAccessThreadLocalData(m_originThread.get()));
+        ASSERT(canCurrentThreadAccessThreadLocalData(originThread()));
 
         if (m_performFunction)
             m_performFunction = { };
index 2240a39..196fa53 100644 (file)
@@ -98,20 +98,20 @@ class Supplementable {
 public:
     void provideSupplement(const char* key, std::unique_ptr<Supplement<T>> supplement)
     {
-        ASSERT(canCurrentThreadAccessThreadLocalData(m_thread.get()));
+        ASSERT(canCurrentThreadAccessThreadLocalData(m_thread));
         ASSERT(!m_supplements.get(key));
         m_supplements.set(key, WTFMove(supplement));
     }
 
     void removeSupplement(const char* key)
     {
-        ASSERT(canCurrentThreadAccessThreadLocalData(m_thread.get()));
+        ASSERT(canCurrentThreadAccessThreadLocalData(m_thread));
         m_supplements.remove(key);
     }
 
     Supplement<T>* requireSupplement(const char* key)
     {
-        ASSERT(canCurrentThreadAccessThreadLocalData(m_thread.get()));
+        ASSERT(canCurrentThreadAccessThreadLocalData(m_thread));
         return m_supplements.get(key);
     }
 
index 4dbaeb6..00d19b2 100644 (file)
@@ -258,8 +258,8 @@ TimerBase::TimerBase()
 
 TimerBase::~TimerBase()
 {
-    ASSERT(canCurrentThreadAccessThreadLocalData(m_thread.get()));
-    RELEASE_ASSERT(canCurrentThreadAccessThreadLocalData(m_thread.get()) || shouldSuppressThreadSafetyCheck());
+    ASSERT(canCurrentThreadAccessThreadLocalData(m_thread));
+    RELEASE_ASSERT(canCurrentThreadAccessThreadLocalData(m_thread) || shouldSuppressThreadSafetyCheck());
     stop();
     ASSERT(!inHeap());
     if (m_heapItem)
@@ -269,7 +269,7 @@ TimerBase::~TimerBase()
 
 void TimerBase::start(Seconds nextFireInterval, Seconds repeatInterval)
 {
-    ASSERT(canCurrentThreadAccessThreadLocalData(m_thread.get()));
+    ASSERT(canCurrentThreadAccessThreadLocalData(m_thread));
 
     m_repeatInterval = repeatInterval;
     setNextFireTime(MonotonicTime::now() + nextFireInterval);
@@ -277,7 +277,7 @@ void TimerBase::start(Seconds nextFireInterval, Seconds repeatInterval)
 
 void TimerBase::stop()
 {
-    ASSERT(canCurrentThreadAccessThreadLocalData(m_thread.get()));
+    ASSERT(canCurrentThreadAccessThreadLocalData(m_thread));
 
     m_repeatInterval = 0_s;
     setNextFireTime(MonotonicTime { });
@@ -461,8 +461,8 @@ void TimerBase::updateHeapIfNeeded(MonotonicTime oldTime)
 
 void TimerBase::setNextFireTime(MonotonicTime newTime)
 {
-    ASSERT(canCurrentThreadAccessThreadLocalData(m_thread.get()));
-    RELEASE_ASSERT(canCurrentThreadAccessThreadLocalData(m_thread.get()) || shouldSuppressThreadSafetyCheck());
+    ASSERT(canCurrentThreadAccessThreadLocalData(m_thread));
+    RELEASE_ASSERT(canCurrentThreadAccessThreadLocalData(m_thread) || shouldSuppressThreadSafetyCheck());
     bool timerHasBeenDeleted = std::isnan(m_unalignedNextFireTime);
     RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!timerHasBeenDeleted);