Index: Source/platform/heap/ThreadState.cpp |
diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp |
index 6270835414dc436b35f708b6bdad82d70da4ed11..c0e907511d4fc75292ff4b0514ade04549bae142 100644 |
--- a/Source/platform/heap/ThreadState.cpp |
+++ b/Source/platform/heap/ThreadState.cpp |
@@ -663,8 +663,10 @@ void ThreadState::scheduleIdleGC() |
return; |
} |
- Platform::current()->currentThread()->scheduler()->postNonNestableIdleTask(FROM_HERE, WTF::bind<double>(&ThreadState::performIdleGC, this)); |
- setGCState(IdleGCScheduled); |
+ if (Platform::current()) { |
sof
2015/04/23 18:22:41
Platform::current() will exist, but it may not hav
|
+ Platform::current()->currentThread()->scheduler()->postNonNestableIdleTask(FROM_HERE, WTF::bind<double>(&ThreadState::performIdleGC, this)); |
+ setGCState(IdleGCScheduled); |
+ } |
} |
void ThreadState::scheduleIdleLazySweep() |
@@ -675,7 +677,9 @@ void ThreadState::scheduleIdleLazySweep() |
// TODO(haraken): Remove this. Lazy sweeping is not yet enabled in non-oilpan builds. |
#if ENABLE(OILPAN) |
- Platform::current()->currentThread()->scheduler()->postIdleTask(FROM_HERE, WTF::bind<double>(&ThreadState::performIdleLazySweep, this)); |
+ if (Platform::current()) { |
+ Platform::current()->currentThread()->scheduler()->postIdleTask(FROM_HERE, WTF::bind<double>(&ThreadState::performIdleLazySweep, this)); |
+ } |
#endif |
} |