| Index: third_party/WebKit/Source/core/fetch/Resource.cpp
|
| diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp
|
| index 368115033a61d62a55f36cd99abab659a685076d..37cd2e89d8444e1e6f70882ad57b77581f854cff 100644
|
| --- a/third_party/WebKit/Source/core/fetch/Resource.cpp
|
| +++ b/third_party/WebKit/Source/core/fetch/Resource.cpp
|
| @@ -41,6 +41,7 @@
|
| #include "public/platform/Platform.h"
|
| #include "public/platform/WebProcessMemoryDump.h"
|
| #include "wtf/CurrentTime.h"
|
| +#include "wtf/LeakAnnotations.h"
|
| #include "wtf/MathExtras.h"
|
| #include "wtf/StdLibExtras.h"
|
| #include "wtf/Vector.h"
|
| @@ -997,7 +998,13 @@ ResourcePriority Resource::priorityFromClients()
|
|
|
| Resource::ResourceCallback* Resource::ResourceCallback::callbackHandler()
|
| {
|
| - DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<ResourceCallback>, callbackHandler, (adoptPtrWillBeNoop(new ResourceCallback)));
|
| + // Oilpan + LSan: as the callbackHandler() singleton is used by Resource
|
| + // and ResourcePtr finalizers, it cannot be released upon shutdown in
|
| + // preparation for leak detection.
|
| + //
|
| + // Keep it out of LSan's reach instead.
|
| + WTF_ANNOTATE_SCOPED_MEMORY_LEAK;
|
| + DEFINE_STATIC_LOCAL_NO_REGISTER(OwnPtrWillBePersistent<ResourceCallback>, callbackHandler, (adoptPtrWillBeNoop(new ResourceCallback)));
|
| return callbackHandler.get();
|
| }
|
|
|
|
|