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

Unified Diff: ppapi/proxy/plugin_var_tracker.cc

Issue 12378050: PPAPI: Remove threading options; it's always on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix PDFResource unit test Created 7 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 | « ppapi/proxy/plugin_resource_tracker_unittest.cc ('k') | ppapi/proxy/ppapi_proxy_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/plugin_var_tracker.cc
diff --git a/ppapi/proxy/plugin_var_tracker.cc b/ppapi/proxy/plugin_var_tracker.cc
index cff8fa16ee2a2c0e13b50dbbfda37867dd091040..14a85846043bfe377965bb054a431b6b54945fbb 100644
--- a/ppapi/proxy/plugin_var_tracker.cc
+++ b/ppapi/proxy/plugin_var_tracker.cc
@@ -31,7 +31,7 @@ bool PluginVarTracker::HostVar::operator<(const HostVar& other) const {
return host_object_id < other.host_object_id;
}
-PluginVarTracker::PluginVarTracker() {
+PluginVarTracker::PluginVarTracker() : VarTracker(THREAD_SAFE) {
}
PluginVarTracker::~PluginVarTracker() {
@@ -39,7 +39,7 @@ PluginVarTracker::~PluginVarTracker() {
PP_Var PluginVarTracker::ReceiveObjectPassRef(const PP_Var& host_var,
PluginDispatcher* dispatcher) {
- DCHECK(CalledOnValidThread());
+ CheckThreadingPreconditions();
DCHECK(host_var.type == PP_VARTYPE_OBJECT);
// Get the object.
@@ -65,7 +65,7 @@ PP_Var PluginVarTracker::ReceiveObjectPassRef(const PP_Var& host_var,
PP_Var PluginVarTracker::TrackObjectWithNoReference(
const PP_Var& host_var,
PluginDispatcher* dispatcher) {
- DCHECK(CalledOnValidThread());
+ CheckThreadingPreconditions();
DCHECK(host_var.type == PP_VARTYPE_OBJECT);
// Get the object.
@@ -83,7 +83,7 @@ PP_Var PluginVarTracker::TrackObjectWithNoReference(
void PluginVarTracker::StopTrackingObjectWithNoReference(
const PP_Var& plugin_var) {
- DCHECK(CalledOnValidThread());
+ CheckThreadingPreconditions();
DCHECK(plugin_var.type == PP_VARTYPE_OBJECT);
VarMap::iterator found = GetLiveVar(plugin_var);
@@ -98,8 +98,7 @@ void PluginVarTracker::StopTrackingObjectWithNoReference(
}
PP_Var PluginVarTracker::GetHostObject(const PP_Var& plugin_object) const {
- DCHECK(CalledOnValidThread());
-
+ CheckThreadingPreconditions();
if (plugin_object.type != PP_VARTYPE_OBJECT) {
NOTREACHED();
return PP_MakeUndefined();
@@ -120,8 +119,7 @@ PP_Var PluginVarTracker::GetHostObject(const PP_Var& plugin_object) const {
PluginDispatcher* PluginVarTracker::DispatcherForPluginObject(
const PP_Var& plugin_object) const {
- DCHECK(CalledOnValidThread());
-
+ CheckThreadingPreconditions();
if (plugin_object.type != PP_VARTYPE_OBJECT)
return NULL;
@@ -137,7 +135,7 @@ PluginDispatcher* PluginVarTracker::DispatcherForPluginObject(
void PluginVarTracker::ReleaseHostObject(PluginDispatcher* dispatcher,
const PP_Var& host_object) {
- DCHECK(CalledOnValidThread());
+ CheckThreadingPreconditions();
DCHECK(host_object.type == PP_VARTYPE_OBJECT);
// Convert the host object to a normal var valid in the plugin.
« no previous file with comments | « ppapi/proxy/plugin_resource_tracker_unittest.cc ('k') | ppapi/proxy/ppapi_proxy_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698