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

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

Issue 1857713004: DevTools: simplify the async instrumentation harness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: same with scriptpromiseresolver 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/SQLStatement.cpp
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLStatement.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLStatement.cpp
index 95f379941c1b1de7ec3a8f839e90b6e87e87bc99..db58b3d4a7f29e65670324986d1f37d7fe594045 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLStatement.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLStatement.cpp
@@ -53,10 +53,8 @@ SQLStatement::SQLStatement(Database* database, SQLStatementCallback* callback,
SQLStatementErrorCallback* errorCallback)
: m_statementCallback(callback)
, m_statementErrorCallback(errorCallback)
- , m_asyncOperationId(0)
{
- if (hasCallback() || hasErrorCallback())
dgozman 2016/04/06 02:31:08 Bring this if back.
- m_asyncOperationId = InspectorInstrumentation::traceAsyncOperationStarting(database->getExecutionContext(), "SQLStatement");
+ InspectorInstrumentation::scheduleAsyncTask(database->getExecutionContext(), "SQLStatement", this);
}
SQLStatement::~SQLStatement()
@@ -96,7 +94,7 @@ bool SQLStatement::performCallback(SQLTransaction* transaction)
SQLStatementErrorCallback* errorCallback = m_statementErrorCallback.release();
SQLErrorData* error = m_backend->sqlError();
- InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncOperationCompletedCallbackStarting(transaction->database()->getExecutionContext(), m_asyncOperationId);
+ InspectorInstrumentation::AsyncTask asyncTask(transaction->database()->getExecutionContext(), this);
// Call the appropriate statement callback and track if it resulted in an error,
// because then we need to jump to the transaction error callback.
@@ -107,8 +105,6 @@ bool SQLStatement::performCallback(SQLTransaction* transaction)
callbackError = !callback->handleEvent(transaction, m_backend->sqlResultSet());
}
- InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
-
return callbackError;
}

Powered by Google App Engine
This is Rietveld 408576698