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

Unified Diff: Source/modules/webdatabase/sqlite/SQLiteStatement.cpp

Issue 332393002: [oilpan]: Add SafePointAwareMutexLocker to allow GC when waiting for lock. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review feedback Created 6 years, 6 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
« no previous file with comments | « Source/modules/webdatabase/sqlite/SQLiteFileSystem.cpp ('k') | Source/platform/heap/ThreadState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webdatabase/sqlite/SQLiteStatement.cpp
diff --git a/Source/modules/webdatabase/sqlite/SQLiteStatement.cpp b/Source/modules/webdatabase/sqlite/SQLiteStatement.cpp
index c7691d030ad16aebca521821daa242876507aac1..3ae9f8156db5bb107e2e591d172621c8aacf7e95 100644
--- a/Source/modules/webdatabase/sqlite/SQLiteStatement.cpp
+++ b/Source/modules/webdatabase/sqlite/SQLiteStatement.cpp
@@ -59,12 +59,13 @@ int SQLiteStatement::prepare()
{
ASSERT(!m_isPrepared);
+ CString query = m_query.stripWhiteSpace().utf8();
+
+ ThreadState::SafePointScope scope(ThreadState::HeapPointersOnStack);
MutexLocker databaseLock(m_database.databaseMutex());
if (m_database.isInterrupted())
return SQLITE_INTERRUPT;
- CString query = m_query.stripWhiteSpace().utf8();
-
WTF_LOG(SQLDatabase, "SQL - prepare - %s", query.data());
// Pass the length of the string including the null character to sqlite3_prepare_v2;
@@ -87,6 +88,7 @@ int SQLiteStatement::prepare()
int SQLiteStatement::step()
{
+ ThreadState::SafePointScope scope(ThreadState::HeapPointersOnStack);
MutexLocker databaseLock(m_database.databaseMutex());
if (m_database.isInterrupted())
return SQLITE_INTERRUPT;
« no previous file with comments | « Source/modules/webdatabase/sqlite/SQLiteFileSystem.cpp ('k') | Source/platform/heap/ThreadState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698