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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp

Issue 2746333002: DevTools: move recurring flag into AsyncTask, control cancelation from embedder only. (Closed)
Patch Set: using _END now Created 3 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
Index: third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp b/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp
index 9ee8d79441185e9f8a26e594b6611831d9d24ac4..484478c95ebe93b776b2d69e63105cf9547b51ec 100644
--- a/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp
@@ -63,7 +63,7 @@ std::unique_ptr<WebIDBCallbacksImpl> WebIDBCallbacksImpl::create(
WebIDBCallbacksImpl::WebIDBCallbacksImpl(IDBRequest* request)
: m_request(request) {
probe::asyncTaskScheduled(m_request->getExecutionContext(),
- IndexedDBNames::IndexedDB, this, true);
+ IndexedDBNames::IndexedDB, this);
}
WebIDBCallbacksImpl::~WebIDBCallbacksImpl() {
@@ -77,7 +77,7 @@ void WebIDBCallbacksImpl::onError(const WebIDBDatabaseError& error) {
if (!m_request)
return;
- probe::AsyncTask asyncTask(m_request->getExecutionContext(), this);
+ probe::AsyncTask asyncTask(m_request->getExecutionContext(), this, "error");
m_request->onError(DOMException::create(error.code(), error.message()));
}
@@ -88,7 +88,7 @@ void WebIDBCallbacksImpl::onSuccess(const WebVector<WebString>& webStringList) {
Vector<String> stringList;
for (size_t i = 0; i < webStringList.size(); ++i)
stringList.push_back(webStringList[i]);
- probe::AsyncTask asyncTask(m_request->getExecutionContext(), this);
+ probe::AsyncTask asyncTask(m_request->getExecutionContext(), this, "success");
m_request->onSuccess(stringList);
}
@@ -99,7 +99,7 @@ void WebIDBCallbacksImpl::onSuccess(WebIDBCursor* cursor,
if (!m_request)
return;
- probe::AsyncTask asyncTask(m_request->getExecutionContext(), this);
+ probe::AsyncTask asyncTask(m_request->getExecutionContext(), this, "success");
m_request->onSuccess(WTF::wrapUnique(cursor), key, primaryKey,
IDBValue::create(value, m_request->isolate()));
}
@@ -108,7 +108,8 @@ void WebIDBCallbacksImpl::onSuccess(WebIDBDatabase* backend,
const WebIDBMetadata& metadata) {
std::unique_ptr<WebIDBDatabase> db = WTF::wrapUnique(backend);
if (m_request) {
- probe::AsyncTask asyncTask(m_request->getExecutionContext(), this);
+ probe::AsyncTask asyncTask(m_request->getExecutionContext(), this,
+ "success");
m_request->onSuccess(std::move(db), IDBDatabaseMetadata(metadata));
} else if (db) {
db->close();
@@ -119,7 +120,7 @@ void WebIDBCallbacksImpl::onSuccess(const WebIDBKey& key) {
if (!m_request)
return;
- probe::AsyncTask asyncTask(m_request->getExecutionContext(), this);
+ probe::AsyncTask asyncTask(m_request->getExecutionContext(), this, "success");
m_request->onSuccess(key);
}
@@ -127,7 +128,7 @@ void WebIDBCallbacksImpl::onSuccess(const WebIDBValue& value) {
if (!m_request)
return;
- probe::AsyncTask asyncTask(m_request->getExecutionContext(), this);
+ probe::AsyncTask asyncTask(m_request->getExecutionContext(), this, "success");
m_request->onSuccess(IDBValue::create(value, m_request->isolate()));
}
@@ -135,7 +136,7 @@ void WebIDBCallbacksImpl::onSuccess(const WebVector<WebIDBValue>& values) {
if (!m_request)
return;
- probe::AsyncTask asyncTask(m_request->getExecutionContext(), this);
+ probe::AsyncTask asyncTask(m_request->getExecutionContext(), this, "success");
Vector<RefPtr<IDBValue>> idbValues(values.size());
for (size_t i = 0; i < values.size(); ++i)
idbValues[i] = IDBValue::create(values[i], m_request->isolate());
@@ -146,7 +147,7 @@ void WebIDBCallbacksImpl::onSuccess(long long value) {
if (!m_request)
return;
- probe::AsyncTask asyncTask(m_request->getExecutionContext(), this);
+ probe::AsyncTask asyncTask(m_request->getExecutionContext(), this, "success");
m_request->onSuccess(value);
}
@@ -154,7 +155,7 @@ void WebIDBCallbacksImpl::onSuccess() {
if (!m_request)
return;
- probe::AsyncTask asyncTask(m_request->getExecutionContext(), this);
+ probe::AsyncTask asyncTask(m_request->getExecutionContext(), this, "success");
m_request->onSuccess();
}
@@ -164,7 +165,7 @@ void WebIDBCallbacksImpl::onSuccess(const WebIDBKey& key,
if (!m_request)
return;
- probe::AsyncTask asyncTask(m_request->getExecutionContext(), this);
+ probe::AsyncTask asyncTask(m_request->getExecutionContext(), this, "success");
m_request->onSuccess(key, primaryKey,
IDBValue::create(value, m_request->isolate()));
}
@@ -173,7 +174,7 @@ void WebIDBCallbacksImpl::onBlocked(long long oldVersion) {
if (!m_request)
return;
- probe::AsyncTask asyncTask(m_request->getExecutionContext(), this);
+ probe::AsyncTask asyncTask(m_request->getExecutionContext(), this, "blocked");
m_request->onBlocked(oldVersion);
}
@@ -184,7 +185,8 @@ void WebIDBCallbacksImpl::onUpgradeNeeded(long long oldVersion,
WebString dataLossMessage) {
std::unique_ptr<WebIDBDatabase> db = WTF::wrapUnique(database);
if (m_request) {
- probe::AsyncTask asyncTask(m_request->getExecutionContext(), this);
+ probe::AsyncTask asyncTask(m_request->getExecutionContext(), this,
+ "upgradeNeeded");
m_request->onUpgradeNeeded(
oldVersion, std::move(db), IDBDatabaseMetadata(metadata),
static_cast<WebIDBDataLoss>(dataLoss), dataLossMessage);

Powered by Google App Engine
This is Rietveld 408576698