Bug 1294242 - Don't assert that errno hasn't been set; r=terrence
authorNick Fitzgerald <fitzgen@gmail.com>
Thu, 08 Sep 2016 17:21:44 -0700
changeset 354649 7463c762e71934161e585d3a41237c604f688adb
parent 354648 8a994ee68b54d73bb9b5a574ec32f8e87c323689
child 354650 31fe1120ff9ab9c7290c07d671a463b50c65f364
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs1294242
milestone51.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 1294242 - Don't assert that errno hasn't been set; r=terrence In general, tons of code in mozilla-central doesn't check and/or unset errno, so we can't rely on it being unset here.
js/src/threading/posix/Mutex.cpp
--- a/js/src/threading/posix/Mutex.cpp
+++ b/js/src/threading/posix/Mutex.cpp
@@ -12,17 +12,16 @@
 
 #include "threading/Mutex.h"
 #include "threading/posix/MutexPlatformData.h"
 
 #define TRY_CALL_PTHREADS(call, msg)            \
   {                                             \
     int result = (call);                        \
     if (result != 0) {                          \
-      MOZ_ASSERT(!errno);                       \
       errno = result;                           \
       perror(msg);                              \
       MOZ_CRASH(msg);                           \
     }                                           \
   }
 
 js::Mutex::Mutex()
 {