Bug 1235261 - Part 6: Rename AutoInfallibleTArray to AutoTArray. r=froydnj
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Tue, 02 Feb 2016 17:36:31 +0200
changeset 319083 e9a8abd870b906dd4e1b63784ea96d07579122b3
parent 319082 0862175edb88673e1207e43e166bc3ed9fd9ed54
child 319084 32bacd86298aa5ceca6675fd3b40cff2394124e7
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1235261
milestone47.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 1235261 - Part 6: Rename AutoInfallibleTArray to AutoTArray. r=froydnj
dom/bluetooth/common/BluetoothService.cpp
dom/ipc/TabParent.cpp
dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
dom/plugins/ipc/PluginScriptableObjectChild.cpp
dom/plugins/ipc/PluginScriptableObjectParent.cpp
dom/xslt/xslt/txExecutionState.h
gfx/layers/client/ClientLayerManager.cpp
gfx/layers/ipc/ImageBridgeChild.cpp
gfx/layers/ipc/ShadowLayers.cpp
hal/WindowIdentifier.h
hal/sandbox/SandboxHal.cpp
js/xpconnect/src/xpcprivate.h
layout/generic/nsFontInflationData.cpp
layout/style/nsAnimationManager.cpp
layout/style/nsCSSParser.cpp
--- a/dom/bluetooth/common/BluetoothService.cpp
+++ b/dom/bluetooth/common/BluetoothService.cpp
@@ -97,17 +97,17 @@ GetAllBluetoothActors(InfallibleTArray<B
   AutoTArray<ContentParent*, 20> contentActors;
   ContentParent::GetAll(contentActors);
 
   for (uint32_t contentIndex = 0;
        contentIndex < contentActors.Length();
        contentIndex++) {
     MOZ_ASSERT(contentActors[contentIndex]);
 
-    AutoInfallibleTArray<PBluetoothParent*, 5> bluetoothActors;
+    AutoTArray<PBluetoothParent*, 5> bluetoothActors;
     contentActors[contentIndex]->ManagedPBluetoothParent(bluetoothActors);
 
     for (uint32_t bluetoothIndex = 0;
          bluetoothIndex < bluetoothActors.Length();
          bluetoothIndex++) {
       MOZ_ASSERT(bluetoothActors[bluetoothIndex]);
 
       BluetoothParent* actor =
@@ -482,17 +482,17 @@ BluetoothService::StartStopBluetooth(boo
   return rv;
 }
 
 void
 BluetoothService::SetEnabled(bool aEnabled)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
-  AutoInfallibleTArray<BluetoothParent*, 10> childActors;
+  AutoTArray<BluetoothParent*, 10> childActors;
   GetAllBluetoothActors(childActors);
 
   for (uint32_t index = 0; index < childActors.Length(); index++) {
     Unused << childActors[index]->SendEnabled(aEnabled);
   }
 
   /**
    * mEnabled: real status of bluetooth
@@ -566,17 +566,17 @@ BluetoothService::HandleShutdown()
   MOZ_ASSERT(NS_IsMainThread());
 
   // This is a two phase shutdown. First we notify all child processes that
   // bluetooth is going away, and then we wait for them to acknowledge. Then we
   // close down all the bluetooth machinery.
 
   Cleanup();
 
-  AutoInfallibleTArray<BluetoothParent*, 10> childActors;
+  AutoTArray<BluetoothParent*, 10> childActors;
   GetAllBluetoothActors(childActors);
 
   if (!childActors.IsEmpty()) {
     // Notify child processes that they should stop using bluetooth now.
     for (uint32_t index = 0; index < childActors.Length(); index++) {
       childActors[index]->BeginShutdown();
     }
 
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -1492,19 +1492,19 @@ DoCommandCallback(mozilla::Command aComm
 {
   static_cast<InfallibleTArray<mozilla::CommandInt>*>(aData)->AppendElement(aCommand);
 }
 
 bool
 TabParent::RecvRequestNativeKeyBindings(const WidgetKeyboardEvent& aEvent,
                                         MaybeNativeKeyBinding* aBindings)
 {
-  AutoInfallibleTArray<mozilla::CommandInt, 4> singleLine;
-  AutoInfallibleTArray<mozilla::CommandInt, 4> multiLine;
-  AutoInfallibleTArray<mozilla::CommandInt, 4> richText;
+  AutoTArray<mozilla::CommandInt, 4> singleLine;
+  AutoTArray<mozilla::CommandInt, 4> multiLine;
+  AutoTArray<mozilla::CommandInt, 4> richText;
 
   *aBindings = mozilla::void_t();
 
   nsCOMPtr<nsIWidget> widget = GetWidget();
   if (!widget) {
     return true;
   }
 
@@ -1706,19 +1706,19 @@ bool TabParent::SendRealKeyEvent(WidgetK
   }
   event.refPoint += GetChildProcessOffset();
 
   MaybeNativeKeyBinding bindings;
   bindings = void_t();
   if (event.mMessage == eKeyPress) {
     nsCOMPtr<nsIWidget> widget = GetWidget();
 
-    AutoInfallibleTArray<mozilla::CommandInt, 4> singleLine;
-    AutoInfallibleTArray<mozilla::CommandInt, 4> multiLine;
-    AutoInfallibleTArray<mozilla::CommandInt, 4> richText;
+    AutoTArray<mozilla::CommandInt, 4> singleLine;
+    AutoTArray<mozilla::CommandInt, 4> multiLine;
+    AutoTArray<mozilla::CommandInt, 4> richText;
 
     widget->ExecuteNativeKeyBinding(nsIWidget::NativeKeyBindingsForSingleLineEditor,
                                     event, DoCommandCallback, &singleLine);
     widget->ExecuteNativeKeyBinding(nsIWidget::NativeKeyBindingsForMultiLineEditor,
                                     event, DoCommandCallback, &multiLine);
     widget->ExecuteNativeKeyBinding(nsIWidget::NativeKeyBindingsForRichTextEditor,
                                     event, DoCommandCallback, &richText);
 
--- a/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
+++ b/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
@@ -39,17 +39,17 @@ GetAllSpeechSynthActors(InfallibleTArray
   AutoTArray<mozilla::dom::ContentParent*, 20> contentActors;
   mozilla::dom::ContentParent::GetAll(contentActors);
 
   for (uint32_t contentIndex = 0;
        contentIndex < contentActors.Length();
        ++contentIndex) {
     MOZ_ASSERT(contentActors[contentIndex]);
 
-    AutoInfallibleTArray<mozilla::dom::PSpeechSynthesisParent*, 5> speechsynthActors;
+    AutoTArray<mozilla::dom::PSpeechSynthesisParent*, 5> speechsynthActors;
     contentActors[contentIndex]->ManagedPSpeechSynthesisParent(speechsynthActors);
 
     for (uint32_t speechsynthIndex = 0;
          speechsynthIndex < speechsynthActors.Length();
          ++speechsynthIndex) {
       MOZ_ASSERT(speechsynthActors[speechsynthIndex]);
 
       mozilla::dom::SpeechSynthesisParent* actor =
--- a/dom/plugins/ipc/PluginScriptableObjectChild.cpp
+++ b/dom/plugins/ipc/PluginScriptableObjectChild.cpp
@@ -431,17 +431,17 @@ PluginScriptableObjectChild::ScriptableE
     NS_WARNING("Calling method on an invalidated object!");
     return false;
   }
 
   ProtectedActor<PluginScriptableObjectChild> actor(object->parent);
   NS_ASSERTION(actor, "This shouldn't ever be null!");
   NS_ASSERTION(actor->Type() == Proxy, "Bad type!");
 
-  AutoInfallibleTArray<PluginIdentifier, 10> identifiers;
+  AutoTArray<PluginIdentifier, 10> identifiers;
   bool success;
   actor->CallEnumerate(&identifiers, &success);
 
   if (!success) {
     return false;
   }
 
   *aCount = identifiers.Length();
--- a/dom/plugins/ipc/PluginScriptableObjectParent.cpp
+++ b/dom/plugins/ipc/PluginScriptableObjectParent.cpp
@@ -480,17 +480,17 @@ PluginScriptableObjectParent::Scriptable
   NS_ASSERTION(actor->Type() == Proxy, "Bad type!");
 
   const NPNetscapeFuncs* npn = GetNetscapeFuncs(aObject);
   if (!npn) {
     NS_ERROR("No netscape funcs!");
     return false;
   }
 
-  AutoInfallibleTArray<PluginIdentifier, 10> identifiers;
+  AutoTArray<PluginIdentifier, 10> identifiers;
   bool success;
   if (!actor->CallEnumerate(&identifiers, &success)) {
     NS_WARNING("Failed to send message!");
     return false;
   }
 
   if (!success) {
     return false;
--- a/dom/xslt/xslt/txExecutionState.h
+++ b/dom/xslt/xslt/txExecutionState.h
@@ -145,17 +145,17 @@ private:
     txStack mResultHandlerStack;
     txStack mParamStack;
     txInstruction* mNextInstruction;
     txVariableMap* mLocalVariables;
     txVariableMap mGlobalVariableValues;
     RefPtr<txAExprResult> mGlobalVarPlaceholderValue;
     int32_t mRecursionDepth;
 
-    AutoInfallibleTArray<TemplateRule, 10> mTemplateRules;
+    AutoTArray<TemplateRule, 10> mTemplateRules;
 
     txIEvalContext* mEvalContext;
     txIEvalContext* mInitialEvalContext;
     //Document* mRTFDocument;
     txOwningExpandedNameMap<txIGlobalParameter>* mGlobalParams;
 
     nsCOMPtr<nsIDocument> mLoadingDocument;
     txLoadedDocumentsHash mLoadedDocuments;
--- a/gfx/layers/client/ClientLayerManager.cpp
+++ b/gfx/layers/client/ClientLayerManager.cpp
@@ -21,17 +21,17 @@
 #include "mozilla/layers/PLayerChild.h"  // for PLayerChild
 #include "mozilla/layers/LayerTransactionChild.h"
 #include "mozilla/layers/ShadowLayerChild.h"
 #include "mozilla/layers/TextureClientPool.h" // for TextureClientPool
 #include "mozilla/layers/PersistentBufferProvider.h"
 #include "ClientReadbackLayer.h"        // for ClientReadbackLayer
 #include "nsAString.h"
 #include "nsIWidgetListener.h"
-#include "nsTArray.h"                   // for AutoInfallibleTArray
+#include "nsTArray.h"                   // for AutoTArray
 #include "nsXULAppAPI.h"                // for XRE_GetProcessType, etc
 #include "TiledLayerBuffer.h"
 #include "mozilla/dom/WindowBinding.h"  // for Overfill Callback
 #include "FrameLayerBuilder.h"          // for FrameLayerbuilder
 #ifdef MOZ_WIDGET_ANDROID
 #include "AndroidBridge.h"
 #include "LayerMetricsWrapper.h"
 #endif
@@ -598,17 +598,17 @@ ClientLayerManager::ForwardTransaction(b
   if (!mTransactionIdAllocator->GetTransactionStart().IsNull()) {
     transactionStart = mTransactionIdAllocator->GetTransactionStart();
   } else {
     transactionStart = mTransactionStart;
   }
 
   // forward this transaction's changeset to our LayerManagerComposite
   bool sent;
-  AutoInfallibleTArray<EditReply, 10> replies;
+  AutoTArray<EditReply, 10> replies;
   if (mForwarder->EndTransaction(&replies, mRegionToClear,
         mLatestTransactionId, aScheduleComposite, mPaintSequenceNumber,
         mIsRepeatTransaction, transactionStart, &sent)) {
     for (nsTArray<EditReply>::size_type i = 0; i < replies.Length(); ++i) {
       const EditReply& reply = replies[i];
 
       switch (reply.type()) {
       case EditReply::TOpContentBufferSwap: {
--- a/gfx/layers/ipc/ImageBridgeChild.cpp
+++ b/gfx/layers/ipc/ImageBridgeChild.cpp
@@ -31,17 +31,17 @@
 #include "mozilla/layers/LayersMessages.h"  // for CompositableOperation
 #include "mozilla/layers/PCompositableChild.h"  // for PCompositableChild
 #include "mozilla/layers/PImageContainerChild.h"
 #include "mozilla/layers/TextureClient.h"  // for TextureClient
 #include "mozilla/mozalloc.h"           // for operator new, etc
 #include "nsAutoPtr.h"                  // for nsRefPtr
 #include "nsISupportsImpl.h"            // for ImageContainer::AddRef, etc
 #include "nsTArray.h"                   // for AutoTArray, nsTArray, etc
-#include "nsTArrayForwardDeclare.h"     // for AutoInfallibleTArray
+#include "nsTArrayForwardDeclare.h"     // for AutoTArray
 #include "nsThreadUtils.h"              // for NS_IsMainThread
 #include "nsXULAppAPI.h"                // for XRE_GetIOMessageLoop
 #include "mozilla/StaticPtr.h"          // for StaticRefPtr
 #include "mozilla/layers/TextureClient.h"
 
 namespace mozilla {
 namespace ipc {
 class Shmem;
@@ -649,27 +649,27 @@ ImageBridgeChild::EndTransaction()
   MOZ_ASSERT(!mTxn->Finished(), "forgot BeginTransaction?");
 
   AutoEndTransaction _(mTxn);
 
   if (mTxn->IsEmpty()) {
     return;
   }
 
-  AutoInfallibleTArray<CompositableOperation, 10> cset;
+  AutoTArray<CompositableOperation, 10> cset;
   cset.SetCapacity(mTxn->mOperations.size());
   if (!mTxn->mOperations.empty()) {
     cset.AppendElements(&mTxn->mOperations.front(), mTxn->mOperations.size());
   }
 
   if (!IsSameProcess()) {
     ShadowLayerForwarder::PlatformSyncBeforeUpdate();
   }
 
-  AutoInfallibleTArray<EditReply, 10> replies;
+  AutoTArray<EditReply, 10> replies;
 
   if (mTxn->mSwapRequired) {
     if (!SendUpdate(cset, mTxn->mDestroyedActors, &replies)) {
       NS_WARNING("could not send async texture transaction");
       mTxn->FallbackDestroyActors();
       return;
     }
   } else {
--- a/gfx/layers/ipc/ShadowLayers.cpp
+++ b/gfx/layers/ipc/ShadowLayers.cpp
@@ -663,17 +663,17 @@ ShadowLayerForwarder::EndTransaction(Inf
     attrs.specific() = null_t();
     mutant->FillSpecificAttributes(attrs.specific());
 
     MOZ_LAYERS_LOG(("[LayersForwarder] OpSetLayerAttributes(%p)\n", mutant));
 
     mTxn->AddEdit(OpSetLayerAttributes(nullptr, Shadow(shadow), attrs));
   }
 
-  AutoInfallibleTArray<Edit, 10> cset;
+  AutoTArray<Edit, 10> cset;
   size_t nCsets = mTxn->mCset.size() + mTxn->mPaints.size();
   MOZ_ASSERT(nCsets > 0 || mTxn->RotationChanged(), "should have bailed by now");
 
   cset.SetCapacity(nCsets);
   if (!mTxn->mCset.empty()) {
     cset.AppendElements(&mTxn->mCset.front(), mTxn->mCset.size());
   }
   // Paints after non-paint ops, including attribute changes.  See
--- a/hal/WindowIdentifier.h
+++ b/hal/WindowIdentifier.h
@@ -95,17 +95,17 @@ public:
   nsPIDOMWindowInner* GetWindow() const;
 
 private:
   /**
    * Get the ID of the window object we wrap.
    */
   uint64_t GetWindowID() const;
 
-  AutoInfallibleTArray<uint64_t, 3> mID;
+  AutoTArray<uint64_t, 3> mID;
   nsCOMPtr<nsPIDOMWindowInner> mWindow;
   bool mIsEmpty;
 };
 
 } // namespace hal
 } // namespace mozilla
 
 #endif // mozilla_hal_WindowIdentifier_h
