Port bug 1570982 - remove CPP_THROW_NEW. rs=bustage-fix
authorJorg K <jorgk@jorgk.com>
Thu, 15 Aug 2019 00:34:51 +0200
changeset 27325 82fde34332727c5a9e1128299cba660089b72289
parent 27324 f354e2beb4942767856a4018435e44247407e1d2
child 27326 603a94da05d0987849d8a578e90c8ef4035992ad
push id16283
push usermozilla@jorgk.com
push dateWed, 14 Aug 2019 23:02:28 +0000
treeherdercomm-central@82fde3433272 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage-fix
bugs1570982
Port bug 1570982 - remove CPP_THROW_NEW. rs=bustage-fix
db/mork/src/morkDeque.h
db/mork/src/morkFactory.h
db/mork/src/morkHandle.h
db/mork/src/morkNode.h
db/mork/src/morkPool.h
db/mork/src/morkTable.h
rdf/base/nsCompositeDataSource.cpp
--- a/db/mork/src/morkDeque.h
+++ b/db/mork/src/morkDeque.h
@@ -51,17 +51,17 @@ class morkNext /*d*/ {
   morkNext* GetNextLink() const { return mNext_Link; }
 
  public:  // link memory management methods
   static void* MakeNewNext(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev);
   void ZapOldNext(morkEnv* ev, nsIMdbHeap* ioHeap);
 
  public:  // link memory management operators
   void* operator new(size_t inSize, nsIMdbHeap& ioHeap,
-                     morkEnv* ev) CPP_THROW_NEW {
+                     morkEnv* ev) noexcept(true) {
     return morkNext::MakeNewNext(inSize, ioHeap, ev);
   }
 
   void operator delete(void* ioAddress)  // DO NOT CALL THIS, hope to crash:
   {
     ((morkNext*)0)->ZapOldNext((morkEnv*)0, (nsIMdbHeap*)0);
   }  // boom
 };
@@ -148,17 +148,17 @@ class morkLink /*d*/ {
   }
 
  public:  // link memory management methods
   static void* MakeNewLink(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev);
   void ZapOldLink(morkEnv* ev, nsIMdbHeap* ioHeap);
 
  public:  // link memory management operators
   void* operator new(size_t inSize, nsIMdbHeap& ioHeap,
-                     morkEnv* ev) CPP_THROW_NEW {
+                     morkEnv* ev) noexcept(true) {
     return morkLink::MakeNewLink(inSize, ioHeap, ev);
   }
 };
 
 /*=============================================================================
  * morkDeque: doubly linked list modeled after VAX queue instructions
  */
 
--- a/db/mork/src/morkFactory.h
+++ b/db/mork/src/morkFactory.h
@@ -167,22 +167,22 @@ class morkFactory : public morkObject, p
 
  public:          // morkYarn construction & destruction
   morkFactory();  // uses orkinHeap
   explicit morkFactory(nsIMdbHeap* ioHeap);  // caller supplied heap
   morkFactory(morkEnv* ev, const morkUsage& inUsage, nsIMdbHeap* ioHeap);
   void CloseFactory(morkEnv* ev);  // called by CloseMorkNode();
 
  public:  // morkNode memory management operators
