Commit 6fdb0434 authored by rsleevi@chromium.org's avatar rsleevi@chromium.org

Rename nacl::RefCounted to nacl::RefCountedThreadSafe, to make it easier to...

Rename nacl::RefCounted to nacl::RefCountedThreadSafe, to make it easier to alias as gpu::RefCountedThreadSafe.

Additionally, ensure all of the nacl::RefCountedThreadSafe-derived classes
do not have public destructors.

BUG=123295
TEST=none


Review URL: https://chromiumcodereview.appspot.com/10386080

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137936 0039d316-1c4b-4281-b951-d872f2087c98
parent 49a71fa2
...@@ -8,16 +8,12 @@ ...@@ -8,16 +8,12 @@
#if defined(__native_client__) #if defined(__native_client__)
#include "native_client/src/include/ref_counted.h" #include "native_client/src/include/ref_counted.h"
namespace gpu { namespace gpu {
template <class T> using nacl::RefCountedThreadSafe;
struct RefCountedThreadSafe : public nacl::RefCounted<T> {
};
} }
#else #else
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
namespace gpu { namespace gpu {
template <class T> using base::RefCountedThreadSafe;
struct RefCountedThreadSafe : public base::RefCountedThreadSafe<T> {
};
} }
#endif #endif
......
...@@ -65,10 +65,9 @@ class RefCountedBase { ...@@ -65,10 +65,9 @@ class RefCountedBase {
// You should always make your destructor private, to avoid any code deleting // You should always make your destructor private, to avoid any code deleting
// the object accidently while there are references to it. // the object accidently while there are references to it.
template <class T> template <class T>
class RefCounted : public subtle::RefCountedBase { class RefCountedThreadSafe : public subtle::RefCountedBase {
public: public:
RefCounted() { } RefCountedThreadSafe() {}
~RefCounted() { }
void AddRef() const { void AddRef() const {
subtle::RefCountedBase::AddRef(); subtle::RefCountedBase::AddRef();
...@@ -80,9 +79,12 @@ class RefCounted : public subtle::RefCountedBase { ...@@ -80,9 +79,12 @@ class RefCounted : public subtle::RefCountedBase {
} }
} }
protected:
~RefCountedThreadSafe() {}
private: private:
RefCounted(const RefCounted<T>&); RefCountedThreadSafe(const RefCountedThreadSafe<T>&);
void operator=(const RefCounted<T>&); void operator=(const RefCountedThreadSafe<T>&);
}; };
// //
...@@ -90,7 +92,8 @@ class RefCounted : public subtle::RefCountedBase { ...@@ -90,7 +92,8 @@ class RefCounted : public subtle::RefCountedBase {
// scoped_refptrs<>. // scoped_refptrs<>.
// //
template<typename T> template<typename T>
class RefCountedData : public nacl::RefCounted< nacl::RefCountedData<T> > { class RefCountedData
: public RefCountedThreadSafe<RefCountedData<T> > {
public: public:
RefCountedData() : data() {} RefCountedData() : data() {}
RefCountedData(const T& in_value) : data(in_value) {} RefCountedData(const T& in_value) : data(in_value) {}
...@@ -151,8 +154,7 @@ class RefCountedData : public nacl::RefCounted< nacl::RefCountedData<T> > { ...@@ -151,8 +154,7 @@ class RefCountedData : public nacl::RefCounted< nacl::RefCountedData<T> > {
template <class T> template <class T>
class scoped_refptr { class scoped_refptr {
public: public:
scoped_refptr() : ptr_((T*)0) { scoped_refptr() : ptr_((T*)0) {}
}
scoped_refptr(T* p) : ptr_(p) { scoped_refptr(T* p) : ptr_(p) {
if (ptr_) if (ptr_)
......
...@@ -34,6 +34,9 @@ class ArrayBufferProxyVar : public ProxyVar { ...@@ -34,6 +34,9 @@ class ArrayBufferProxyVar : public ProxyVar {
static_cast<ArrayBufferProxyVar*>(proxy_var.get())); static_cast<ArrayBufferProxyVar*>(proxy_var.get()));
} }
protected:
virtual ~ArrayBufferProxyVar() {}
private: private:
std::vector<uint8_t> buffer_; std::vector<uint8_t> buffer_;
}; };
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -31,7 +31,6 @@ enum PluginAudioState { ...@@ -31,7 +31,6 @@ enum PluginAudioState {
class PluginAudio : public PluginResource { class PluginAudio : public PluginResource {
public: public:
PluginAudio(); PluginAudio();
virtual ~PluginAudio();
void StreamCreated(NaClSrpcImcDescType socket, void StreamCreated(NaClSrpcImcDescType socket,
NaClSrpcImcDescType shm, size_t shm_size); NaClSrpcImcDescType shm, size_t shm_size);
void set_state(PluginAudioState state) { state_ = state; } void set_state(PluginAudioState state) { state_ = state; }
...@@ -45,6 +44,10 @@ class PluginAudio : public PluginResource { ...@@ -45,6 +44,10 @@ class PluginAudio : public PluginResource {
static void AudioThread(void* self); static void AudioThread(void* self);
static const PPB_Audio* GetInterface(); static const PPB_Audio* GetInterface();
virtual bool InitFromBrowserResource(PP_Resource resource); virtual bool InitFromBrowserResource(PP_Resource resource);
protected:
virtual ~PluginAudio();
private: private:
PP_Resource resource_; PP_Resource resource_;
NaClSrpcImcDescType socket_; NaClSrpcImcDescType socket_;
...@@ -56,6 +59,7 @@ class PluginAudio : public PluginResource { ...@@ -56,6 +59,7 @@ class PluginAudio : public PluginResource {
bool thread_active_; bool thread_active_;
PPB_Audio_Callback user_callback_; PPB_Audio_Callback user_callback_;
void* user_data_; void* user_data_;
IMPLEMENT_RESOURCE(PluginAudio); IMPLEMENT_RESOURCE(PluginAudio);
NACL_DISALLOW_COPY_AND_ASSIGN(PluginAudio); NACL_DISALLOW_COPY_AND_ASSIGN(PluginAudio);
}; };
......
...@@ -18,6 +18,9 @@ class PluginAudioConfig : public PluginResource { ...@@ -18,6 +18,9 @@ class PluginAudioConfig : public PluginResource {
// Returns the 1.0 interface to support backwards-compatibility. // Returns the 1.0 interface to support backwards-compatibility.
static const PPB_AudioConfig_1_0* GetInterface1_0(); static const PPB_AudioConfig_1_0* GetInterface1_0();
protected:
virtual ~PluginAudioConfig() {}
private: private:
NACL_DISALLOW_COPY_AND_ASSIGN(PluginAudioConfig); NACL_DISALLOW_COPY_AND_ASSIGN(PluginAudioConfig);
}; };
......
// Copyright 2011 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can // Use of this source code is governed by a BSD-style license that can be
// be found in the LICENSE file. // found in the LICENSE file.
#ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_BUFFER_H_ #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_BUFFER_H_
#define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_BUFFER_H_ #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_BUFFER_H_
...@@ -16,6 +16,9 @@ class PluginBuffer : public PluginResource { ...@@ -16,6 +16,9 @@ class PluginBuffer : public PluginResource {
public: public:
static const PPB_Buffer_Dev* GetInterface(); static const PPB_Buffer_Dev* GetInterface();
protected:
virtual ~PluginBuffer() {}
private: private:
IMPLEMENT_RESOURCE(PluginBuffer); IMPLEMENT_RESOURCE(PluginBuffer);
NACL_DISALLOW_COPY_AND_ASSIGN(PluginBuffer); NACL_DISALLOW_COPY_AND_ASSIGN(PluginBuffer);
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -19,6 +19,9 @@ class PluginFont : public PluginResource { ...@@ -19,6 +19,9 @@ class PluginFont : public PluginResource {
static const PPB_Font_Dev* GetInterface(); static const PPB_Font_Dev* GetInterface();
protected:
virtual ~PluginFont() {}
private: private:
NACL_DISALLOW_COPY_AND_ASSIGN(PluginFont); NACL_DISALLOW_COPY_AND_ASSIGN(PluginFont);
}; };
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -19,6 +19,9 @@ class PluginGraphics2D : public PluginResource { ...@@ -19,6 +19,9 @@ class PluginGraphics2D : public PluginResource {
static const PPB_Graphics2D* GetInterface(); static const PPB_Graphics2D* GetInterface();
protected:
virtual ~PluginGraphics2D() {}
private: private:
IMPLEMENT_RESOURCE(PluginGraphics2D); IMPLEMENT_RESOURCE(PluginGraphics2D);
NACL_DISALLOW_COPY_AND_ASSIGN(PluginGraphics2D); NACL_DISALLOW_COPY_AND_ASSIGN(PluginGraphics2D);
......
...@@ -29,7 +29,6 @@ namespace ppapi_proxy { ...@@ -29,7 +29,6 @@ namespace ppapi_proxy {
class PluginGraphics3D : public PluginResource { class PluginGraphics3D : public PluginResource {
public: public:
PluginGraphics3D(); PluginGraphics3D();
virtual ~PluginGraphics3D();
static const PPB_Graphics3D* GetInterface(); static const PPB_Graphics3D* GetInterface();
static const PPB_OpenGLES2* GetOpenGLESInterface(); static const PPB_OpenGLES2* GetOpenGLESInterface();
...@@ -66,8 +65,13 @@ class PluginGraphics3D : public PluginResource { ...@@ -66,8 +65,13 @@ class PluginGraphics3D : public PluginResource {
return implFromResourceSlow(graphics3d_id); return implFromResourceSlow(graphics3d_id);
} }
protected:
virtual ~PluginGraphics3D();
private: private:
static gpu::gles2::GLES2Implementation* implFromResourceSlow(
PP_Resource context);
// TODO(nfullagar): make cached_* variables TLS once 64bit NaCl is faster, // TODO(nfullagar): make cached_* variables TLS once 64bit NaCl is faster,
// and the proxy has support for being called off the main thread. // and the proxy has support for being called off the main thread.
// see: http://code.google.com/p/chromium/issues/detail?id=99217 // see: http://code.google.com/p/chromium/issues/detail?id=99217
...@@ -81,9 +85,6 @@ class PluginGraphics3D : public PluginResource { ...@@ -81,9 +85,6 @@ class PluginGraphics3D : public PluginResource {
scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
PP_Instance instance_id_; PP_Instance instance_id_;
static gpu::gles2::GLES2Implementation* implFromResourceSlow(
PP_Resource context);
IMPLEMENT_RESOURCE(PluginGraphics3D); IMPLEMENT_RESOURCE(PluginGraphics3D);
NACL_DISALLOW_COPY_AND_ASSIGN(PluginGraphics3D); NACL_DISALLOW_COPY_AND_ASSIGN(PluginGraphics3D);
}; };
......
...@@ -141,14 +141,6 @@ PluginImageData::PluginImageData() ...@@ -141,14 +141,6 @@ PluginImageData::PluginImageData()
memset(&desc_, 0, sizeof(desc_)); memset(&desc_, 0, sizeof(desc_));
} }
PluginImageData::~PluginImageData() {
Unmap();
if (shm_fd_ != -1) {
close(shm_fd_);
shm_fd_ = -1;
}
}
bool PluginImageData::InitFromBrowserResource(PP_Resource resource) { bool PluginImageData::InitFromBrowserResource(PP_Resource resource) {
nacl_abi_size_t desc_size = static_cast<nacl_abi_size_t>(sizeof(desc_)); nacl_abi_size_t desc_size = static_cast<nacl_abi_size_t>(sizeof(desc_));
int32_t success = PP_FALSE; int32_t success = PP_FALSE;
...@@ -185,4 +177,12 @@ void PluginImageData::Unmap() { ...@@ -185,4 +177,12 @@ void PluginImageData::Unmap() {
} }
} }
PluginImageData::~PluginImageData() {
Unmap();
if (shm_fd_ != -1) {
close(shm_fd_);
shm_fd_ = -1;
}
}
} // namespace ppapi_proxy } // namespace ppapi_proxy
// Copyright 2011 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can // Use of this source code is governed by a BSD-style license that can be
// be found in the LICENSE file. // found in the LICENSE file.
#ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_IMAGE_DATA_H_ #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_IMAGE_DATA_H_
#define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_IMAGE_DATA_H_ #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_IMAGE_DATA_H_
...@@ -15,7 +15,6 @@ namespace ppapi_proxy { ...@@ -15,7 +15,6 @@ namespace ppapi_proxy {
class PluginImageData : public PluginResource { class PluginImageData : public PluginResource {
public: public:
PluginImageData(); PluginImageData();
virtual ~PluginImageData();
static const PPB_ImageData* GetInterface(); static const PPB_ImageData* GetInterface();
...@@ -24,13 +23,18 @@ class PluginImageData : public PluginResource { ...@@ -24,13 +23,18 @@ class PluginImageData : public PluginResource {
void Unmap(); void Unmap();
const PP_ImageDataDesc& desc() const { return desc_; } const PP_ImageDataDesc& desc() const { return desc_; }
protected:
virtual ~PluginImageData();
private: private:
IMPLEMENT_RESOURCE(PluginImageData);
NACL_DISALLOW_COPY_AND_ASSIGN(PluginImageData);
PP_ImageDataDesc desc_; PP_ImageDataDesc desc_;
int shm_fd_; int shm_fd_;
int32_t shm_size_; int32_t shm_size_;
void* addr_; void* addr_;
IMPLEMENT_RESOURCE(PluginImageData);
NACL_DISALLOW_COPY_AND_ASSIGN(PluginImageData);
}; };
} // namespace ppapi_proxy } // namespace ppapi_proxy
......
...@@ -411,11 +411,6 @@ void PluginInputEvent::Init(const InputEventData& input_event_data, ...@@ -411,11 +411,6 @@ void PluginInputEvent::Init(const InputEventData& input_event_data,
character_text_ = character_text; character_text_ = character_text;
} }
PluginInputEvent::~PluginInputEvent() {
// Release the character text. This is a no-op if it's not a string.
PPBVarInterface()->Release(character_text_);
}
PP_InputEvent_Type PluginInputEvent::GetType() const { PP_InputEvent_Type PluginInputEvent::GetType() const {
return input_event_data_.event_type; return input_event_data_.event_type;
} }
...@@ -474,4 +469,9 @@ uint32_t PluginInputEvent::GetUsbKeyCode() const { ...@@ -474,4 +469,9 @@ uint32_t PluginInputEvent::GetUsbKeyCode() const {
return input_event_data_.usb_key_code; return input_event_data_.usb_key_code;
} }
PluginInputEvent::~PluginInputEvent() {
// Release the character text. This is a no-op if it's not a string.
PPBVarInterface()->Release(character_text_);
}
} // namespace ppapi_proxy } // namespace ppapi_proxy
...@@ -20,7 +20,6 @@ class PluginInputEvent : public PluginResource { ...@@ -20,7 +20,6 @@ class PluginInputEvent : public PluginResource {
// Init the PluginInputEvent resource with the given data. Assumes // Init the PluginInputEvent resource with the given data. Assumes
// character_text has been AddRefed if it's a string, and takes ownership. // character_text has been AddRefed if it's a string, and takes ownership.
void Init(const InputEventData& input_event_data, PP_Var character_text); void Init(const InputEventData& input_event_data, PP_Var character_text);
virtual ~PluginInputEvent();
// PluginResource implementation. // PluginResource implementation.
virtual bool InitFromBrowserResource(PP_Resource /*resource*/) { virtual bool InitFromBrowserResource(PP_Resource /*resource*/) {
...@@ -53,12 +52,15 @@ class PluginInputEvent : public PluginResource { ...@@ -53,12 +52,15 @@ class PluginInputEvent : public PluginResource {
PP_Bool SetUsbKeyCode(uint32_t usb_key_code); PP_Bool SetUsbKeyCode(uint32_t usb_key_code);
uint32_t GetUsbKeyCode() const; uint32_t GetUsbKeyCode() const;
private: protected:
IMPLEMENT_RESOURCE(PluginInputEvent); virtual ~PluginInputEvent();
NACL_DISALLOW_COPY_AND_ASSIGN(PluginInputEvent);
private:
InputEventData input_event_data_; InputEventData input_event_data_;
PP_Var character_text_; // Undefined if this is not a character event. PP_Var character_text_; // Undefined if this is not a character event.
IMPLEMENT_RESOURCE(PluginInputEvent);
NACL_DISALLOW_COPY_AND_ASSIGN(PluginInputEvent);
}; };
} // namespace ppapi_proxy } // namespace ppapi_proxy
......
...@@ -82,11 +82,7 @@ PP_Bool GetClipRect(PP_Resource resource, PP_Rect* clip) { ...@@ -82,11 +82,7 @@ PP_Bool GetClipRect(PP_Resource resource, PP_Rect* clip) {
} // namespace } // namespace
PluginView::PluginView() { PluginView::PluginView() {}
}
PluginView::~PluginView() {
}
void PluginView::Init(const ViewData& view_data) { void PluginView::Init(const ViewData& view_data) {
view_data_ = view_data; view_data_ = view_data;
...@@ -104,4 +100,6 @@ const PPB_View* PluginView::GetInterface() { ...@@ -104,4 +100,6 @@ const PPB_View* PluginView::GetInterface() {
return &view_interface; return &view_interface;
} }
PluginView::~PluginView() {}
} // namespace ppapi_proxy } // namespace ppapi_proxy
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can // Use of this source code is governed by a BSD-style license that can be
// be found in the LICENSE file. // found in the LICENSE file.
#ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VIEW_H_ #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VIEW_H_
#define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VIEW_H_ #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VIEW_H_
...@@ -17,7 +17,6 @@ class PluginView : public PluginResource { ...@@ -17,7 +17,6 @@ class PluginView : public PluginResource {
public: public:
PluginView(); PluginView();
void Init(const ViewData& view_data); void Init(const ViewData& view_data);
virtual ~PluginView();
// PluginResource implementation. // PluginResource implementation.
virtual bool InitFromBrowserResource(PP_Resource /*resource*/) { virtual bool InitFromBrowserResource(PP_Resource /*resource*/) {
...@@ -29,10 +28,12 @@ class PluginView : public PluginResource { ...@@ -29,10 +28,12 @@ class PluginView : public PluginResource {
static const PPB_View* GetInterface(); static const PPB_View* GetInterface();
private: private:
IMPLEMENT_RESOURCE(PluginView); virtual ~PluginView();
NACL_DISALLOW_COPY_AND_ASSIGN(PluginView);
ViewData view_data_; ViewData view_data_;
IMPLEMENT_RESOURCE(PluginView);
NACL_DISALLOW_COPY_AND_ASSIGN(PluginView);
}; };
} // namespace ppapi_proxy } // namespace ppapi_proxy
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -29,10 +29,9 @@ namespace ppapi_proxy { ...@@ -29,10 +29,9 @@ namespace ppapi_proxy {
FOR_ALL_RESOURCES(DECLARE_RESOURCE_CLASS) FOR_ALL_RESOURCES(DECLARE_RESOURCE_CLASS)
#undef DECLARE_RESOURCE_CLASS #undef DECLARE_RESOURCE_CLASS
class PluginResource : public nacl::RefCounted<PluginResource> { class PluginResource : public nacl::RefCountedThreadSafe<PluginResource> {
public: public:
PluginResource(); PluginResource();
virtual ~PluginResource();
// Returns NULL if the resource is invalid or is a different type. // Returns NULL if the resource is invalid or is a different type.
template<typename T> template<typename T>
...@@ -69,9 +68,13 @@ class PluginResource : public nacl::RefCounted<PluginResource> { ...@@ -69,9 +68,13 @@ class PluginResource : public nacl::RefCounted<PluginResource> {
template <typename T> T* Cast() { return NULL; } template <typename T> T* Cast() { return NULL; }
protected: protected:
virtual ~PluginResource();
virtual bool InitFromBrowserResource(PP_Resource resource) = 0; virtual bool InitFromBrowserResource(PP_Resource resource) = 0;
private: private:
friend class nacl::RefCountedThreadSafe<PluginResource>;
// Type-specific getters for individual resource types. These will return // Type-specific getters for individual resource types. These will return
// NULL if the resource does not match the specified type. Used by the Cast() // NULL if the resource does not match the specified type. Used by the Cast()
// function. // function.
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -19,7 +19,7 @@ namespace ppapi_proxy { ...@@ -19,7 +19,7 @@ namespace ppapi_proxy {
// //
// Note: this class is intended to be sub-classed to handle specific content // Note: this class is intended to be sub-classed to handle specific content
// types such as strings, dictionaries, or arrays. // types such as strings, dictionaries, or arrays.
class ProxyVar : public nacl::RefCounted<ProxyVar> { class ProxyVar : public nacl::RefCountedThreadSafe<ProxyVar> {
public: public:
// The type of this cached object. Simple types (int, bool, etc.) are not // The type of this cached object. Simple types (int, bool, etc.) are not
// cached. // cached.
...@@ -38,15 +38,16 @@ class ProxyVar : public nacl::RefCounted<ProxyVar> { ...@@ -38,15 +38,16 @@ class ProxyVar : public nacl::RefCounted<ProxyVar> {
virtual ~ProxyVar() {} virtual ~ProxyVar() {}
private: private:
friend class nacl::RefCounted<ProxyVar>; friend class nacl::RefCountedThreadSafe<ProxyVar>;
PP_VarType pp_var_type_; PP_VarType pp_var_type_;
int64_t id_; int64_t id_;
ProxyVar(); // Not implemented - do not use.
NACL_DISALLOW_COPY_AND_ASSIGN(ProxyVar);
// A counter for unique ids. // A counter for unique ids.
static int64_t unique_var_id; static int64_t unique_var_id;
ProxyVar(); // Not implemented - do not use.
NACL_DISALLOW_COPY_AND_ASSIGN(ProxyVar);
}; };
typedef scoped_refptr<ProxyVar> SharedProxyVar; typedef scoped_refptr<ProxyVar> SharedProxyVar;
......
...@@ -35,6 +35,9 @@ class StringProxyVar : public ProxyVar { ...@@ -35,6 +35,9 @@ class StringProxyVar : public ProxyVar {
static_cast<StringProxyVar*>(proxy_var.get())); static_cast<StringProxyVar*>(proxy_var.get()));
} }
protected:
virtual ~StringProxyVar() {}
private: private:
std::string contents_; std::string contents_;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment