Bug 1031529 part 3 - Step defining JS_THREADSAFE, remove --disable-threadsafe. r=glandium
authorJan de Mooij <jdemooij@mozilla.com>
Thu, 24 Jul 2014 11:56:45 +0200
changeset 195998 6426fef52f51d751b6adb80053f6bebbc9cc67d4
parent 195997 a0dd5a83ba367e022caa857e7c76de66bf2e9d5e
child 195999 e8558ecd9b16ac5f07b35cbe8c94f73eb478020b
push idunknown
push userunknown
push dateunknown
reviewersglandium
bugs1031529
milestone34.0a1
Bug 1031529 part 3 - Step defining JS_THREADSAFE, remove --disable-threadsafe. r=glandium
build/autoconf/nspr-build.m4
js/src/configure.in
js/src/moz.build
js/xpconnect/loader/moz.build
js/xpconnect/shell/moz.build
js/xpconnect/src/moz.build
xulrunner/installer/mozilla-js.pc.in
--- a/build/autoconf/nspr-build.m4
+++ b/build/autoconf/nspr-build.m4
@@ -46,26 +46,22 @@ MOZ_ARG_WITH_BOOL(system-nspr,
 [  --with-system-nspr      Use an NSPR that is already built and installed.
                           Use the 'nspr-config' script in the current path,
                           or look for the script in the directories given with
                           --with-nspr-exec-prefix or --with-nspr-prefix.
                           (Those flags are only checked if you specify
                           --with-system-nspr.)],
     _USE_SYSTEM_NSPR=1 )
 
