Bug 899385 - Update comments that incorrectly state nsIPresShell::AllocateBlah are fallible. r=dbaron
authorCameron McCormack <cam@mcc.id.au>
Wed, 31 Jul 2013 10:52:32 +1000
changeset 152962 627c3d68be294e6ac78eb8921c5ddd8459c7ef4a
parent 152961 0261e813781884897755fe22658de54b3c60e64d
child 152963 3d58bd987452d0158d89ea58a437717842f33444
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs899385
milestone25.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 899385 - Update comments that incorrectly state nsIPresShell::AllocateBlah are fallible. r=dbaron
layout/base/nsIPresShell.h
--- a/layout/base/nsIPresShell.h
+++ b/layout/base/nsIPresShell.h
@@ -202,17 +202,17 @@ public:
    */
   virtual NS_HIDDEN_(void) MakeZombie() = 0;
 
   /**
    * All frames owned by the shell are allocated from an arena.  They
    * are also recycled using free lists.  Separate free lists are
    * maintained for each frame type (aID), which must always correspond
    * to the same aSize value.  AllocateFrame returns zero-filled memory.
-   * AllocateFrame is fallible, it returns nullptr on out-of-memory.
+   * AllocateFrame is infallible and will abort on out-of-memory.
    */
   void* AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize)
   {
 #ifdef DEBUG
     mPresArenaAllocCount++;
 #endif
     void* result = mFrameArena.AllocateByFrameID(aID, aSize);
     memset(result, 0, aSize);
@@ -227,17 +227,17 @@ public:
     if (!mIsDestroying)
       mFrameArena.FreeByFrameID(aID, aPtr);
   }
 
   /**
    * This is for allocating other types of objects (not frames).  Separate free
    * lists are maintained for each type (aID), which must always correspond to
    * the same aSize value.  AllocateByObjectID returns zero-filled memory.
-   * AllocateByObjectID is fallible, it returns nullptr on out-of-memory.
+   * AllocateByObjectID is infallible and will abort on out-of-memory.
    */
   void* AllocateByObjectID(nsPresArena::ObjectID aID, size_t aSize)
   {
 #ifdef DEBUG
     mPresArenaAllocCount++;
 #endif
     void* result = mFrameArena.AllocateByObjectID(aID, aSize);
     memset(result, 0, aSize);
@@ -253,17 +253,17 @@ public:
       mFrameArena.FreeByObjectID(aID, aPtr);
   }
 
   /**
    * Other objects closely related to the frame tree that are allocated
    * from a separate set of per-size free lists.  Note that different types
    * of objects that has the same size are allocated from the same list.
    * AllocateMisc does *not* clear the memory that it returns.
-   * AllocateMisc is fallible, it returns nullptr on out-of-memory.
+   * AllocateMisc is infallible and will abort on out-of-memory.
    *
    * @deprecated use AllocateByObjectID/FreeByObjectID instead
    */
   void* AllocateMisc(size_t aSize)
   {
 #ifdef DEBUG
     mPresArenaAllocCount++;
 #endif