[Webkit-unassigned] [Bug 43276] Implements IDBKeyPath extractor.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 10 10:17:35 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=43276
--- Comment #18 from hans at chromium.org 2010-08-10 10:17:34 PST ---
(In reply to comment #16)
> Created an attachment (id=64017)
--> (https://bugs.webkit.org/attachment.cgi?id=64017) [details]
> Patch
I'm only commenting on the WebPrivateOwnPtr part.
In WebKit/chromium/public/WebPrivateOwnPtr.h:
+#if WEBKIT_IMPLEMENTATION
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+#endif
Those classes don't seem to be used.
The class should probably be Noncopyable, so hide copy ctor and assignment operator in the private section.
When WEBKIT_IMPLEMENTATION is not defined, code should probably not be allowed to construct objects of the class. To prevent this, maybe the WebPrivateOwnPtr() contructor should be declared in the private: section.
+ void reset()
+ {
+ // we own m_ptr.
+ delete m_ptr;
+ m_ptr = 0;
+ }
There is a subtle point to not defining reset() inline. If it is inline, then T must be defined when WebPrivatePtr<T> is instantiated, because it will try to bind the "delete m_ptr" call. If reset() is not inline, it's enough to have T forward-declared when instantiating the template, which is a good thing. OwnPtr does this too, for the same reason AFAIK.
Also, I thought you would do this in Bug 43709. If not, at least please update that when this goes in.
This is definitely a nice class to have, I think :)
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list