Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Unified Diff: webkit/plugins/ppapi/resource_tracker.cc

Issue 6628019: Ensure that PP_Instance values are unique within a plugin process in addition... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/ppb_proxy_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/resource_tracker.cc
===================================================================
--- webkit/plugins/ppapi/resource_tracker.cc (revision 77663)
+++ webkit/plugins/ppapi/resource_tracker.cc (working copy)
@@ -12,6 +12,7 @@
#include "base/rand_util.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_var.h"
+#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
#include "webkit/plugins/ppapi/resource.h"
#include "webkit/plugins/ppapi/var.h"
@@ -279,7 +280,8 @@
new_instance = MakeTypedId(static_cast<PP_Instance>(base::RandUint64()),
PP_ID_TYPE_INSTANCE);
} while (!new_instance ||
- instance_map_.find(new_instance) != instance_map_.end());
+ instance_map_.find(new_instance) != instance_map_.end() ||
+ !instance->module()->ReserveInstanceID(new_instance));
instance_map_[new_instance].instance = instance;
return new_instance;
« no previous file with comments | « webkit/plugins/ppapi/ppb_proxy_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698