Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Unified Diff: third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp

Issue 1904283004: Replace threadSafeBind() + GCed pointers with CrossThreadPersistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp1912053002
Patch Set: Rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
index d49a6126d75856b6990f8cceab7f08f828acedd4..8d55428bc69149228abb98e26807081a8dcfb8ac 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
@@ -65,7 +65,7 @@ void DatabaseThread::start()
if (m_thread)
return;
m_thread = WebThreadSupportingGC::create("WebCore: Database");
- m_thread->postTask(BLINK_FROM_HERE, threadSafeBind(&DatabaseThread::setupDatabaseThread, this));
+ m_thread->postTask(BLINK_FROM_HERE, threadSafeBind(&DatabaseThread::setupDatabaseThread, wrapCrossThreadPersistent(this)));
}
void DatabaseThread::setupDatabaseThread()
@@ -83,7 +83,7 @@ void DatabaseThread::terminate()
m_terminationRequested = true;
m_cleanupSync = &sync;
WTF_LOG(StorageAPI, "DatabaseThread %p was asked to terminate\n", this);
- m_thread->postTask(BLINK_FROM_HERE, threadSafeBind(&DatabaseThread::cleanupDatabaseThread, this));
+ m_thread->postTask(BLINK_FROM_HERE, threadSafeBind(&DatabaseThread::cleanupDatabaseThread, wrapCrossThreadPersistent(this)));
}
sync.waitForTaskCompletion();
// The WebThread destructor blocks until all the tasks of the database

Powered by Google App Engine
This is Rietveld 408576698