Chromium Code Reviews| Index: Source/core/events/EventTarget.h |
| diff --git a/Source/core/events/EventTarget.h b/Source/core/events/EventTarget.h |
| index 1b33c2c444d5a8d52f2c334b82b2f1a5210c7f85..8af426ddb8137784491b45e684d2cc49232344b3 100644 |
| --- a/Source/core/events/EventTarget.h |
| +++ b/Source/core/events/EventTarget.h |
| @@ -196,7 +196,18 @@ private: |
| // #if-switch here, in order to avoid a lot of "#if ENABLE(OILPAN)"-s sprinkled in the derived classes. |
| #if ENABLE(OILPAN) |
| template <typename T> |
| -class RefCountedGarbageCollectedEventTargetWithInlineData : public EventTargetWithInlineData { }; |
| +class RefCountedGarbageCollectedEventTargetWithInlineData : public EventTargetWithInlineData { |
| +public: |
| + GC_PLUGIN_IGNORE("491488") |
| + void* operator new(size_t size) |
|
haraken
2015/06/01 08:42:52
I'm OK with this approach, but it's error-prone th
haraken
2015/06/01 09:12:58
You can implement the verirication(s) in a follow-
sof
2015/06/01 14:51:36
Will followup, at least for the latter one.
|
| + { |
| + // If T is eagerly finalized, it needs to be allocated accordingly. |
| + // Redefinition of the operator is needed to accomplish that, as otherwise |
| + // it would be allocated using GarbageCollected<EventTarget>'s operator new. |
| + // EventTarget is not eagerly finalized. |
| + return allocateObject(size, IsEagerlyFinalizedType<T>::value); |
| + } |
| +}; |
| #else |
| template <typename T> |
| class RefCountedGarbageCollectedEventTargetWithInlineData : public RefCountedGarbageCollected<T>, public EventTargetWithInlineData { |