Bug 1174250: Allow the CommitHook to fail without crashing. r=glandium
authorDavid Major <dmajor@mozilla.com>
Tue, 15 Sep 2015 13:53:38 -0400
changeset 295234 408c024f3dc010f61ac698b505f268999448fe8a
parent 295233 5ee49f58051365db87c1fc1a3d1d7b278da21aa2
child 295235 27cdeffa4ae126a34f50413a73fffb66b272b114
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1174250
milestone43.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 1174250: Allow the CommitHook to fail without crashing. r=glandium
memory/build/jemalloc_config.cpp
--- a/memory/build/jemalloc_config.cpp
+++ b/memory/build/jemalloc_config.cpp
@@ -116,17 +116,17 @@ private:
   static bool
   CommitHook(void* chunk, size_t size, size_t offset, size_t length,
              unsigned arena_ind)
   {
     void* addr = reinterpret_cast<void*>(
       reinterpret_cast<uintptr_t>(chunk) + static_cast<uintptr_t>(offset));
 
     if (!VirtualAlloc(addr, length, MEM_COMMIT, PAGE_READWRITE))
-      MOZ_CRASH();
+      return true;
 
     return false;
   }
 
   static bool
   DecommitHook(void* chunk, size_t size, size_t offset, size_t length,
                unsigned arena_ind)
   {