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

Unified Diff: third_party/WebKit/Source/core/probe/CoreProbes.cpp

Issue 2873713002: [DevTools] added creation stack for event listeners without scheduled stack
Patch Set: better Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/probe/CoreProbes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/probe/CoreProbes.cpp
diff --git a/third_party/WebKit/Source/core/probe/CoreProbes.cpp b/third_party/WebKit/Source/core/probe/CoreProbes.cpp
index 27d41ba1e9d9a11650a4b1234a7afa85121ed9e7..23d6dcb8bed2fabc85de52e617c6bb086fa79e9c 100644
--- a/third_party/WebKit/Source/core/probe/CoreProbes.cpp
+++ b/third_party/WebKit/Source/core/probe/CoreProbes.cpp
@@ -53,10 +53,12 @@ namespace probe {
AsyncTask::AsyncTask(ExecutionContext* context,
void* task,
const char* step,
- bool enabled)
+ bool enabled,
+ bool optional)
: debugger_(enabled ? ThreadDebugger::From(ToIsolate(context)) : nullptr),
task_(task),
- recurring_(step) {
+ recurring_(step),
+ started_(false) {
if (recurring_) {
TRACE_EVENT_FLOW_STEP0("devtools.timeline.async", "AsyncTask",
TRACE_ID_LOCAL(reinterpret_cast<uintptr_t>(task)),
@@ -65,13 +67,15 @@ AsyncTask::AsyncTask(ExecutionContext* context,
TRACE_EVENT_FLOW_END0("devtools.timeline.async", "AsyncTask",
TRACE_ID_LOCAL(reinterpret_cast<uintptr_t>(task)));
}
- if (debugger_)
- debugger_->AsyncTaskStarted(task_);
+ if (debugger_) {
+ started_ = debugger_->AsyncTaskStarted(task_, optional);
+ }
}
AsyncTask::~AsyncTask() {
if (debugger_) {
- debugger_->AsyncTaskFinished(task_);
+ if (started_)
+ debugger_->AsyncTaskFinished(task_);
if (!recurring_)
debugger_->AsyncTaskCanceled(task_);
}
« no previous file with comments | « third_party/WebKit/Source/core/probe/CoreProbes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698