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

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

Issue 1857713004: DevTools: simplify the async instrumentation harness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/SQLTransaction.cpp
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp
index a1df309b0382c5da9fedf3e81bff7881bcbf8a2e..89f734b4cfd5643b3e9bb4398d0bac7e3a11de0b 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp
@@ -31,7 +31,6 @@
#include "bindings/core/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
#include "core/html/VoidCallback.h"
-#include "core/inspector/InspectorInstrumentation.h"
#include "modules/webdatabase/Database.h"
#include "modules/webdatabase/DatabaseAuthorizer.h"
#include "modules/webdatabase/DatabaseContext.h"
@@ -65,7 +64,6 @@ SQLTransaction::SQLTransaction(Database* db, SQLTransactionCallback* callback,
, m_readOnly(readOnly)
{
ASSERT(m_database);
- m_asyncOperationId = InspectorInstrumentation::traceAsyncOperationStarting(db->getExecutionContext(), "SQLTransaction");
}
SQLTransaction::~SQLTransaction()
@@ -154,9 +152,7 @@ SQLTransactionState SQLTransaction::deliverTransactionCallback()
// 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,8 +169,6 @@ SQLTransactionState SQLTransaction::deliverTransactionCallback()
SQLTransactionState SQLTransaction::deliverTransactionErrorCallback()
{
- InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncOperationCompletedCallbackStarting(m_database->getExecutionContext(), m_asyncOperationId);
-
// Spec 4.3.2.10: If exists, invoke error callback with the last
// error to have occurred in this transaction.
if (SQLTransactionErrorCallback* errorCallback = m_errorCallback.release()) {
@@ -192,7 +186,6 @@ SQLTransactionState SQLTransaction::deliverTransactionErrorCallback()
m_transactionError = nullptr;
}
- InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
clearCallbacks();
// Spec 4.3.2.10: Rollback the transaction.
@@ -232,13 +225,10 @@ SQLTransactionState SQLTransaction::deliverQuotaIncreaseCallback()
SQLTransactionState SQLTransaction::deliverSuccessCallback()
{
- InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncOperationCompletedCallbackStarting(m_database->getExecutionContext(), m_asyncOperationId);
-
// 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

Powered by Google App Engine
This is Rietveld 408576698