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

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

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 7e8002f371d8c0e965853826ff91ad54bed114cf..1d3b8814084787311aefda7c9b5c1aac34d6b543 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
@@ -45,6 +45,8 @@ DatabaseThread::DatabaseThread()
, m_cleanupSync(0)
, m_terminationRequested(false)
{
+ m_openDatabaseSet.reserveCapacityForSize(1000);
haraken 2016/01/07 08:06:21 What is this change for?
+ ASSERT(isMainThread());
}
DatabaseThread::~DatabaseThread()
@@ -63,7 +65,7 @@ void DatabaseThread::start()
{
if (m_thread)
return;
- m_thread = WebThreadSupportingGC::create("WebCore: Database");
+ m_thread = WebThreadSupportingGC::create("WebCore: Database", ThreadState::PerThreadHeapEnabled);
m_thread->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(&DatabaseThread::setupDatabaseThread, this)));
}

Powered by Google App Engine
This is Rietveld 408576698