Commit ac815912 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[wrapper-tracing] Don't try to schedule cleanup without a thread

Bug: chromium:763687
Change-Id: I06180bbdf66d837a6bafe800ce674cb8aaaf0ee9
Reviewed-on: https://chromium-review.googlesource.com/690155Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505314}
parent 84bec0a5
...@@ -96,8 +96,10 @@ void ScriptWrappableVisitor::PerformCleanup() { ...@@ -96,8 +96,10 @@ void ScriptWrappableVisitor::PerformCleanup() {
} }
void ScriptWrappableVisitor::ScheduleIdleLazyCleanup() { void ScriptWrappableVisitor::ScheduleIdleLazyCleanup() {
// Some threads (e.g. PPAPI thread) don't have a scheduler. WebThread* const thread = Platform::Current()->CurrentThread();
if (!Platform::Current()->CurrentThread()->Scheduler()) // Thread might already be gone, or some threads (e.g. PPAPI) don't have a
// scheduler.
if (!thread || !thread->Scheduler())
return; return;
if (idle_cleanup_task_scheduled_) if (idle_cleanup_task_scheduled_)
......
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