From: Android Tools Maintainers Date: Tue, 10 May 2022 10:33:56 +0000 (+0100) Subject: Conforms with the exception specification of `std::atomic` X-Git-Tag: archive/raspbian/11.0.0+r48-4+rpi1~1^2~12 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=44537a3cd7331447dea636c2ca015fe48bd963d2;p=android-platform-art.git Conforms with the exception specification of `std::atomic` Forwarded: not-needed All constructors of `std::atomic` require `noexcept`. As a result, its members must also be able to instantiate without any exception throwing. Gbp-Pq: Name atomic-exception-specification.patch --- diff --git a/runtime/gc_root.h b/runtime/gc_root.h index 8d8c32c..358417d 100644 --- a/runtime/gc_root.h +++ b/runtime/gc_root.h @@ -214,7 +214,7 @@ class GcRoot { return root_.IsNull(); } - ALWAYS_INLINE GcRoot() {} + ALWAYS_INLINE GcRoot() noexcept {} explicit ALWAYS_INLINE GcRoot(MirrorType* ref) REQUIRES_SHARED(Locks::mutator_lock_); explicit ALWAYS_INLINE GcRoot(ObjPtr ref) diff --git a/runtime/mirror/dex_cache.h b/runtime/mirror/dex_cache.h index 6067c76..7f4b6af 100644 --- a/runtime/mirror/dex_cache.h +++ b/runtime/mirror/dex_cache.h @@ -70,7 +70,7 @@ template struct PACKED(8) DexCachePair { // Set the initial state for the 0th entry to be {0,1} which is guaranteed to fail // the lookup id == stored id branch. DexCachePair(ObjPtr object, uint32_t index); - DexCachePair() : index(0) {} + DexCachePair() noexcept : index(0) {} DexCachePair(const DexCachePair&) = default; DexCachePair& operator=(const DexCachePair&) = default; @@ -93,7 +93,7 @@ template struct PACKED(2 * __SIZEOF_POINTER__) NativeDexCachePair { NativeDexCachePair(T* object, uint32_t index) : object(object), index(index) {} - NativeDexCachePair() : object(nullptr), index(0u) { } + NativeDexCachePair() noexcept : object(nullptr), index(0u) { } NativeDexCachePair(const NativeDexCachePair&) = default; NativeDexCachePair& operator=(const NativeDexCachePair&) = default; diff --git a/runtime/mirror/object_reference.h b/runtime/mirror/object_reference.h index f01bcbd..3d92f91 100644 --- a/runtime/mirror/object_reference.h +++ b/runtime/mirror/object_reference.h @@ -164,7 +164,7 @@ static_assert(sizeof(mirror::HeapReference) == kHeapReferenceSiz template class MANAGED CompressedReference : public mirror::ObjectReference { public: - CompressedReference() REQUIRES_SHARED(Locks::mutator_lock_) + CompressedReference() noexcept REQUIRES_SHARED(Locks::mutator_lock_) : mirror::ObjectReference(nullptr) {} static CompressedReference FromMirrorPtr(MirrorType* p)