| 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 a7aeccf3ae64dfdd1f5d00a89e78a2936a4cb523..698d743f8834ed55fd1a898a3addd4d8a86628e7 100644
 | 
| --- a/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp
 | 
| +++ b/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp
 | 
| @@ -60,19 +60,18 @@ PassOwnPtr<WebIDBCallbacksImpl> WebIDBCallbacksImpl::create(IDBRequest* request)
 | 
|  WebIDBCallbacksImpl::WebIDBCallbacksImpl(IDBRequest* request)
 | 
|      : m_request(request)
 | 
|  {
 | 
| -    m_asyncOperationId = InspectorInstrumentation::traceAsyncOperationStarting(m_request->getExecutionContext(), "IndexedDB");
 | 
| +    InspectorInstrumentation::scheduleAsyncTask(m_request->getExecutionContext(), "IndexedDB", this);
 | 
|  }
 | 
|  
 | 
|  WebIDBCallbacksImpl::~WebIDBCallbacksImpl()
 | 
|  {
 | 
| -    InspectorInstrumentation::traceAsyncOperationCompleted(m_request->getExecutionContext(), m_asyncOperationId);
 | 
| +    InspectorInstrumentation::cancelAsyncTask(m_request->getExecutionContext(), this);
 | 
|  }
 | 
|  
 | 
|  void WebIDBCallbacksImpl::onError(const WebIDBDatabaseError& error)
 | 
|  {
 | 
| -    InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncCallbackStarting(m_request->getExecutionContext(), m_asyncOperationId);
 | 
| +    InspectorInstrumentation::AsyncTask asyncTask(m_request->getExecutionContext(), this);
 | 
|      m_request->onError(DOMException::create(error.code(), error.message()));
 | 
| -    InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
 | 
|  }
 | 
|  
 | 
|  void WebIDBCallbacksImpl::onSuccess(const WebVector<WebString>& webStringList)
 | 
| @@ -80,82 +79,71 @@ void WebIDBCallbacksImpl::onSuccess(const WebVector<WebString>& webStringList)
 | 
|      Vector<String> stringList;
 | 
|      for (size_t i = 0; i < webStringList.size(); ++i)
 | 
|          stringList.append(webStringList[i]);
 | 
| -    InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncCallbackStarting(m_request->getExecutionContext(), m_asyncOperationId);
 | 
| +    InspectorInstrumentation::AsyncTask asyncTask(m_request->getExecutionContext(), this);
 | 
|      m_request->onSuccess(stringList);
 | 
| -    InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
 | 
|  }
 | 
|  
 | 
|  void WebIDBCallbacksImpl::onSuccess(WebIDBCursor* cursor, const WebIDBKey& key, const WebIDBKey& primaryKey, const WebIDBValue& value)
 | 
|  {
 | 
| -    InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncCallbackStarting(m_request->getExecutionContext(), m_asyncOperationId);
 | 
| +    InspectorInstrumentation::AsyncTask asyncTask(m_request->getExecutionContext(), this);
 | 
|      m_request->onSuccess(adoptPtr(cursor), key, primaryKey, IDBValue::create(value));
 | 
| -    InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
 | 
|  }
 | 
|  
 | 
|  void WebIDBCallbacksImpl::onSuccess(WebIDBDatabase* backend, const WebIDBMetadata& metadata)
 | 
|  {
 | 
| -    InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncCallbackStarting(m_request->getExecutionContext(), m_asyncOperationId);
 | 
| +    InspectorInstrumentation::AsyncTask asyncTask(m_request->getExecutionContext(), this);
 | 
|      m_request->onSuccess(adoptPtr(backend), IDBDatabaseMetadata(metadata));
 | 
| -    InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
 | 
|  }
 | 
|  
 | 
|  void WebIDBCallbacksImpl::onSuccess(const WebIDBKey& key)
 | 
|  {
 | 
| -    InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncCallbackStarting(m_request->getExecutionContext(), m_asyncOperationId);
 | 
| +    InspectorInstrumentation::AsyncTask asyncTask(m_request->getExecutionContext(), this);
 | 
|      m_request->onSuccess(key);
 | 
| -    InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
 | 
|  }
 | 
