From f8fbde659a566dedd22ed34c63dc6cd0fa2b9dd4 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Tue, 2 Feb 2016 17:36:31 +0200 Subject: [PATCH] Bug 1235261 - Part 7: Remove AutoInfallibleTArray. r=froydnj --- xpcom/glue/nsTArray.h | 3 --- xpcom/glue/nsTArrayForwardDeclare.h | 1 - xpcom/tests/TestTArray.cpp | 10 ---------- 3 files changed, 14 deletions(-) diff --git a/xpcom/glue/nsTArray.h b/xpcom/glue/nsTArray.h index 75c8ed3794c..60f0bb98122 100644 --- a/xpcom/glue/nsTArray.h +++ b/xpcom/glue/nsTArray.h @@ -57,9 +57,6 @@ struct TileClient; // nsTArray and AutoTArray are infallible by default. To opt-in to fallible // behaviour, use the `mozilla::fallible` parameter and check the return value. // -// InfallibleTArray and AutoInfallibleTArray are aliases for nsTArray and -// AutoTArray. -// // If you just want to declare the nsTArray types (e.g., if you're in a header // file and don't need the full nsTArray definitions) consider including // nsTArrayForwardDeclare.h instead of nsTArray.h. diff --git a/xpcom/glue/nsTArrayForwardDeclare.h b/xpcom/glue/nsTArrayForwardDeclare.h index 10c2d688989..d9068e429d6 100644 --- a/xpcom/glue/nsTArrayForwardDeclare.h +++ b/xpcom/glue/nsTArrayForwardDeclare.h @@ -31,6 +31,5 @@ template class AutoTArray; #define InfallibleTArray nsTArray -#define AutoInfallibleTArray AutoTArray #endif diff --git a/xpcom/tests/TestTArray.cpp b/xpcom/tests/TestTArray.cpp index 29ee8b71309..6d186cb4d58 100644 --- a/xpcom/tests/TestTArray.cpp +++ b/xpcom/tests/TestTArray.cpp @@ -1040,8 +1040,6 @@ static bool test_conversion_operator() { InfallibleTArray i; const InfallibleTArray iconst; - AutoInfallibleTArray iauto; - const AutoInfallibleTArray iautoconst; nsTArray t; const nsTArray tconst; @@ -1058,10 +1056,6 @@ static bool test_conversion_operator() { if ((void*)&z5 != (void*)&i) return false; \ const type& z6 = iconst; \ if ((void*)&z6 != (void*)&iconst) return false; \ - const type& z7 = iauto; \ - if ((void*)&z7 != (void*)&iauto) return false; \ - const type& z8 = iautoconst; \ - if ((void*)&z8 != (void*)&iautoconst) return false; \ const type& z9 = t; \ if ((void*)&z9 != (void*)&t) return false; \ const type& z10 = tconst; \ @@ -1093,7 +1087,6 @@ static bool test_SetLengthAndRetainStorage_no_ctor() { FallibleTArray f; InfallibleTArray i; - AutoInfallibleTArray iauto; nsTArray t; AutoTArray tauto; @@ -1104,7 +1097,6 @@ static bool test_SetLengthAndRetainStorage_no_ctor() { do { \ pre f post; \ pre i post; \ - pre iauto post; \ pre t post; \ pre tauto post; \ } while (0) @@ -1118,7 +1110,6 @@ static bool test_SetLengthAndRetainStorage_no_ctor() { void* initial_Hdrs[] = { static_cast >&>(f).GetHdr(), static_cast >&>(i).GetHdr(), - static_cast >&>(iauto).GetHdr(), static_cast >&>(t).GetHdr(), static_cast >&>(tauto).GetHdr(), nullptr @@ -1140,7 +1131,6 @@ static bool test_SetLengthAndRetainStorage_no_ctor() { void* current_Hdrs[] = { static_cast >&>(f).GetHdr(), static_cast >&>(i).GetHdr(), - static_cast >&>(iauto).GetHdr(), static_cast >&>(t).GetHdr(), static_cast >&>(tauto).GetHdr(), nullptr