diff options
Diffstat (limited to 'ppapi/proxy/plugin_var_tracker.cc')
-rw-r--r-- | ppapi/proxy/plugin_var_tracker.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ppapi/proxy/plugin_var_tracker.cc b/ppapi/proxy/plugin_var_tracker.cc index 4561ac5..0b583d6 100644 --- a/ppapi/proxy/plugin_var_tracker.cc +++ b/ppapi/proxy/plugin_var_tracker.cc @@ -189,10 +189,12 @@ void PluginVarTracker::DidDeleteInstance(PP_Instance instance) { } void PluginVarTracker::DidDeleteDispatcher(PluginDispatcher* dispatcher) { - for (size_t i = 0; i < live_vars_.size(); ++i) { - if (live_vars_[i].var.get() == NULL) + for (VarMap::iterator it = live_vars_.begin(); + it != live_vars_.end(); + ++it) { + if (it->second.var.get() == NULL) continue; - ProxyObjectVar* object = live_vars_[i].var->AsProxyObjectVar(); + ProxyObjectVar* object = it->second.var->AsProxyObjectVar(); if (object && object->dispatcher() == dispatcher) object->clear_dispatcher(); } |