Bug 1538694 - Try to appease windows builds.
☠☠ backed out by 105411e3cf06 ☠ ☠
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 26 Mar 2019 15:11:53 +0100
changeset 466100 563e8fb1be5db3fa6f984c34270a35c7cf1dd4e6
parent 466099 7bd834c5800c93f54df331311d726dc571813d7b
child 466101 105411e3cf06b2fca98d4e0507efb80875103228
push id81443
push useremilio@crisal.io
push dateTue, 26 Mar 2019 14:14:28 +0000
treeherderautoland@563e8fb1be5d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1538694
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1538694 - Try to appease windows builds. CLOSED TREE
layout/style/ServoBindingTypes.h
layout/style/ServoBindings.h
--- a/layout/style/ServoBindingTypes.h
+++ b/layout/style/ServoBindingTypes.h
@@ -154,16 +154,20 @@ class Element;
     static void AddRef(type_* aPtr) { Servo_##name_##_AddRef(aPtr); }   \
     static void Release(type_* aPtr) { Servo_##name_##_Release(aPtr); } \
   };                                                                    \
   }
 #include "mozilla/ServoArcTypeList.h"
 SERVO_ARC_TYPE(ComputedStyle, mozilla::ComputedStyle)
 #undef SERVO_ARC_TYPE
 
+// See the comment in ServoBindings.h about the same.
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
+
 #define SERVO_BOXED_TYPE(name_, type_)                              \
   struct type_;                                                     \
   extern "C" void Servo_##name_##_Drop(mozilla::StyleOwned<type_>); \
   namespace mozilla {                                               \
   template <>                                                       \
   class DefaultDelete<type_> {                                      \
    public:                                                          \
     void operator()(type_* aPtr) const {                            \
@@ -173,15 +177,17 @@ SERVO_ARC_TYPE(ComputedStyle, mozilla::C
   }
 SERVO_BOXED_TYPE(StyleSet, RawServoStyleSet)
 SERVO_BOXED_TYPE(AuthorStyles, RawServoAuthorStyles)
 SERVO_BOXED_TYPE(SelectorList, RawServoSelectorList)
 SERVO_BOXED_TYPE(SourceSizeList, RawServoSourceSizeList)
 SERVO_BOXED_TYPE(UseCounters, StyleUseCounters)
 #undef SERVO_BOXED_TYPE
 
+#pragma GCC diagnostic pop
+
 // Other special cases.
 
 // TODO(heycam): Handle these elsewhere.
 struct RawServoAnimationValueTable;
 struct RawServoAnimationValueMap;
 
 #endif  // mozilla_ServoBindingTypes_h
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -45,16 +45,23 @@ namespace dom {
 enum class IterationCompositeOperation : uint8_t;
 }
 }  // namespace mozilla
 
 namespace nsStyleTransformMatrix {
 enum class MatrixTransformOperator : uint8_t;
 }
 
+// The clang we use on windows complains about returning StyleStrong<> and
+// StyleOwned<>, since the template parameters are incomplete.
+//
+// But they only contain pointers so it is ok.
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
+
 extern "C" {
 
 // Element data
 void Servo_Element_ClearData(const mozilla::dom::Element* node);
 
 size_t Servo_Element_SizeOfExcludingThisAndCVs(
     mozilla::MallocSizeOf malloc_size_of,
     mozilla::MallocSizeOf malloc_enclosing_size_of,
@@ -989,9 +996,11 @@ mozilla::StyleStrong<RawServoQuotes> Ser
 bool Servo_Quotes_Equal(const RawServoQuotes* a, RawServoQuotes* b);
 
 void Servo_Quotes_GetQuote(const RawServoQuotes* quotes, int32_t depth,
                            mozilla::StyleContentType quote_type,
                            nsAString* result);
 
 }  // extern "C"
 
+#pragma GCC diagnostic pop
+
 #endif  // mozilla_ServoBindings_h