Index: webkit/plugins/ppapi/host_var_tracker.cc |
diff --git a/webkit/plugins/ppapi/host_var_tracker.cc b/webkit/plugins/ppapi/host_var_tracker.cc |
index 5d5349949a65c25be40fe195fca7a930b85e53a1..99518fde696a04be37bbfd2d4681244cf49bc836 100644 |
--- a/webkit/plugins/ppapi/host_var_tracker.cc |
+++ b/webkit/plugins/ppapi/host_var_tracker.cc |
@@ -16,7 +16,9 @@ using ppapi::NPObjectVar; |
namespace webkit { |
namespace ppapi { |
-HostVarTracker::HostVarTracker() : last_shared_memory_map_id_(0) { |
+HostVarTracker::HostVarTracker() |
+ : VarTracker(SINGLE_THREADED), |
+ last_shared_memory_map_id_(0) { |
} |
HostVarTracker::~HostVarTracker() { |
@@ -33,7 +35,7 @@ ArrayBufferVar* HostVarTracker::CreateShmArrayBuffer( |
} |
void HostVarTracker::AddNPObjectVar(NPObjectVar* object_var) { |
- DCHECK(CalledOnValidThread()); |
+ CheckThreadingPreconditions(); |
InstanceMap::iterator found_instance = instance_map_.find( |
object_var->pp_instance()); |
@@ -53,7 +55,7 @@ void HostVarTracker::AddNPObjectVar(NPObjectVar* object_var) { |
} |
void HostVarTracker::RemoveNPObjectVar(NPObjectVar* object_var) { |
- DCHECK(CalledOnValidThread()); |
+ CheckThreadingPreconditions(); |
InstanceMap::iterator found_instance = instance_map_.find( |
object_var->pp_instance()); |
@@ -78,7 +80,7 @@ void HostVarTracker::RemoveNPObjectVar(NPObjectVar* object_var) { |
NPObjectVar* HostVarTracker::NPObjectVarForNPObject(PP_Instance instance, |
NPObject* np_object) { |
- DCHECK(CalledOnValidThread()); |
+ CheckThreadingPreconditions(); |
InstanceMap::iterator found_instance = instance_map_.find(instance); |
if (found_instance == instance_map_.end()) |
@@ -93,7 +95,7 @@ NPObjectVar* HostVarTracker::NPObjectVarForNPObject(PP_Instance instance, |
} |
int HostVarTracker::GetLiveNPObjectVarsForInstance(PP_Instance instance) const { |
- DCHECK(CalledOnValidThread()); |
+ CheckThreadingPreconditions(); |
InstanceMap::const_iterator found = instance_map_.find(instance); |
if (found == instance_map_.end()) |
@@ -102,7 +104,7 @@ int HostVarTracker::GetLiveNPObjectVarsForInstance(PP_Instance instance) const { |
} |
void HostVarTracker::DidDeleteInstance(PP_Instance instance) { |
- DCHECK(CalledOnValidThread()); |
+ CheckThreadingPreconditions(); |
InstanceMap::iterator found_instance = instance_map_.find(instance); |
if (found_instance == instance_map_.end()) |