Bug 1305151 - allow disabling Skia debug assertions via MOZ_SKIA_DISABLE_ASSERTS env-var. r=milan
authorLee Salzman <lsalzman@mozilla.com>
Mon, 26 Sep 2016 11:26:42 -0400
changeset 315308 2c645653db8c1b4c314ac34f6ed16adc80f0b2da
parent 315307 d6cf880cf9ec40e5511808c04098c7c3623ab6fd
child 315309 b0bc3eb907aecc98f6a5d2e9bd02d6535b0a2b00
push id30747
push usercbook@mozilla.com
push dateTue, 27 Sep 2016 09:22:00 +0000
treeherdermozilla-central@66a77b9bfe5d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmilan
bugs1305151
milestone52.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 1305151 - allow disabling Skia debug assertions via MOZ_SKIA_DISABLE_ASSERTS env-var. r=milan MozReview-Commit-ID: DlBiKILV5Jm
gfx/skia/skia/src/ports/SkMemory_mozalloc.cpp
--- a/gfx/skia/skia/src/ports/SkMemory_mozalloc.cpp
+++ b/gfx/skia/skia/src/ports/SkMemory_mozalloc.cpp
@@ -6,18 +6,25 @@
  * found in the LICENSE file.
  */
 
 #include "SkTypes.h"
 
 #include "mozilla/mozalloc.h"
 #include "mozilla/mozalloc_abort.h"
 #include "mozilla/mozalloc_oom.h"
+#include "prenv.h"
 
 void sk_abort_no_print() {
+#ifdef SK_DEBUG
+    const char* env = PR_GetEnv("MOZ_SKIA_DISABLE_ASSERTS");
+    if (env && *env != '0') {
+        return;
+    }
+#endif
     mozalloc_abort("Abort from sk_abort");
 }
 
 void sk_out_of_memory(void) {
     SkDEBUGFAIL("sk_out_of_memory");
     mozalloc_handle_oom(0);
 }