Bug 748654 - drop patch making us use mozalloc in angle - r=jgilbert
authorBenoit Jacob <bjacob@mozilla.com>
Mon, 30 Apr 2012 17:43:12 -0400
changeset 92762 934967d88037b70612ecceab2bc18481d5498ae2
parent 92761 b16c77b3e8ec62fed092c718b6f47feb4476411b
child 92763 6984143425158aedc921f58ba06d8577a815b16f
push id8858
push userbjacob@mozilla.com
push dateMon, 30 Apr 2012 21:43:24 +0000
treeherdermozilla-inbound@4bb0aa38c2d4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs748654
milestone15.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 748654 - drop patch making us use mozalloc in angle - r=jgilbert
gfx/angle/Makefile.in
gfx/angle/src/compiler/preprocessor/atom.c
gfx/angle/src/libEGL/Makefile.in
gfx/angle/src/libGLESv2/Makefile.in
--- a/gfx/angle/Makefile.in
+++ b/gfx/angle/Makefile.in
@@ -135,18 +135,16 @@ CSRCS   = \
 	$(NULL)
 
 DEFINES += -DANGLE_USE_NSPR -DANGLE_BUILD -DCOMPILER_IMPLEMENTATION
 
 #these defines are from ANGLE's build_angle.gyp
 DEFINES += -DANGLE_DISABLE_TRACE
 DEFINES += -DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL0
 
-EXTRA_DSO_LDOPTS = $(MOZALLOC_LIB)
-
 ifdef MOZ_ANGLE
 
 # libEGL depends on (links against!) libGLESv2!
 DIRS = src/libGLESv2 src/libEGL
 
 libs::
 	expand "$(MOZ_D3DX9_CAB)" -F:$(MOZ_D3DX9_DLL) "$(DIST)/bin"
 	expand "$(MOZ_D3DCOMPILER_CAB)" -F:$(MOZ_D3DCOMPILER_DLL) "$(DIST)/bin"
--- a/gfx/angle/src/compiler/preprocessor/atom.c
+++ b/gfx/angle/src/compiler/preprocessor/atom.c
@@ -48,18 +48,16 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILI
 
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 
 #include "compiler/compilerdebug.h"
 #include "compiler/preprocessor/slglobals.h"
 
-#include "../../../../../memory/mozalloc/mozalloc.h"
-
 #undef malloc
 #undef realloc
 #undef free
 
 ///////////////////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////// String table: //////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -320,23 +318,31 @@ static int AddAtomFixed(AtomTable *atabl
  */
 
 static int GrowAtomTable(AtomTable *atable, int size)
 {
     int *newmap, *newrev;
 
     if (atable->size < size) {
         if (atable->amap) {
-            newmap = moz_xrealloc(atable->amap, sizeof(int)*size);
-            newrev = moz_xrealloc(atable->arev, sizeof(int)*size);
+            newmap = realloc(atable->amap, sizeof(int)*size);
+            newrev = realloc(atable->arev, sizeof(int)*size);
         } else {
-            newmap = moz_xmalloc(sizeof(int)*size);
-            newrev = moz_xmalloc(sizeof(int)*size);
+            newmap = malloc(sizeof(int)*size);
+            newrev = malloc(sizeof(int)*size);
             atable->size = 0;
         }
+        if (!newmap || !newrev) {
+            /* failed to grow -- error */
+            if (newmap)
+                atable->amap = newmap;
+            if (newrev)
+                atable->arev = newrev;
+            return -1;
+        }
         memset(&newmap[atable->size], 0, (size - atable->size) * sizeof(int));
         memset(&newrev[atable->size], 0, (size - atable->size) * sizeof(int));
         atable->amap = newmap;
         atable->arev = newrev;
         atable->size = size;
     }
     return 0;
 } // GrowAtomTable
--- a/gfx/angle/src/libEGL/Makefile.in
+++ b/gfx/angle/src/libEGL/Makefile.in
@@ -161,10 +161,8 @@ RCFILE = $(srcdir)/libEGL.rc
 include $(topsrcdir)/config/rules.mk
 
 EXTRA_DSO_LDOPTS = "$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)/d3d9.lib" \
                    "$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)/dxguid.lib" \
 		   "$(DIST)/lib/libGLESv2.lib" \
 		   dwmapi.lib \
 		   delayimp.lib \
 		   /delayload:dwmapi.dll
-
-EXTRA_DSO_LDOPTS += $(MOZALLOC_LIB)
--- a/gfx/angle/src/libGLESv2/Makefile.in
+++ b/gfx/angle/src/libGLESv2/Makefile.in
@@ -170,10 +170,8 @@ CPPSRCS	+= \
 DEFFILE = $(srcdir)/libGLESv2.def
 RCFILE = $(srcdir)/libGLESv2.rc
 
 include $(topsrcdir)/config/rules.mk
 
 EXTRA_DSO_LDOPTS = "$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)/d3d9.lib" \
                    "$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)/d3dx9.lib" \
 		   "$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)/D3DCompiler.lib"
-
-EXTRA_DSO_LDOPTS += $(MOZALLOC_LIB)