Bug 1295192 - part 3 - remove CPP_THROW_NEW from display list code; r=dholbert
authorNathan Froyd <froydnj@gmail.com>
Wed, 17 Aug 2016 15:28:45 -0400
changeset 309859 ded99645e6dffa489eab7360bf536bf88220f5eb
parent 309858 03b66848f748859939710a1ed1aeab51a3625950
child 309860 6ebd9f34c08ea7bfbf89a25dd7fa639f96d38302
push id20333
push userkwierso@gmail.com
push dateThu, 18 Aug 2016 00:26:40 +0000
treeherderfx-team@11c94ec980d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1295192
milestone51.0a1
Bug 1295192 - part 3 - remove CPP_THROW_NEW from display list code; r=dholbert nsDisplayListBuilder::Allocate is infallible. Therefore, nsDisplayListItem::operator new, which calls Allocate to obtain memory, does not need to declare itself as throwing. And so on for functions that call nsDisplayListBuilder::Allocate.
layout/base/nsDisplayList.cpp
layout/base/nsDisplayList.h
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -104,17 +104,17 @@ SpammyLayoutWarningsEnabled()
     sValueInitialized = true;
   }
 
   return sValue;
 }
 #endif
 
 void*
-AnimatedGeometryRoot::operator new(size_t aSize, nsDisplayListBuilder* aBuilder) CPP_THROW_NEW
+AnimatedGeometryRoot::operator new(size_t aSize, nsDisplayListBuilder* aBuilder)
 {
   return aBuilder->Allocate(aSize);
 }
 
 static inline CSSAngle
 MakeCSSAngle(const nsCSSValue& aValue)
 {
   return CSSAngle(aValue.GetAngleValue(), aValue.GetUnit());
--- a/layout/base/nsDisplayList.h
+++ b/layout/base/nsDisplayList.h
@@ -139,17 +139,17 @@ struct AnimatedGeometryRoot
     , mParentAGR(aParent)
   {}
 
   operator nsIFrame*() { return mFrame; }
 
   nsIFrame* operator ->() const { return mFrame; }
 
   void* operator new(size_t aSize,
-                     nsDisplayListBuilder* aBuilder) CPP_THROW_NEW;
+                     nsDisplayListBuilder* aBuilder);
 
   nsIFrame* mFrame;
   AnimatedGeometryRoot* mParentAGR;
 };
 
 enum class nsDisplayListBuilderMode : uint8_t {
   PAINTING,
   EVENT_DELIVERY,
@@ -1352,17 +1352,17 @@ public:
 #ifdef MOZ_DUMP_PAINTING
     , mPainted(false)
 #endif
   {
   }
   virtual ~nsDisplayItem() {}
 
   void* operator new(size_t aSize,
-                     nsDisplayListBuilder* aBuilder) CPP_THROW_NEW {
+                     nsDisplayListBuilder* aBuilder) {
     return aBuilder->Allocate(aSize);
   }
 
 // Contains all the type integers for each display list item type
 #include "nsDisplayItemTypes.h"
 
   struct HitTestState {
     explicit HitTestState() : mInPreserves3D(false) {}