From: Android Tools Maintainers Date: Tue, 19 Mar 2019 01:46:21 +0000 (+0000) Subject: Conforms with the exception specification of `std::atomic` X-Git-Tag: archive/raspbian/10.0.0+r36-3+rpi1~17 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6391accc6f80faeac1c191df488302f5c7f92541;p=android-platform-art.git Conforms with the exception specification of `std::atomic` 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 0894e9b..e860d81 100644 --- a/runtime/gc_root.h +++ b/runtime/gc_root.h @@ -212,7 +212,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 7fd5dd1..a80faae 100644 --- a/runtime/mirror/dex_cache.h +++ b/runtime/mirror/dex_cache.h @@ -65,7 +65,7 @@ template struct PACKED(8) DexCachePair { DexCachePair(ObjPtr object, uint32_t index) : object(object), index(index) {} - DexCachePair() : index(0) {} + DexCachePair() noexcept : index(0) {} DexCachePair(const DexCachePair&) = default; DexCachePair& operator=(const DexCachePair&) = default; @@ -99,7 +99,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 a96a120..5880221 100644 --- a/runtime/mirror/object_reference.h +++ b/runtime/mirror/object_reference.h @@ -109,7 +109,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)