Chromium Code Reviews| Index: Source/platform/heap/Visitor.h |
| diff --git a/Source/platform/heap/Visitor.h b/Source/platform/heap/Visitor.h |
| index 7a701fc38f7ad9416b1c05669ead56532ea3fc4c..1030e263ba2fa0f3852bc1a8e48e02500bd6518f 100644 |
| --- a/Source/platform/heap/Visitor.h |
| +++ b/Source/platform/heap/Visitor.h |
| @@ -289,6 +289,11 @@ public: |
| template<typename T> |
| void trace(const T& t) |
| { |
| + if (WTF::IsPolymorphic<T>::value) { |
| + intptr_t vtable = *reinterpret_cast<const intptr_t*>(&t); |
| + if (!vtable) |
|
haraken
2014/08/11 10:44:02
Can we merge this check with vTableInitialized() i
Mads Ager (chromium)
2014/08/11 12:17:36
These are two different checks:
The check that we
|
| + return; |
| + } |
| const_cast<T&>(t).trace(this); |
| } |