Backed out changeset 2d1fe68319cc (bug 916580) for bustage. a=backout
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 17 Oct 2013 12:40:57 -0400
changeset 119950 e58ba4276d7ba111c70973302e7cb29719a0ed4f
parent 119949 bb1ba0f59b3143d8b8b5b9279d08a1867d8c8849
child 119951 7fedb6a967eabeafc58fff4efcdff624a9af77ef
push id1089
push userryanvm@gmail.com
push dateThu, 17 Oct 2013 16:40:54 +0000
reviewersbackout
bugs916580
milestone18.1
backs out2d1fe68319ccfcf27018a0e134c6af0eb6ae24c4
Backed out changeset 2d1fe68319cc (bug 916580) for bustage. a=backout
js/jsd/jsd_lock.cpp
js/public/Utility.h
js/src/jsutil.cpp
--- a/js/jsd/jsd_lock.cpp
+++ b/js/jsd/jsd_lock.cpp
@@ -79,17 +79,17 @@ void ASSERT_VALID_LOCK(JSDStaticLock* lo
 #define ASSERT_VALID_LOCK(x) ((void)0)
 #endif
 
 JSDStaticLock*
 jsd_CreateLock()
 {
     JSDStaticLock* lock;
 
-    if( ! (lock = js_pod_calloc<JSDStaticLock>()) ||
+    if( ! (lock = js_pod_calloc<JSDStaticLock>(1)) ||
         ! (lock->lock = PR_NewLock()) )
     {
         if(lock)
         {
             free(lock);
             lock = NULL;
         }
     }
--- a/js/public/Utility.h
+++ b/js/public/Utility.h
@@ -154,22 +154,16 @@ static JS_INLINE void* js_malloc(size_t 
 }
 
 static JS_INLINE void* js_calloc(size_t bytes)
 {
     JS_OOM_POSSIBLY_FAIL();
     return calloc(bytes, 1);
 }
 
-static JS_INLINE void* js_calloc(size_t nmemb, size_t size)
-{
-    JS_OOM_POSSIBLY_FAIL();
-    return calloc(nmemb, size);
-}
-
 static JS_INLINE void* js_realloc(void* p, size_t bytes)
 {
     JS_OOM_POSSIBLY_FAIL();
     return realloc(p, bytes);
 }
 
 static JS_INLINE void js_free(void* p)
 {
--- a/js/src/jsutil.cpp
+++ b/js/src/jsutil.cpp
@@ -28,17 +28,17 @@
 #endif
 
 using namespace js;
 
 #if USE_ZLIB
 static void *
 zlib_alloc(void *cx, uInt items, uInt size)
 {
-    return js_calloc(items, size);
+    return js_malloc(items * size);
 }
 
 static void
 zlib_free(void *cx, void *addr)
 {
     js_free(addr);
 }