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

Unified Diff: Source/modules/webdatabase/SQLTransaction.cpp

Issue 210833005: Oilpan: Prepare to move SQLError to oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: apply comments Created 6 years, 9 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/SQLTransaction.h ('k') | Source/modules/webdatabase/SQLTransactionBackend.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webdatabase/SQLTransaction.cpp
diff --git a/Source/modules/webdatabase/SQLTransaction.cpp b/Source/modules/webdatabase/SQLTransaction.cpp
index 89d2d42f3b3bc82baf486dfd8d4b9c2f5f8dd191..866459773200dec024fdf94050c161647ebc98c8 100644
--- a/Source/modules/webdatabase/SQLTransaction.cpp
+++ b/Source/modules/webdatabase/SQLTransaction.cpp
@@ -157,7 +157,7 @@ SQLTransactionState SQLTransaction::deliverTransactionCallback()
SQLTransactionState nextState = SQLTransactionState::RunStatements;
if (shouldDeliverErrorCallback) {
m_database->reportStartTransactionResult(5, SQLError::UNKNOWN_ERR, 0);
- m_transactionError = SQLError::create(SQLError::UNKNOWN_ERR, "the SQLTransactionCallback was null or threw an exception");
+ m_transactionError = SQLErrorData::create(SQLError::UNKNOWN_ERR, "the SQLTransactionCallback was null or threw an exception");
nextState = SQLTransactionState::DeliverTransactionErrorCallback;
}
m_database->reportStartTransactionResult(0, -1, 0); // OK
@@ -174,11 +174,13 @@ SQLTransactionState SQLTransaction::deliverTransactionErrorCallback()
// must be waiting in the idle state waiting for this state to finish.
// Hence, it's thread safe to fetch the backend transactionError without
// a lock.
- if (!m_transactionError)
- m_transactionError = m_backend->transactionError();
-
+ if (!m_transactionError) {
+ ASSERT(m_backend->transactionError());
+ m_transactionError = SQLErrorData::create(*m_backend->transactionError());
+ }
ASSERT(m_transactionError);
- errorCallback->handleEvent(m_transactionError.get());
+ RefPtrWillBeRawPtr<SQLError> error = SQLError::create(*m_transactionError);
+ errorCallback->handleEvent(error.get());
m_transactionError = nullptr;
}
@@ -205,7 +207,7 @@ SQLTransactionState SQLTransaction::deliverStatementCallback()
if (result) {
m_database->reportCommitTransactionResult(2, SQLError::UNKNOWN_ERR, 0);
- m_transactionError = SQLError::create(SQLError::UNKNOWN_ERR, "the statement callback raised an exception or statement error callback did not return false");
+ m_transactionError = SQLErrorData::create(SQLError::UNKNOWN_ERR, "the statement callback raised an exception or statement error callback did not return false");
return nextStateForTransactionError();
}
return SQLTransactionState::RunStatements;
« no previous file with comments | « Source/modules/webdatabase/SQLTransaction.h ('k') | Source/modules/webdatabase/SQLTransactionBackend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698