Bug 1590907 - Remove obsolete macro JS_OOM_DO_BACKTRACES. r=sfink
authorPhilip Chimento <philip.chimento@gmail.com>
Tue, 12 Nov 2019 22:01:06 +0000
changeset 501680 bedd96446c984c7bee5dae402274e0427a42cb98
parent 501679 cee3ca35e416b8de5d6698fabc7d5d8fc21690ac
child 501681 b98e3a2058c06d33994a43e5637009fc910968eb
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1590907
milestone72.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 1590907 - Remove obsolete macro JS_OOM_DO_BACKTRACES. r=sfink This macro isn't defined anywhere and doesn't seem to do anything. It affects the oom-backtraces property of the build configuration object in the testing functions, but since the macro is never defined, it seems to be always set to false anyway, so just hardcode it. Differential Revision: https://phabricator.services.mozilla.com/D51769
js/public/Utility.h
js/src/builtin/TestingFunctions.cpp
--- a/js/public/Utility.h
+++ b/js/public/Utility.h
@@ -13,21 +13,16 @@
 #include "mozilla/Compiler.h"
 #include "mozilla/Move.h"
 #include "mozilla/TemplateLib.h"
 #include "mozilla/UniquePtr.h"
 
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef JS_OOM_DO_BACKTRACES
-#  include <execinfo.h>
-#  include <stdio.h>
-#endif
-
 #include "jstypes.h"
 
 #include "mozmemory.h"
 
 /* The public JS engine namespace. */
 namespace JS {}
 
 /* The mozilla-shared reusable template/utility namespace. */
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -159,16 +159,20 @@ static bool GetBuildConfiguration(JSCont
   if (!JS_SetProperty(cx, info, "incremental-gc", TrueHandleValue)) {
     return false;
   }
 
   if (!JS_SetProperty(cx, info, "generational-gc", TrueHandleValue)) {
     return false;
   }
 
+  if (!JS_SetProperty(cx, info, "oom-backtraces", FalseHandleValue)) {
+    return false;
+  }
+
   RootedValue value(cx);
 #ifdef DEBUG
   value = BooleanValue(true);
 #else
   value = BooleanValue(false);
 #endif
   if (!JS_SetProperty(cx, info, "debug", value)) {
     return false;
@@ -376,25 +380,16 @@ static bool GetBuildConfiguration(JSCont
   value = BooleanValue(true);
 #else
   value = BooleanValue(false);
 #endif
   if (!JS_SetProperty(cx, info, "valgrind", value)) {
     return false;
   }
 
-#ifdef JS_OOM_DO_BACKTRACES
-  value = BooleanValue(true);
-#else
-  value = BooleanValue(false);
-#endif
-  if (!JS_SetProperty(cx, info, "oom-backtraces", value)) {
-    return false;
-  }
-
 #ifdef ENABLE_TYPED_OBJECTS
   value = BooleanValue(true);
 #else
   value = BooleanValue(false);
 #endif
   if (!JS_SetProperty(cx, info, "typed-objects", value)) {
     return false;
   }