Index: public/platform/WebPrivatePtr.h |
diff --git a/public/platform/WebPrivatePtr.h b/public/platform/WebPrivatePtr.h |
index 31d09a90bdacf2deb393721e1103359840cd7cd7..8d41e07c9558e060e8a919b65e0d40d1eea8c872 100644 |
--- a/public/platform/WebPrivatePtr.h |
+++ b/public/platform/WebPrivatePtr.h |
@@ -51,6 +51,13 @@ public: |
bool isNull() const { return !m_ptr; } |
#if WEBKIT_IMPLEMENTATION |
+ WebPrivatePtr(const WebPrivatePtr& other) |
+ : m_ptr(other.m_ptr) |
+ { |
+ if (m_ptr) |
+ m_ptr->ref(); |
+ } |
+ |
abarth-chromium
2013/05/22 16:21:49
We shouldn't need to modify WebPrivatePtr
|
WebPrivatePtr(const PassRefPtr<T>& prp) |
: m_ptr(prp.leakRef()) |
{ |
@@ -97,6 +104,12 @@ private: |
m_ptr->deref(); |
m_ptr = p; |
} |
+#else |
+ // Disable copy and assign; we define them above for the implementation, but |
+ // we need to make sure that they aren't used outside there; the compiler- |
+ // provided versions won't handle reference counting properly. |
+ WebPrivatePtr(const WebPrivatePtr<T>&); |
+ WebPrivatePtr<T>& operator=(const WebPrivatePtr<T>& other); |
#endif |
T* m_ptr; |