Index: third_party/WebKit/Source/platform/Supplementable.h |
diff --git a/third_party/WebKit/Source/platform/Supplementable.h b/third_party/WebKit/Source/platform/Supplementable.h |
index c2b90df0f0a3ec2457dac03425f1d030a2dfbfe9..6ec435c81fc6819439cea6f3aaec688efd660573 100644 |
--- a/third_party/WebKit/Source/platform/Supplementable.h |
+++ b/third_party/WebKit/Source/platform/Supplementable.h |
@@ -98,7 +98,12 @@ class Supplement : public GarbageCollectedMixin { |
// TODO(haraken): Remove the default constructor. |
// All Supplement objects should be instantiated with m_host. |
Supplement() {} |
+ |
explicit Supplement(T& host) : m_host(&host) {} |
+ |
+ // Supplementable and its supplements live and die together. |
+ // Thus host() should never return null (if the default constructor |
+ // is completely removed). |
T* host() const { return m_host; } |
static void provideTo(Supplementable<T>& host, |