-  void* operator new(size_t inSize) CPP_THROW_NEW {
+  void* operator new(size_t inSize) noexcept(true) {
     return ::operator new(inSize);
   }
 
   void* operator new(size_t inSize, nsIMdbHeap& ioHeap,
-                     morkEnv* ev) CPP_THROW_NEW {
+                     morkEnv* ev) noexcept(true) {
     return morkNode::MakeNew(inSize, ioHeap, ev);
   }
 
  private:  // copying is not allowed
   morkFactory(const morkFactory& other);
   morkFactory& operator=(const morkFactory& other);
   virtual ~morkFactory();  // assert that CloseFactory() executed earlier
 
--- a/db/mork/src/morkHandle.h
+++ b/db/mork/src/morkHandle.h
@@ -80,26 +80,26 @@ class morkHandle : public morkNode {
  public:  // dynamic type identification
   mork_bool IsHandle() const {
     return IsNode() && mNode_Derived == morkDerived_kHandle;
   }
   // } ===== end morkNode methods =====
 
  public:  // morkHandle memory management operators
   void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone,
-                     morkEnv* ev) CPP_THROW_NEW {
+                     morkEnv* ev) noexcept(true) {
     return ioPool.NewHandle(ev, inSize, &ioZone);
   }
 
   void* operator new(size_t inSize, morkPool& ioPool,
-                     morkEnv* ev) CPP_THROW_NEW {
+                     morkEnv* ev) noexcept(true) {
     return ioPool.NewHandle(ev, inSize, (morkZone*)0);
   }
 
-  void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW {
+  void* operator new(size_t inSize, morkHandleFace* ioFace) noexcept(true) {
     MORK_USED_1(inSize);
     return ioFace;
   }
 
  public:  // other handle methods
   mork_bool GoodHandleTag() const { return mHandle_Tag == morkHandle_kTag; }
 
   void NewBadMagicHandleError(morkEnv* ev, mork_magic inMagic) const;
--- a/db/mork/src/morkNode.h
+++ b/db/mork/src/morkNode.h
@@ -149,17 +149,17 @@ class morkNode /*: public nsISupports */
 
   void ZapOld(morkEnv* ev, nsIMdbHeap* ioHeap);  // replaces operator delete()
   // this->morkNode::~morkNode(); // first call polymorphic destructor
   // if ( ioHeap ) // was this node heap allocated?
   //    ioHeap->Free(ev->AsMdbEnv(), this);
 
  public:  // morkNode memory management operators
   void* operator new(size_t inSize, nsIMdbHeap& ioHeap,
-                     morkEnv* ev) CPP_THROW_NEW {
+                     morkEnv* ev) noexcept(true) {
     return morkNode::MakeNew(inSize, ioHeap, ev);
   }
 
  protected:  // construction without an anv needed for first env constructed:
   morkNode(const morkUsage& inUsage, nsIMdbHeap* ioHeap);
 
   explicit morkNode(mork_usage inCode);  // usage == inCode, heap == nil
 
--- a/db/mork/src/morkPool.h
+++ b/db/mork/src/morkPool.h
@@ -81,21 +81,21 @@ class morkPool : public morkNode {
   }
   // } ===== end morkNode methods =====
 
  public:  // typing
   void NonPoolTypeError(morkEnv* ev);
 
  public:  // morkNode memory management operators
   void* operator new(size_t inSize, nsIMdbHeap& ioHeap,
-                     morkEnv* ev) CPP_THROW_NEW {
+                     morkEnv* ev) noexcept(true) {
     return morkNode::MakeNew(inSize, ioHeap, ev);
   }
 
-  void* operator new(size_t inSize) CPP_THROW_NEW {
+  void* operator new(size_t inSize) noexcept(true) {
     return ::operator new(inSize);
   }
 
  public:  // other pool methods
   // alloc and free individual instances of handles (inside hand frames):
   morkHandleFace* NewHandle(morkEnv* ev, mork_size inSize, morkZone* ioZone);
   void ZapHandle(morkEnv* ev, morkHandleFace* ioHandle);
 
--- a/db/mork/src/morkTable.h
+++ b/db/mork/src/morkTable.h
@@ -474,17 +474,17 @@ class morkTable : public morkObject, pub
   void SetTableDirty() { this->SetNodeDirty(); }
   void SetTableClean(morkEnv* ev);
 
   mork_bool IsTableClean() const { return this->IsNodeClean(); }
   mork_bool IsTableDirty() const { return this->IsNodeDirty(); }
 
  public:  // morkNode memory management operators
   void* operator new(size_t inSize, nsIMdbHeap& ioHeap,
-                     morkEnv* ev) CPP_THROW_NEW {
+                     morkEnv* ev) noexcept(true) {
     return morkNode::MakeNew(inSize, ioHeap, ev);
   }
 
   // { ===== begin morkNode interface =====
  public:                                             // morkNode virtual methods
   virtual void CloseMorkNode(morkEnv* ev) override;  // CloseTable() if open
 
  public:  // morkTable construction & destruction
--- a/rdf/base/nsCompositeDataSource.cpp
+++ b/rdf/base/nsCompositeDataSource.cpp
@@ -21,17 +21,16 @@
      has a false arc from foo to bar), the data source that it earlier
      in the sequence wins.
 
      The implementation below doesn't really do this and needs to be
      fixed.
 
 */
 
-#include "xpcom-config.h"
 #include "nsCOMPtr.h"
 #include "nsIComponentManager.h"
 #include "nsIRDFCompositeDataSource.h"
 #include "nsIRDFNode.h"
 #include "nsIRDFObserver.h"
 #include "nsIRDFRemoteDataSource.h"
 #include "nsTArray.h"
 #include "nsCOMArray.h"