|  
 | 
|  void WebIDBCallbacksImpl::onSuccess(const WebIDBValue& value)
 | 
|  {
 | 
| -    InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncCallbackStarting(m_request->getExecutionContext(), m_asyncOperationId);
 | 
| +    InspectorInstrumentation::AsyncTask asyncTask(m_request->getExecutionContext(), this);
 | 
|      m_request->onSuccess(IDBValue::create(value));
 | 
| -    InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
 | 
|  }
 | 
|  
 | 
|  void WebIDBCallbacksImpl::onSuccess(const WebVector<WebIDBValue>& values)
 | 
|  {
 | 
| -    InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncCallbackStarting(m_request->getExecutionContext(), m_asyncOperationId);
 | 
| +    InspectorInstrumentation::AsyncTask asyncTask(m_request->getExecutionContext(), this);
 | 
|      Vector<RefPtr<IDBValue>> idbValues(values.size());
 | 
|      for (size_t i = 0; i < values.size(); ++i)
 | 
|          idbValues[i] = IDBValue::create(values[i]);
 | 
|      m_request->onSuccess(idbValues);
 | 
| -    InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
 | 
|  }
 | 
|  
 | 
|  void WebIDBCallbacksImpl::onSuccess(long long value)
 | 
|  {
 | 
| -    InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncCallbackStarting(m_request->getExecutionContext(), m_asyncOperationId);
 | 
| +    InspectorInstrumentation::AsyncTask asyncTask(m_request->getExecutionContext(), this);
 | 
|      m_request->onSuccess(value);
 | 
| -    InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
 | 
|  }
 | 
|  
 | 
|  void WebIDBCallbacksImpl::onSuccess()
 | 
|  {
 | 
| -    InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncCallbackStarting(m_request->getExecutionContext(), m_asyncOperationId);
 | 
| +    InspectorInstrumentation::AsyncTask asyncTask(m_request->getExecutionContext(), this);
 | 
|      m_request->onSuccess();
 | 
| -    InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
 | 
|  }
 | 
|  
 | 
|  void WebIDBCallbacksImpl::onSuccess(const WebIDBKey& key, const WebIDBKey& primaryKey, const WebIDBValue& value)
 | 
|  {
 | 
| -    InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncCallbackStarting(m_request->getExecutionContext(), m_asyncOperationId);
 | 
| +    InspectorInstrumentation::AsyncTask asyncTask(m_request->getExecutionContext(), this);
 | 
|      m_request->onSuccess(key, primaryKey, IDBValue::create(value));
 | 
| -    InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
 | 
|  }
 | 
|  
 | 
|  void WebIDBCallbacksImpl::onBlocked(long long oldVersion)
 | 
|  {
 | 
| -    InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncCallbackStarting(m_request->getExecutionContext(), m_asyncOperationId);
 | 
| +    InspectorInstrumentation::AsyncTask asyncTask(m_request->getExecutionContext(), this);
 | 
|      m_request->onBlocked(oldVersion);
 | 
| -    InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
 | 
|  }
 | 
|  
 | 
|  void WebIDBCallbacksImpl::onUpgradeNeeded(long long oldVersion, WebIDBDatabase* database, const WebIDBMetadata& metadata, unsigned short dataLoss, WebString dataLossMessage)
 | 
|  {
 | 
| -    InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncCallbackStarting(m_request->getExecutionContext(), m_asyncOperationId);
 | 
| +    InspectorInstrumentation::AsyncTask asyncTask(m_request->getExecutionContext(), this);
 | 
|      m_request->onUpgradeNeeded(oldVersion, adoptPtr(database), IDBDatabaseMetadata(metadata), static_cast<WebIDBDataLoss>(dataLoss), dataLossMessage);
 | 
| -    InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
 | 
|  }
 | 
|  
 | 
|  } // namespace blink
 | 
| 
 |