| Index: third_party/WebKit/Source/platform/bindings/ScriptWrappableVisitor.cpp
|
| diff --git a/third_party/WebKit/Source/platform/bindings/ScriptWrappableVisitor.cpp b/third_party/WebKit/Source/platform/bindings/ScriptWrappableVisitor.cpp
|
| index c384ee2b6d01f91718559fbf06869a8effd647a2..03830ac8c87658bdd729312876c4e0447e5f4bab 100644
|
| --- a/third_party/WebKit/Source/platform/bindings/ScriptWrappableVisitor.cpp
|
| +++ b/third_party/WebKit/Source/platform/bindings/ScriptWrappableVisitor.cpp
|
| @@ -94,13 +94,14 @@ void ScriptWrappableVisitor::PerformCleanup() {
|
|
|
| void ScriptWrappableVisitor::ScheduleIdleLazyCleanup() {
|
| // Some threads (e.g. PPAPI thread) don't have a scheduler.
|
| - if (!Platform::Current()->CurrentThread()->Scheduler())
|
| + WebThread* current_thread = Platform::Current()->CurrentThread();
|
| + if (!current_thread || !current_thread->Scheduler())
|
| return;
|
|
|
| if (idle_cleanup_task_scheduled_)
|
| return;
|
|
|
| - Platform::Current()->CurrentThread()->Scheduler()->PostIdleTask(
|
| + current_thread->Scheduler()->PostIdleTask(
|
| BLINK_FROM_HERE, WTF::Bind(&ScriptWrappableVisitor::PerformLazyCleanup,
|
| WTF::Unretained(this)));
|
| idle_cleanup_task_scheduled_ = true;
|
|
|