summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/plugin_instance.h
diff options
context:
space:
mode:
authorevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-20 21:47:40 +0000
committerevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-20 21:47:40 +0000
commitc3ec35638ea6594b6bdbac7ff92c38add8984623 (patch)
treec51541ac2451e66c410b3d244e1f59ac2218c57e /webkit/glue/plugins/plugin_instance.h
parente537c3515e270527ba2fa54fcfc4a1ed49cc975e (diff)
downloadchromium_src-c3ec35638ea6594b6bdbac7ff92c38add8984623.zip
chromium_src-c3ec35638ea6594b6bdbac7ff92c38add8984623.tar.gz
chromium_src-c3ec35638ea6594b6bdbac7ff92c38add8984623.tar.bz2
TrackedObjects assumes you can use a "TLS slot" of -1 to indicate uninitialized. This isn't true for the pthread_key_t type, which is unsigned on Linux and reportedly a struct on Macs. This change modifies the Slot type to be a struct containing an "initialized" flag.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1113 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/plugin_instance.h')
-rw-r--r--webkit/glue/plugins/plugin_instance.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/webkit/glue/plugins/plugin_instance.h b/webkit/glue/plugins/plugin_instance.h
index 5743c24..6cbfd5a 100644
--- a/webkit/glue/plugins/plugin_instance.h
+++ b/webkit/glue/plugins/plugin_instance.h
@@ -40,6 +40,7 @@
#include "base/basictypes.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
+#include "base/thread_local_storage.h"
#include "webkit/glue/plugins/nphostapi.h"
#include "googleurl/src/gurl.h"
#include "third_party/npapi/bindings/npapi.h"
@@ -261,7 +262,7 @@ class PluginInstance : public base::RefCounted<PluginInstance> {
// We need to pass this instance to the service manager
// (MozillaExtensionApi) created as a result of NPN_GetValue
// in the context of NP_Initialize.
- static int plugin_instance_tls_index_;
+ static ThreadLocalStorage::Slot plugin_instance_tls_index_;
scoped_refptr<PluginDataStream> plugin_data_stream_;
GURL instance_url_;