From 3272147d97757673898da87bf02ea93438cae1a1 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 17 Sep 2020 23:48:58 +0000 Subject: Issue #1224 - Remove constant expressions from /dom This excludes DOMProxy handlers in dom bindings because that's intertwined with codegen and js that needs to be handled together. --- dom/bindings/BindingUtils.h | 12 ++++++------ dom/bindings/DOMJSClass.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'dom/bindings') diff --git a/dom/bindings/BindingUtils.h b/dom/bindings/BindingUtils.h index 5cab835b3..12a2e370a 100644 --- a/dom/bindings/BindingUtils.h +++ b/dom/bindings/BindingUtils.h @@ -3071,21 +3071,21 @@ class GetCCParticipant { // Helper for GetCCParticipant for classes that participate in CC. template - static constexpr nsCycleCollectionParticipant* + static nsCycleCollectionParticipant* GetHelper(int, typename U::NS_CYCLE_COLLECTION_INNERCLASS* dummy=nullptr) { return T::NS_CYCLE_COLLECTION_INNERCLASS::GetParticipant(); } // Helper for GetCCParticipant for classes that don't participate in CC. template - static constexpr nsCycleCollectionParticipant* + static nsCycleCollectionParticipant* GetHelper(double) { return nullptr; } public: - static constexpr nsCycleCollectionParticipant* + static nsCycleCollectionParticipant* Get() { // Passing int() here will try to call the GetHelper that takes an int as @@ -3100,7 +3100,7 @@ template class GetCCParticipant { public: - static constexpr nsCycleCollectionParticipant* + static nsCycleCollectionParticipant* Get() { return nullptr; @@ -3123,7 +3123,7 @@ EnumerateGlobal(JSContext* aCx, JS::Handle aObj); template struct CreateGlobalOptions { - static constexpr ProtoAndIfaceCache::Kind ProtoAndIfaceCacheKind = + static const ProtoAndIfaceCache::Kind ProtoAndIfaceCacheKind = ProtoAndIfaceCache::NonWindowLike; static void TraceGlobal(JSTracer* aTrc, JSObject* aObj) { @@ -3140,7 +3140,7 @@ struct CreateGlobalOptions template <> struct CreateGlobalOptions { - static constexpr ProtoAndIfaceCache::Kind ProtoAndIfaceCacheKind = + static const ProtoAndIfaceCache::Kind ProtoAndIfaceCacheKind = ProtoAndIfaceCache::WindowLike; static void TraceGlobal(JSTracer* aTrc, JSObject* aObj); static bool PostCreateGlobal(JSContext* aCx, JS::Handle aGlobal); diff --git a/dom/bindings/DOMJSClass.h b/dom/bindings/DOMJSClass.h index 6e779840f..c97cf9322 100644 --- a/dom/bindings/DOMJSClass.h +++ b/dom/bindings/DOMJSClass.h @@ -210,7 +210,7 @@ struct NativePropertiesN { const int32_t iteratorAliasMethodIndex; - constexpr const NativePropertiesN<7>* Upcast() const { + const NativePropertiesN<7>* Upcast() const { return reinterpret_cast*>(this); } -- cgit v1.2.3