| Index: third_party/WebKit/Source/platform/heap/Heap.h
|
| diff --git a/third_party/WebKit/Source/platform/heap/Heap.h b/third_party/WebKit/Source/platform/heap/Heap.h
|
| index 24dd654eb92b1ae47477925a87d3867f6f72798c..87d01fcc8e5a79bce2283acb02b3b0c93689405d 100644
|
| --- a/third_party/WebKit/Source/platform/heap/Heap.h
|
| +++ b/third_party/WebKit/Source/platform/heap/Heap.h
|
| @@ -35,6 +35,7 @@
|
| #include "platform/heap/GCInfo.h"
|
| #include "platform/heap/HeapPage.h"
|
| #include "platform/heap/PageMemory.h"
|
| +#include "platform/heap/StackFrameDepth.h"
|
| #include "platform/heap/ThreadState.h"
|
| #include "platform/heap/Visitor.h"
|
| #include "wtf/AddressSanitizer.h"
|
| @@ -474,6 +475,11 @@ public:
|
| protected:
|
| GarbageCollected()
|
| {
|
| + // A GarbageCollected<> object should not be stack allocated
|
| + // as it won't be prefixed with a (heap) header which would
|
| + // fail if the stack object ends up being stored in a traceable
|
| + // member field (say.)
|
| + DCHECK(!StackFrameDepth::isStackAddress(this));
|
| }
|
| };
|
|
|
|
|