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

Unified Diff: third_party/WebKit/Source/core/inspector/ThreadDebugger.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
Index: third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
diff --git a/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
index 5dce282cc4bfa53d316b71d1670785fe8e7325bc..ecdda6b0bec7a5524b6eb19f1029a6f01b3133d7 100644
--- a/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
@@ -89,14 +89,22 @@ void ThreadDebugger::AsyncTaskCanceled(void* task) {
}
void ThreadDebugger::AllAsyncTasksCanceled() {
+ current_async_tasks_ = 0;
v8_inspector_->allAsyncTasksCanceled();
}
-void ThreadDebugger::AsyncTaskStarted(void* task) {
- v8_inspector_->asyncTaskStarted(task);
+bool ThreadDebugger::AsyncTaskStarted(void* task, bool optional) {
+ if (!current_async_tasks_ || !optional) {
+ ++current_async_tasks_;
+ v8_inspector_->asyncTaskStarted(task);
+ return true;
+ }
+ return false;
}
void ThreadDebugger::AsyncTaskFinished(void* task) {
+ if (current_async_tasks_ > 0)
+ --current_async_tasks_;
v8_inspector_->asyncTaskFinished(task);
}
« no previous file with comments | « third_party/WebKit/Source/core/inspector/ThreadDebugger.h ('k') | third_party/WebKit/Source/core/probe/CoreProbes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698