Commit b6bff47f authored by Johannes Henkel's avatar Johannes Henkel Committed by Commit Bot

Guard DCHECK to avoid calling it after dispose().

AppendTask schedules this method, and it's possible
that after it's been scheduled, dispose() nulls out
the isolate_task_runner_. TakeNextTask will handle
this situation properly - if the runner is gone,
it returns Task(). So, moving the DCHECK should avoid the
following stack trace which I've seen twice thus far
when running tests with always DCHECK enabled.

Thank you for your suggestion for this fix, Dmitry.

[1:41:0725/182513.246104:FATAL:scoped_refptr.h(219)] Check failed: ptr_.

Change-Id: Ic24aef83876de05159a7cd9805ff8d2015d52629
Reviewed-on: https://chromium-review.googlesource.com/1151950Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578681}
parent 1f0311f2
...@@ -116,10 +116,11 @@ void InspectorTaskRunner::PerformSingleTask(Task task) { ...@@ -116,10 +116,11 @@ void InspectorTaskRunner::PerformSingleTask(Task task) {
} }
void InspectorTaskRunner::PerformSingleTaskDontWait() { void InspectorTaskRunner::PerformSingleTaskDontWait() {
DCHECK(isolate_task_runner_->BelongsToCurrentThread());
Task task = TakeNextTask(kDontWaitForTask); Task task = TakeNextTask(kDontWaitForTask);
if (task) if (task) {
DCHECK(isolate_task_runner_->BelongsToCurrentThread());
PerformSingleTask(std::move(task)); PerformSingleTask(std::move(task));
}
} }
void InspectorTaskRunner::V8InterruptCallback(v8::Isolate*, void* data) { void InspectorTaskRunner::V8InterruptCallback(v8::Isolate*, void* data) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment