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

Unified Diff: third_party/WebKit/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h

Issue 1466113002: Oilpan: move BaseChooserOnlyDateAndTimeInputType to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: conditionally define GC mixin leftmost bases Created 5 years, 1 month 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: third_party/WebKit/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h
diff --git a/third_party/WebKit/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h b/third_party/WebKit/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h
index ce37c91349de4742ecf73cd2068ecdcf30d6c4c0..00bee9353d70cb3f15af33141f1c98b61ac6490e 100644
--- a/third_party/WebKit/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h
+++ b/third_party/WebKit/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h
@@ -31,14 +31,26 @@
#include "core/html/forms/BaseDateAndTimeInputType.h"
#include "core/html/forms/DateTimeChooser.h"
#include "core/html/forms/DateTimeChooserClient.h"
+#include "platform/heap/Handle.h"
+
+// Not very nice, but the derived {Date,Month,DateTimeLocal,...}InputType will
+// have to conditionally be a GC mixin - conditional on !ENABLE(INPUT_MULTIPLE_FIELDS_UI).
+//
+// Provide a pair of ENABLE(INPUT_MULTIPLE_FIELDS_UI)-dependent macros that expand into
+// the GC mixin and trace declarations required.
+#define WILL_BE_USING_DATETIMERCHOOSERCLIENT_GC_MIXIN(T) WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(T)
+#define DEFINE_BASEDATEANDTIMEINPUTTYPE_VIRTUAL_TRACE(T) DEFINE_INLINE_VIRTUAL_TRACE() { T::trace(visitor); }
namespace blink {
class BaseChooserOnlyDateAndTimeInputType : public BaseDateAndTimeInputType, public DateTimeChooserClient {
+ WILL_BE_USING_PRE_FINALIZER(BaseChooserOnlyDateAndTimeInputType, closeDateTimeChooser);
protected:
- BaseChooserOnlyDateAndTimeInputType(HTMLInputElement& element) : BaseDateAndTimeInputType(element) { }
+ BaseChooserOnlyDateAndTimeInputType(HTMLInputElement&);
~BaseChooserOnlyDateAndTimeInputType() override;
+ DECLARE_VIRTUAL_TRACE();
+
private:
void closeDateTimeChooser();
@@ -59,9 +71,15 @@ private:
void didChooseValue(double) override;
void didEndChooser() override;
- RefPtr<DateTimeChooser> m_dateTimeChooser;
+ RefPtrWillBeMember<DateTimeChooser> m_dateTimeChooser;
};
-}
-#endif
-#endif
+} // namespace blink
+
+#else
+#define WILL_BE_USING_DATETIMERCHOOSERCLIENT_GC_MIXIN(T)
+#define DEFINE_BASEDATEANDTIMEINPUTTYPE_VIRTUAL_TRACE(T)
+
+#endif // ENABLE(INPUT_MULTIPLE_FIELDS_UI)
+
+#endif // BaseChooserOnlyDateAndTimeInputType_h

Powered by Google App Engine
This is Rietveld 408576698