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

Unified Diff: public/platform/WebPrivatePtr.h

Issue 15271012: Clean up WebDOMEvent ownership of WebCore::Event. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Revise WebPrivatePtr copy-ctor comment Created 7 years, 7 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
« no previous file with comments | « Source/WebKit/chromium/src/WebDOMMessageEvent.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebPrivatePtr.h
diff --git a/public/platform/WebPrivatePtr.h b/public/platform/WebPrivatePtr.h
index 31d09a90bdacf2deb393721e1103359840cd7cd7..633ecf6b321ed969be606b58d2e3a2c8d4abefc2 100644
--- a/public/platform/WebPrivatePtr.h
+++ b/public/platform/WebPrivatePtr.h
@@ -97,7 +97,15 @@ private:
m_ptr->deref();
m_ptr = p;
}
+#else
+ // Disable assign; we define it above for when WEBKIT_IMPLEMENTATION is set,
darin (slow to review) 2013/05/22 20:28:22 nit: confusing to call this operator "assign" sinc
dmichael (off chromium) 2013/05/22 20:54:29 Good point, done.
+ // but we need to make sure that it is not used outside there; the
+ // compiler-provided version won't handle reference counting properly.
+ WebPrivatePtr<T>& operator=(const WebPrivatePtr<T>& other);
#endif
+ // Disable copy; classes that contain a WebPrivatePtr should implement their
darin (slow to review) 2013/05/22 20:28:22 ditto: copy -> copy constructor
dmichael (off chromium) 2013/05/22 20:54:29 Done.
+ // copy constructor using assign().
+ WebPrivatePtr(const WebPrivatePtr<T>&);
T* m_ptr;
};
« no previous file with comments | « Source/WebKit/chromium/src/WebDOMMessageEvent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698