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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc

Issue 2464853002: Add crash keys to TaskQueueManager::ProcessTaskFromWorkQueue (Closed)
Patch Set: Created 4 years, 1 month 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/platform/scheduler/base/task_queue_manager.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
index 0ebf0ab05dbc9b287384c6ef5b41bd3683e7e720..a6998c7d2bdbc01966a59ec01ab916041c6cd7ef 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
@@ -8,6 +8,7 @@
#include <set>
#include "base/bind.h"
+#include "base/debug/crash_logging.h"
#include "base/metrics/histogram_macros.h"
#include "base/trace_event/trace_event.h"
#include "platform/scheduler/base/real_time_domain.h"
@@ -317,10 +318,22 @@ TaskQueueManager::ProcessTaskResult TaskQueueManager::ProcessTaskFromWorkQueue(
internal::TaskQueueImpl::Task pending_task =
work_queue->TakeTaskFromWorkQueue();
+ CHECK(!pending_task.task.is_null()) << "Posted from "
+ << pending_task.posted_from.ToString();
+
// It's possible the task was canceled, if so bail out.
if (pending_task.task.IsCancelled())
return ProcessTaskResult::EXECUTED;
+ static const char kBlinkSchedulerTaskFunctionNameKey[] =
+ "blink_scheduler_task_function_name";
+ static const char kBlinkSchedulerTaskFileNameKey[] =
+ "blink_scheduler_task_file_name";
+ base::debug::ScopedCrashKey debug_task_file_name(
+ kBlinkSchedulerTaskFunctionNameKey, pending_task.posted_from.file_name());
+ base::debug::ScopedCrashKey debug_task_function_name(
+ kBlinkSchedulerTaskFileNameKey, pending_task.posted_from.function_name());
+
internal::TaskQueueImpl* queue = work_queue->task_queue();
if (queue->GetQuiescenceMonitored())
task_was_run_on_quiescence_monitored_queue_ = true;
« chrome/common/crash_keys.cc ('K') | « third_party/WebKit/Source/platform/scheduler/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698