-if test -z "$BUILDING_JS"; then
-    JS_THREADSAFE=1
-fi
-
 JS_POSIX_NSPR=unset
 ifdef([CONFIGURING_JS],[
     if test -n "$JS_STANDALONE"; then
       case "$target" in
         *linux*|*darwin*|*dragonfly*|*freebsd*|*netbsd*|*openbsd*)
-          if test -z "$_HAS_NSPR" && test "$JS_THREADSAFE"; then
+          if test -z "$_HAS_NSPR"; then
             JS_POSIX_NSPR_DEFAULT=1
           fi
           ;;
       esac
     fi
 
     MOZ_ARG_ENABLE_BOOL(posix-nspr-emulation,
 [  --enable-posix-nspr-emulation
@@ -105,26 +101,22 @@ fi
 if test -z "$nspr_opts"; then
     if test -z "$BUILDING_JS"; then
       dnl Toplevel configure defaults to using nsprpub from the source tree
       MOZ_BUILD_NSPR=1
       which_nspr="source-tree"
     else
       dnl JS configure defaults to emulated NSPR if available, falling back
       dnl to nsprpub.
-      if test -n "$JS_THREADSAFE"; then
-          JS_POSIX_NSPR="$JS_POSIX_NSPR_DEFAULT"
-          if test -z "$JS_POSIX_NSPR"; then
-             MOZ_BUILD_NSPR=1
-             which_nspr="source-tree"
-          else
-             which_nspr="posix-wrapper"
-          fi
+      JS_POSIX_NSPR="$JS_POSIX_NSPR_DEFAULT"
+      if test -z "$JS_POSIX_NSPR"; then
+        MOZ_BUILD_NSPR=1
+        which_nspr="source-tree"
       else
-          which_nspr="none"
+        which_nspr="posix-wrapper"
       fi
    fi
 fi
 
 if test -z "$nspr_opts" || test "$nspr_opts" = x; then
     AC_MSG_RESULT($which_nspr)
 else
     AC_MSG_ERROR([only one way of using NSPR may be selected. See 'configure --help'.])
@@ -159,17 +151,17 @@ if test -n "$MOZ_NATIVE_NSPR" -o -n "$NS
                 AC_MSG_ERROR([system NSPR does not support PR_STATIC_ASSERT or including prtypes.h does not provide it]))
     AC_TRY_COMPILE([#include "prtypes.h"],
                 [#ifndef PR_UINT64
                  #error PR_UINT64 not defined or requires including prtypes.h
                  #endif],
                 ,
                 AC_MSG_ERROR([system NSPR does not support PR_UINT64 or including prtypes.h does not provide it]))
     CFLAGS=$_SAVE_CFLAGS
-elif test -z "$JS_POSIX_NSPR" -a -n "$JS_THREADSAFE"; then
+elif test -z "$JS_POSIX_NSPR"; then
     if test -z "$LIBXUL_SDK"; then
         NSPR_CFLAGS="-I${LIBXUL_DIST}/include/nspr"
         if test -n "$GNU_CC"; then
             NSPR_LIBS="-L${LIBXUL_DIST}/lib -lnspr${NSPR_VERSION} -lplc${NSPR_VERSION} -lplds${NSPR_VERSION}"
         else
             NSPR_LIBS="${LIBXUL_DIST}/lib/nspr${NSPR_VERSION}.lib ${LIBXUL_DIST}/lib/plc${NSPR_VERSION}.lib ${LIBXUL_DIST}/lib/plds${NSPR_VERSION}.lib "
         fi
     else
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -2747,27 +2747,16 @@ AC_SUBST(MOZ_DISABLE_UNIFIED_COMPILATION
 
 dnl ========================================================
 dnl =
 dnl = Check for external package dependencies
 dnl =
 dnl ========================================================
 MOZ_ARG_HEADER(External Packages)
 
-JS_THREADSAFE=1
-MOZ_ARG_DISABLE_BOOL(threadsafe,
-[  --disable-threadsafe    Disable support for multiple threads.],
-    JS_THREADSAFE= ,
-    JS_THREADSAFE=1 )
-if test -n "$JS_THREADSAFE"; then
-    AC_DEFINE(JS_THREADSAFE)
-fi
-JS_THREADSAFE_CONFIGURED=$JS_THREADSAFE
-AC_SUBST(JS_THREADSAFE_CONFIGURED)
-
 MOZ_CONFIG_NSPR(js)
 
 dnl ========================================================
 dnl system zlib Support
 dnl ========================================================
 dnl Standalone js defaults to system zlib
 if test -n "$JS_STANDALONE"; then
     ZLIB_DIR=yes
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -448,24 +448,21 @@ if CONFIG['MOZ_ETW']:
     ]
     # This will get the ETW provider resources into the library mozjs.dll
     RESFILE = 'ETWProvider.res'
 
 if CONFIG['NIGHTLY_BUILD']:
     DEFINES['ENABLE_PARALLEL_JS'] = True
     DEFINES['ENABLE_BINARYDATA'] = True
     DEFINES['ENABLE_SHARED_ARRAY_BUFFER'] = True
-    if CONFIG['ENABLE_ION'] and CONFIG['JSGC_GENERATIONAL_CONFIGURED'] and CONFIG['JS_THREADSAFE_CONFIGURED']:
+    if CONFIG['ENABLE_ION'] and CONFIG['JSGC_GENERATIONAL_CONFIGURED']:
         DEFINES['JSGC_FJGENERATIONAL'] = True
 
 DEFINES['EXPORT_JS_API'] = True
 
-if CONFIG['JS_THREADSAFE']:
-    DEFINES['JS_THREADSAFE'] = True
-
 if CONFIG['JS_HAS_CTYPES']:
     DEFINES['JS_HAS_CTYPES'] = True
     for var in ('DLL_PREFIX', 'DLL_SUFFIX'):
         DEFINES[var] = '"%s"' % CONFIG[var]
 
 if CONFIG['MOZ_LINKER']:
     DEFINES['MOZ_LINKER'] = True
 
--- a/js/xpconnect/loader/moz.build
+++ b/js/xpconnect/loader/moz.build
@@ -18,16 +18,14 @@ EXTRA_JS_MODULES += [
 ]
 
 FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 FINAL_LIBRARY = 'xul'
 
-DEFINES['JS_THREADSAFE'] = True
-
 LOCAL_INCLUDES += [
     '../src',
     '../wrappers',
     '/content/base/src',
 ]
 
--- a/js/xpconnect/shell/moz.build
+++ b/js/xpconnect/shell/moz.build
@@ -12,18 +12,16 @@ SOURCES += [
     'xpcshell.cpp',
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     SOURCES += [
         'xpcshellMacUtils.mm',
     ]
 
-DEFINES['JS_THREADSAFE'] = True
-
 if CONFIG['MOZ_SHARK']:
     DEFINES['MOZ_SHARK'] = True
 if CONFIG['MOZ_CALLGRIND']:
     DEFINES['MOZ_CALLGRIND'] = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 LOCAL_INCLUDES += [
--- a/js/xpconnect/src/moz.build
+++ b/js/xpconnect/src/moz.build
@@ -64,18 +64,16 @@ MSVC_ENABLE_PGO = True
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 GENERATED_FILES = [
     'dom_quickstubs.h',
 ]
 
-DEFINES['JS_THREADSAFE'] = True
-
 LOCAL_INCLUDES += [
     '../loader',
     '../wrappers',
     '/caps',
     '/content/base/public',
     '/content/base/src',
     '/content/html/content/src',
     '/content/html/document/src',
--- a/xulrunner/installer/mozilla-js.pc.in
+++ b/xulrunner/installer/mozilla-js.pc.in
@@ -2,9 +2,9 @@ prefix=%prefix%
 sdkdir=%sdkdir%
 includedir=%includedir%
 
 Name: JavaScript
 Description: The Mozilla JavaScript Library
 Version: %MOZILLA_VERSION%
 Requires: %NSPR_NAME% >= %NSPR_VERSION%
 Libs: -L${sdkdir}/lib %MOZ_JS_LINK%
-Cflags: -I${includedir} -DXP_UNIX -DJS_THREADSAFE
+Cflags: -I${includedir} -DXP_UNIX