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

Unified Diff: trunk/src/ppapi/proxy/plugin_var_tracker.cc

Issue 12920003: Revert 189518 "PPAPI: Remove threading options; it's always on" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
Index: trunk/src/ppapi/proxy/plugin_var_tracker.cc
===================================================================
--- trunk/src/ppapi/proxy/plugin_var_tracker.cc (revision 189681)
+++ trunk/src/ppapi/proxy/plugin_var_tracker.cc (working copy)
@@ -31,7 +31,7 @@
return host_object_id < other.host_object_id;
}
-PluginVarTracker::PluginVarTracker() : VarTracker(THREAD_SAFE) {
+PluginVarTracker::PluginVarTracker() {
}
PluginVarTracker::~PluginVarTracker() {
@@ -39,7 +39,7 @@
PP_Var PluginVarTracker::ReceiveObjectPassRef(const PP_Var& host_var,
PluginDispatcher* dispatcher) {
- CheckThreadingPreconditions();
+ DCHECK(CalledOnValidThread());
DCHECK(host_var.type == PP_VARTYPE_OBJECT);
// Get the object.
@@ -65,7 +65,7 @@
PP_Var PluginVarTracker::TrackObjectWithNoReference(
const PP_Var& host_var,
PluginDispatcher* dispatcher) {
- CheckThreadingPreconditions();
+ DCHECK(CalledOnValidThread());
DCHECK(host_var.type == PP_VARTYPE_OBJECT);
// Get the object.
@@ -83,7 +83,7 @@
void PluginVarTracker::StopTrackingObjectWithNoReference(
const PP_Var& plugin_var) {
- CheckThreadingPreconditions();
+ DCHECK(CalledOnValidThread());
DCHECK(plugin_var.type == PP_VARTYPE_OBJECT);
VarMap::iterator found = GetLiveVar(plugin_var);
@@ -98,7 +98,8 @@
}
PP_Var PluginVarTracker::GetHostObject(const PP_Var& plugin_object) const {
- CheckThreadingPreconditions();
+ DCHECK(CalledOnValidThread());
+
if (plugin_object.type != PP_VARTYPE_OBJECT) {
NOTREACHED();
return PP_MakeUndefined();
@@ -119,7 +120,8 @@
PluginDispatcher* PluginVarTracker::DispatcherForPluginObject(
const PP_Var& plugin_object) const {
- CheckThreadingPreconditions();
+ DCHECK(CalledOnValidThread());
+
if (plugin_object.type != PP_VARTYPE_OBJECT)
return NULL;
@@ -135,7 +137,7 @@
void PluginVarTracker::ReleaseHostObject(PluginDispatcher* dispatcher,
const PP_Var& host_object) {
- CheckThreadingPreconditions();
+ DCHECK(CalledOnValidThread());
DCHECK(host_object.type == PP_VARTYPE_OBJECT);
// Convert the host object to a normal var valid in the plugin.
« no previous file with comments | « trunk/src/ppapi/proxy/plugin_resource_tracker_unittest.cc ('k') | trunk/src/ppapi/proxy/ppapi_proxy_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698