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

Unified Diff: third_party/WebKit/Source/core/loader/ImageLoader.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/core/loader/ImageLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/ImageLoader.cpp b/third_party/WebKit/Source/core/loader/ImageLoader.cpp
index c7e4591401f96c4bf7d3b9e928b044b0e495b215..425d6921aba02f5c7d6c968115416b771d462399 100644
--- a/third_party/WebKit/Source/core/loader/ImageLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/ImageLoader.cpp
@@ -93,7 +93,7 @@ public:
, m_referrerPolicy(referrerPolicy)
{
ExecutionContext& context = m_loader->element()->document();
- m_operationId = InspectorInstrumentation::traceAsyncOperationStarting(&context, "Load image");
+ InspectorInstrumentation::asyncTaskScheduled(&context, "Image", this);
v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate();
v8::HandleScope scope(isolate);
// If we're invoked from C++ without a V8 context on the stack, we should
@@ -115,14 +115,13 @@ public:
if (!m_loader)
return;
ExecutionContext& context = m_loader->element()->document();
- InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncOperationCompletedCallbackStarting(&context, m_operationId);
+ InspectorInstrumentation::AsyncTask asyncTask(&context, this);
if (m_scriptState->contextIsValid()) {
ScriptState::Scope scope(m_scriptState.get());
m_loader->doUpdateFromElement(m_shouldBypassMainWorldCSP, m_updateBehavior, m_referrerPolicy);
} else {
m_loader->doUpdateFromElement(m_shouldBypassMainWorldCSP, m_updateBehavior, m_referrerPolicy);
}
- InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
}
void clearLoader()
@@ -143,7 +142,6 @@ private:
RefPtr<ScriptState> m_scriptState;
WeakPtrFactory<Task> m_weakFactory;
ReferrerPolicy m_referrerPolicy;
- int m_operationId;
};
ImageLoader::ImageLoader(Element* element)

Powered by Google App Engine
This is Rietveld 408576698