Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp |
| diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp |
| index a1df309b0382c5da9fedf3e81bff7881bcbf8a2e..b42ace506bde9041d9cee1662e822943f99badc8 100644 |
| --- a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp |
| +++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp |
| @@ -65,7 +65,7 @@ SQLTransaction::SQLTransaction(Database* db, SQLTransactionCallback* callback, |
| , m_readOnly(readOnly) |
| { |
| ASSERT(m_database); |
| - m_asyncOperationId = InspectorInstrumentation::traceAsyncOperationStarting(db->getExecutionContext(), "SQLTransaction"); |
| + InspectorInstrumentation::scheduleAsyncTask(db->getExecutionContext(), "SQLTransaction", this); |
| } |
| SQLTransaction::~SQLTransaction() |
| @@ -150,13 +150,12 @@ SQLTransactionState SQLTransaction::nextStateForTransactionError() |
| SQLTransactionState SQLTransaction::deliverTransactionCallback() |
| { |
| bool shouldDeliverErrorCallback = false; |
| + InspectorInstrumentation::AsyncTask asyncTask(m_database->getExecutionContext(), this); |
| // Spec 4.3.2 4: Invoke the transaction callback with the new SQLTransaction object |
| if (SQLTransactionCallback* callback = m_callback.release()) { |
| m_executeSqlAllowed = true; |
| - InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncCallbackStarting(m_database->getExecutionContext(), m_asyncOperationId); |
| shouldDeliverErrorCallback = !callback->handleEvent(this); |
| - InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); |
| m_executeSqlAllowed = false; |
| } |
| @@ -173,7 +172,7 @@ SQLTransactionState SQLTransaction::deliverTransactionCallback() |
| SQLTransactionState SQLTransaction::deliverTransactionErrorCallback() |
| { |
| - InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncOperationCompletedCallbackStarting(m_database->getExecutionContext(), m_asyncOperationId); |
| + InspectorInstrumentation::AsyncTask asyncTask(m_database->getExecutionContext(), this); |
| // Spec 4.3.2.10: If exists, invoke error callback with the last |
| // error to have occurred in this transaction. |
| @@ -192,7 +191,6 @@ SQLTransactionState SQLTransaction::deliverTransactionErrorCallback() |
| m_transactionError = nullptr; |
| } |
| - InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); |
| clearCallbacks(); |
| // Spec 4.3.2.10: Rollback the transaction. |
| @@ -201,6 +199,8 @@ SQLTransactionState SQLTransaction::deliverTransactionErrorCallback() |
| SQLTransactionState SQLTransaction::deliverStatementCallback() |
| { |
| + InspectorInstrumentation::AsyncTask asyncTask(m_database->getExecutionContext(), this); |
|
dgozman
2016/04/06 02:31:08
Remove it.
|
| + |
| // Spec 4.3.2.6.6 and 4.3.2.6.3: If the statement callback went wrong, jump to the transaction error callback |
| // Otherwise, continue to loop through the statement queue |
| m_executeSqlAllowed = true; |
| @@ -232,13 +232,10 @@ SQLTransactionState SQLTransaction::deliverQuotaIncreaseCallback() |
| SQLTransactionState SQLTransaction::deliverSuccessCallback() |
| { |
| - InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncOperationCompletedCallbackStarting(m_database->getExecutionContext(), m_asyncOperationId); |
|
dgozman
2016/04/06 02:31:08
Bring it back.
|
| - |
| // Spec 4.3.2.8: Deliver success callback. |
| if (VoidCallback* successCallback = m_successCallback.release()) |
| successCallback->handleEvent(); |
| - InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); |
| clearCallbacks(); |
| // Schedule a "post-success callback" step to return control to the database thread in case there |