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

Unified Diff: Source/WebKit/chromium/public/WebDOMEvent.h

Issue 15271012: Clean up WebDOMEvent ownership of WebCore::Event. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: 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
Index: Source/WebKit/chromium/public/WebDOMEvent.h
diff --git a/Source/WebKit/chromium/public/WebDOMEvent.h b/Source/WebKit/chromium/public/WebDOMEvent.h
index d85648d8750ae859cb9deba52b659726554f531c..ac7f227f9a3214337546d8190aeecf97b9a0e163 100644
--- a/Source/WebKit/chromium/public/WebDOMEvent.h
+++ b/Source/WebKit/chromium/public/WebDOMEvent.h
@@ -37,6 +37,7 @@
namespace WebCore { class Event; }
#if WEBKIT_IMPLEMENTATION
+#include "wtf/RefPtr.h"
namespace WTF { template <typename T> class PassRefPtr; }
#endif
@@ -112,17 +113,17 @@ public:
protected:
typedef WebCore::Event WebDOMEventPrivate;
- void assign(WebDOMEventPrivate*);
- WebDOMEventPrivate* m_private;
+ void assign(const WTF::PassRefPtr<WebDOMEventPrivate>&);
+ WTF::RefPtr<WebDOMEventPrivate> m_private;
abarth-chromium 2013/05/20 22:04:45 We can't use WTF::RefPtr directly because the cons
template<typename T> T* unwrap()
{
- return static_cast<T*>(m_private);
+ return static_cast<T*>(m_private.get());
}
template<typename T> const T* constUnwrap() const
{
- return static_cast<const T*>(m_private);
+ return static_cast<const T*>(m_private.get());
}
};
« no previous file with comments | « no previous file | Source/WebKit/chromium/src/WebDOMEvent.cpp » ('j') | Source/WebKit/chromium/src/WebDOMEvent.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698