| Index: third_party/WebKit/Source/platform/heap/ThreadState.h
|
| diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.h b/third_party/WebKit/Source/platform/heap/ThreadState.h
|
| index a8c771b8db65a1b8b443db26b52c31adad5d5228..284a3de876ca52e6c0b12235a3698d34e5d7d520 100644
|
| --- a/third_party/WebKit/Source/platform/heap/ThreadState.h
|
| +++ b/third_party/WebKit/Source/platform/heap/ThreadState.h
|
| @@ -573,6 +573,15 @@ class PLATFORM_EXPORT ThreadState {
|
|
|
| static const char* gcReasonString(BlinkGC::GCReason);
|
|
|
| + // Returns |true| if |object| resides on this thread's heap.
|
| + // It is well-defined to call this method on any heap allocated
|
| + // reference, provided its associated heap hasn't been detached
|
| + // and shut down. Its behavior is undefined for any other pointer
|
| + // value.
|
| + bool isOnThreadHeap(const void* object) const {
|
| + return &fromObject(object)->heap() == &heap();
|
| + }
|
| +
|
| private:
|
| template <typename T>
|
| friend class PrefinalizerRegistration;
|
|
|