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

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

Issue 2873713002: [DevTools] added creation stack for event listeners without scheduled stack
Patch Set: added a test 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
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 fb0477cea5b03593ae1caa19cb1de556f4263c9d..14e943b712a8a8c4b7ab44eea2ec38b6e52d4155 100644
--- a/third_party/WebKit/Source/core/probe/CoreProbes.cpp
+++ b/third_party/WebKit/Source/core/probe/CoreProbes.cpp
@@ -52,7 +52,8 @@ 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) {
@@ -64,8 +65,13 @@ AsyncTask::AsyncTask(ExecutionContext* context,
TRACE_EVENT_FLOW_END0("devtools.timeline.async", "AsyncTask",
TRACE_ID_LOCAL(reinterpret_cast<uintptr_t>(task)));
}
- if (debugger_)
+ if (debugger_) {
+ if (optional && debugger_->IsRunningAsyncTask()) {
dgozman 2017/05/10 18:36:30 Instead of calling this, pass optional to AsyncTas
kozy 2017/05/10 21:24:01 Done.
+ debugger_ = nullptr;
+ return;
+ }
debugger_->AsyncTaskStarted(task_);
+ }
}
AsyncTask::~AsyncTask() {

Powered by Google App Engine
This is Rietveld 408576698