--- a/hal/sandbox/SandboxHal.cpp
+++ b/hal/sandbox/SandboxHal.cpp
@@ -45,17 +45,17 @@ Hal()
   return sHal;
 }
 
 void
 Vibrate(const nsTArray<uint32_t>& pattern, const WindowIdentifier &id)
 {
   HAL_LOG("Vibrate: Sending to parent process.");
 
-  AutoInfallibleTArray<uint32_t, 8> p(pattern);
+  AutoTArray<uint32_t, 8> p(pattern);
 
   WindowIdentifier newID(id);
   newID.AppendProcessID();
   Hal()->SendVibrate(p, newID.AsArray(), TabChild::GetFrom(newID.GetWindow()));
 }
 
 void
 CancelVibrate(const WindowIdentifier &id)
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -2880,17 +2880,17 @@ private:
     friend bool xpc::PushNullJSContext();
     friend void xpc::PopNullJSContext();
 
     // We make these private so that stack manipulation can only happen
     // through one of the above friends.
     JSContext* Pop();
     bool Push(JSContext* cx);
 
-    AutoInfallibleTArray<XPCJSContextInfo, 16> mStack;
+    AutoTArray<XPCJSContextInfo, 16> mStack;
     XPCJSRuntime* mRuntime;
     JSContext*  mSafeJSContext;
 };
 
 /***************************************************************************/
 // 'Components' object implementations. nsXPCComponentsBase has the
 // less-privileged stuff that we're willing to expose to XBL.
 
