| Index: third_party/WebKit/Source/wtf/ThreadSpecific.h
|
| diff --git a/third_party/WebKit/Source/wtf/ThreadSpecific.h b/third_party/WebKit/Source/wtf/ThreadSpecific.h
|
| index 2de240622e8d050f295a3dd31b2ed6735ca5fcc1..f16836fead6a716fa7243d678cba5683ddb1f367 100644
|
| --- a/third_party/WebKit/Source/wtf/ThreadSpecific.h
|
| +++ b/third_party/WebKit/Source/wtf/ThreadSpecific.h
|
| @@ -42,7 +42,6 @@
|
| #ifndef WTF_ThreadSpecific_h
|
| #define WTF_ThreadSpecific_h
|
|
|
| -#include "wtf/AddressSanitizer.h"
|
| #include "wtf/Allocator.h"
|
| #include "wtf/Noncopyable.h"
|
| #include "wtf/StdLibExtras.h"
|
| @@ -156,7 +155,6 @@
|
| {
|
| ASSERT(!get());
|
| pthread_setspecific(m_key, new Data(ptr, this));
|
| - __lsan_register_root_region(ptr, sizeof(Data));
|
| }
|
|
|
| #elif OS(WIN)
|
| @@ -215,7 +213,6 @@
|
| {
|
| ASSERT(!get());
|
| Data* data = new Data(ptr, this);
|
| - __lsan_register_root_region(ptr, sizeof(Data));
|
| data->destructor = &ThreadSpecific<T>::destroy;
|
| TlsSetValue(tlsKeys()[m_index], data);
|
| }
|
| @@ -227,9 +224,7 @@
|
| template<typename T>
|
| inline void ThreadSpecific<T>::destroy(void* ptr)
|
| {
|
| - // Never call destructors on the main thread.
|
| - // This is fine because Blink no longer has a graceful shutdown sequence.
|
| - if (isMainThread())
|
| + if (isShutdown())
|
| return;
|
|
|
| Data* data = static_cast<Data*>(ptr);
|
| @@ -270,7 +265,6 @@
|
| ptr = static_cast<T*>(Partitions::fastZeroedMalloc(sizeof(T), WTF_HEAP_PROFILER_TYPE_NAME(T)));
|
| set(ptr);
|
| new (NotNull, ptr) T;
|
| - __lsan_register_root_region(ptr, sizeof(T));
|
| }
|
| return ptr;
|
| }
|
|
|