Chromium Code Reviews| Index: Source/platform/AsyncMethodRunner.h |
| diff --git a/Source/platform/AsyncMethodRunner.h b/Source/platform/AsyncMethodRunner.h |
| index 41201d131ad19c46a1f66d799023da7a1b3ab0ed..c966acfe89180ca8f94845101476de9b7f8204ca 100644 |
| --- a/Source/platform/AsyncMethodRunner.h |
| +++ b/Source/platform/AsyncMethodRunner.h |
| @@ -120,11 +120,16 @@ public: |
| } |
| private: |
| - void fired(Timer<AsyncMethodRunner<TargetClass>>*) { (m_object->*m_method)(); } |
| + void fired(Timer<AsyncMethodRunner<TargetClass>>*) |
| + { |
| + if (!TimerIsObjectAliveTrait<TargetClass>::isHeapObjectAlive(m_object)) |
|
haraken
2015/04/25 08:02:07
Can we have a comment to mention that this hack wi
sof
2015/04/25 09:10:26
Good idea, done.
|
| + return; |
| + (m_object->*m_method)(); |
| + } |
| Timer<AsyncMethodRunner<TargetClass>> m_timer; |
| - // FIXME: oilpan: AsyncMethodRunner should be moved to the heap and m_object should be traced. |
| + // TODO(Oilpan): AsyncMethodRunner should be moved to the heap and m_object should be traced. |
| // This raw pointer is safe as long as AsyncMethodRunner<X> is held by the X itself |
| // (That's the case in the current code base). |
| GC_PLUGIN_IGNORE("363031") |