--- a/layout/generic/nsFontInflationData.cpp
+++ b/layout/generic/nsFontInflationData.cpp
@@ -127,17 +127,17 @@ static nscoord
 ComputeDescendantISize(const nsHTMLReflowState& aAncestorReflowState,
                        nsIFrame *aDescendantFrame)
 {
   nsIFrame *ancestorFrame = aAncestorReflowState.frame->FirstInFlow();
   if (aDescendantFrame == ancestorFrame) {
     return aAncestorReflowState.ComputedISize();
   }
 
-  AutoInfallibleTArray<nsIFrame*, 16> frames;
+  AutoTArray<nsIFrame*, 16> frames;
   for (nsIFrame *f = aDescendantFrame; f != ancestorFrame;
        f = f->GetParent()->FirstInFlow()) {
     frames.AppendElement(f);
   }
 
   // This ignores the inline-size contributions made by scrollbars, though in
   // reality we don't have any scrollbars on the sorts of devices on
   // which we use font inflation, so it's not a problem.  But it may
--- a/layout/style/nsAnimationManager.cpp
+++ b/layout/style/nsAnimationManager.cpp
@@ -624,17 +624,17 @@ nsAnimationManager::BuildAnimations(nsSt
 
     // While current drafts of css3-animations say that later keyframes
     // with the same key entirely replace earlier ones (no cascading),
     // this is a bad idea and contradictory to the rest of CSS.  So
     // we're going to keep all the keyframes for each key and then do
     // the replacement on a per-property basis rather than a per-rule
     // basis, just like everything else in CSS.
 
-    AutoInfallibleTArray<KeyframeData, 16> sortedKeyframes;
+    AutoTArray<KeyframeData, 16> sortedKeyframes;
 
     for (uint32_t ruleIdx = 0, ruleEnd = rule->StyleRuleCount();
          ruleIdx != ruleEnd; ++ruleIdx) {
       css::Rule* cssRule = rule->GetStyleRuleAt(ruleIdx);
       MOZ_ASSERT(cssRule, "must have rule");
       MOZ_ASSERT(cssRule->GetType() == css::Rule::KEYFRAME_RULE,
                  "must be keyframe rule");
       nsCSSKeyframeRule *kfRule = static_cast<nsCSSKeyframeRule*>(cssRule);
@@ -685,17 +685,17 @@ nsAnimationManager::BuildAnimations(nsSt
           nsCSSProps::kAnimTypeTable[prop] == eStyleAnimType_None) {
         continue;
       }
 
       // Build a list of the keyframes to use for this property.  This
       // means we need every keyframe with the property in it, except
       // for those keyframes where a later keyframe with the *same key*
       // also has the property.
-      AutoInfallibleTArray<uint32_t, 16> keyframesWithProperty;
+      AutoTArray<uint32_t, 16> keyframesWithProperty;
       float lastKey = 100.0f; // an invalid key
       for (uint32_t kfIdx = 0, kfEnd = sortedKeyframes.Length();
            kfIdx != kfEnd; ++kfIdx) {
         KeyframeData &kf = sortedKeyframes[kfIdx];
         if (!kf.mRule->Declaration()->HasProperty(prop)) {
           continue;
         }
         if (kf.mKey == lastKey) {
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -15157,17 +15157,17 @@ CSSParserImpl::ParseFunction(nsCSSKeywor
   /* Read in a list of values as an array, failing if we can't or if
    * it's out of bounds.
    *
    * We reserve 16 entries in the foundValues array in order to avoid
    * having to resize the array dynamically when parsing some well-formed
    * functions.  The number 16 is coming from the number of arguments that
    * matrix3d() accepts.
    */
-  AutoInfallibleTArray<nsCSSValue, 16> foundValues;
+  AutoTArray<nsCSSValue, 16> foundValues;
   if (!ParseFunctionInternals(aAllowedTypes, aAllowedTypesAll, aMinElems,
                               aMaxElems, foundValues)) {
     return false;
   }
 
   /*
    * In case the user has given us more than 2^16 - 2 arguments,
    * we'll truncate them at 2^16 - 2 arguments.