Index: webkit/glue/plugins/pepper_resource_tracker.cc |
diff --git a/webkit/glue/plugins/pepper_resource_tracker.cc b/webkit/glue/plugins/pepper_resource_tracker.cc |
index 997ef63c655d6d46eaa08f7ee1dfb7755d968033..9623e9881e230a45e937d6a4a1ba63ee040b950d 100644 |
--- a/webkit/glue/plugins/pepper_resource_tracker.cc |
+++ b/webkit/glue/plugins/pepper_resource_tracker.cc |
@@ -7,11 +7,15 @@ |
#include <limits> |
#include <set> |
+#include "base/lazy_instance.h" |
#include "base/logging.h" |
#include "base/rand_util.h" |
#include "ppapi/c/pp_resource.h" |
#include "webkit/glue/plugins/pepper_resource.h" |
+static base::LazyInstance<pepper::ResourceTracker> g_resource_tracker( |
+ base::LINKER_INITIALIZED); |
Nico
2010/12/12 23:42:47
can you move this file to a different CL since the
Satish
2010/12/13 08:16:30
Done.
|
+ |
namespace pepper { |
scoped_refptr<Resource> ResourceTracker::GetResource(PP_Resource res) const { |
@@ -36,7 +40,7 @@ ResourceTracker::~ResourceTracker() { |
ResourceTracker* ResourceTracker::Get() { |
if (singleton_override_) |
return singleton_override_; |
- return Singleton<ResourceTracker>::get(); |
+ return g_resource_tracker.Pointer(); |
} |
PP_Resource ResourceTracker::AddResource(Resource* resource) { |