diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-29 19:18:41 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-29 19:18:41 +0000 |
commit | 460d2fd0876fddb9e6a2a17cba9c70beb93dfa03 (patch) | |
tree | 4e0cf902613ff0a64a7fa69959e48a0160bbf2f2 /webkit/plugins | |
parent | b26ac3b182b8c63192ad1f8e221ceac3fe5927be (diff) | |
download | chromium_src-460d2fd0876fddb9e6a2a17cba9c70beb93dfa03.zip chromium_src-460d2fd0876fddb9e6a2a17cba9c70beb93dfa03.tar.gz chromium_src-460d2fd0876fddb9e6a2a17cba9c70beb93dfa03.tar.bz2 |
PPAPI: Remove threading options; it's always on
This also re-enables thread checking for the host side resource and var trackers. Before, checking was disabled everywhere.
BUG=159240,92909
Committed: r186925
Reverted: r186939 due to build errors
Committed: r187340
Committed: r187427
Reverted: r187668 due to a failing check in Canary, which was fixed here: r187681
Committed: r189518
Reverted: r189682, due to regression in Kraken (see crbug.com/222741)
Review URL: https://chromiumcodereview.appspot.com/12378050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191420 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins')
-rw-r--r-- | webkit/plugins/plugin_switches.cc | 3 | ||||
-rw-r--r-- | webkit/plugins/plugin_switches.h | 1 | ||||
-rw-r--r-- | webkit/plugins/ppapi/host_globals.cc | 8 | ||||
-rw-r--r-- | webkit/plugins/ppapi/host_var_tracker.cc | 14 |
4 files changed, 14 insertions, 12 deletions
diff --git a/webkit/plugins/plugin_switches.cc b/webkit/plugins/plugin_switches.cc index dda1acc..bb1b3b4 100644 --- a/webkit/plugins/plugin_switches.cc +++ b/webkit/plugins/plugin_switches.cc @@ -15,9 +15,6 @@ const char kDisablePepper3d[] = "disable-pepper-3d"; // "Command-line" arguments for the PPAPI Flash; used for debugging options. const char kPpapiFlashArgs[] = "ppapi-flash-args"; -// Set to true to not allow threadsafety support in native Pepper plugins. -const char kDisablePepperThreading[] = "disable-pepper-threading"; - #if defined(OS_WIN) // Used by the plugins_test when testing the older WMP plugin to force the new // plugin to not get loaded. diff --git a/webkit/plugins/plugin_switches.h b/webkit/plugins/plugin_switches.h index a195094..08ed5ae 100644 --- a/webkit/plugins/plugin_switches.h +++ b/webkit/plugins/plugin_switches.h @@ -13,7 +13,6 @@ namespace switches { WEBKIT_PLUGINS_EXPORT extern const char kDebugPluginLoading[]; WEBKIT_PLUGINS_EXPORT extern const char kDisablePepper3d[]; WEBKIT_PLUGINS_EXPORT extern const char kPpapiFlashArgs[]; -WEBKIT_PLUGINS_EXPORT extern const char kDisablePepperThreading[]; #if defined(OS_WIN) WEBKIT_PLUGINS_EXPORT extern const char kUseOldWMPPlugin[]; diff --git a/webkit/plugins/ppapi/host_globals.cc b/webkit/plugins/ppapi/host_globals.cc index 6370269..15dedf2 100644 --- a/webkit/plugins/ppapi/host_globals.cc +++ b/webkit/plugins/ppapi/host_globals.cc @@ -25,6 +25,7 @@ using ppapi::CheckIdType; using ppapi::MakeTypedId; using ppapi::PPIdType; +using ppapi::ResourceTracker; using WebKit::WebConsoleMessage; using WebKit::WebString; @@ -74,14 +75,17 @@ WebConsoleMessage MakeLogMessage(PP_LogLevel level, HostGlobals* HostGlobals::host_globals_ = NULL; -HostGlobals::HostGlobals() : ::ppapi::PpapiGlobals() { +HostGlobals::HostGlobals() + : ::ppapi::PpapiGlobals(), + resource_tracker_(ResourceTracker::SINGLE_THREADED) { DCHECK(!host_globals_); host_globals_ = this; } HostGlobals::HostGlobals( ::ppapi::PpapiGlobals::PerThreadForTest per_thread_for_test) - : ::ppapi::PpapiGlobals(per_thread_for_test) { + : ::ppapi::PpapiGlobals(per_thread_for_test), + resource_tracker_(ResourceTracker::SINGLE_THREADED) { DCHECK(!host_globals_); } diff --git a/webkit/plugins/ppapi/host_var_tracker.cc b/webkit/plugins/ppapi/host_var_tracker.cc index 5d53499..99518fd 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()) |