| 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 6d3bd0a7d0a3e62ecad62489ccb30a7c70f8ea5b..01ba1b070c4112653d9de69fd7771400410bc1fb 100644
|
| --- a/third_party/WebKit/Source/platform/heap/ThreadState.h
|
| +++ b/third_party/WebKit/Source/platform/heap/ThreadState.h
|
| @@ -39,6 +39,7 @@
|
| #include "wtf/AddressSanitizer.h"
|
| #include "wtf/Allocator.h"
|
| #include "wtf/Forward.h"
|
| +#include "wtf/Functional.h"
|
| #include "wtf/HashMap.h"
|
| #include "wtf/HashSet.h"
|
| #include "wtf/ThreadSpecific.h"
|
| @@ -505,6 +506,11 @@ public:
|
| size_t threadStackSize();
|
| #endif
|
|
|
| + // Registers a closure that will be called while the thread is shutting down
|
| + // (i.e. ThreadState::isTerminating will be true), in order to allow for any
|
| + // persistent handles that should be cleared.
|
| + void registerCleanupHook(PassOwnPtr<SameThreadClosure>);
|
| +
|
| #if defined(LEAK_SANITIZER)
|
| void registerStaticPersistentNode(PersistentNode*);
|
| void releaseStaticPersistentNodes();
|
| @@ -658,6 +664,10 @@ private:
|
| v8::Isolate* m_isolate;
|
| void (*m_traceDOMWrappers)(v8::Isolate*, Visitor*);
|
|
|
| + // Invoked while the thread is terminating. Intended to be used to free
|
| + // persistent pointers into the thread's heap.
|
| + Vector<OwnPtr<SameThreadClosure>> m_cleanupHooks;
|
| +
|
| #if defined(ADDRESS_SANITIZER)
|
| void* m_asanFakeStack;
|
| #endif
|
|
|