Commit 11a37acb authored by Philip Chimento's avatar Philip Chimento 🚮

core-deps-3.26: Remove mozjs45, build mozjs52

There is no official tarball release of mozjs52 yet, so this builds from
my mirror with my set of downstream patches that are marked for backport
in Mozilla's bugtracker.

GJS will release a mozjs52 version later today.
parent 23d5631a
......@@ -1602,21 +1602,13 @@
</dependencies>
</autotools>
<autotools id="mozjs45" autogen-sh="configure"
autogenargs="--enable-posix-nspr-emulation --with-system-zlib --enable-system-ffi --with-system-icu --with-intl-api">
<pkg-config>mozjs-45.pc</pkg-config>
<branch repo="mozilla2" module="mozjs-45.0.2.tar.bz2"
version="45.0.2" source-subdir="js/src">
<patch file="mozjs45-fix-tracelogger.patch" strip="1"/>
<patch file="mozjs45-build-parallel-installable.patch" strip="1"/>
<patch file="mozjs45-install-name.patch" strip="1"/>
<patch file="mozjs45-copy-headers.patch" strip="1"/>
<patch file="mozjs45-add-bracket.patch" strip="1"/>
<patch file="mozjs45-1269317.patch" strip="1"/>
<patch file="mozjs45-functions-visibility.patch" strip="1"/>
<patch file="mozjs45-1176787-disable-mozglue.patch" strip="1"/>
<patch file="mozjs45-remove-nspr-dep.patch" strip="1"/>
</branch>
<autotools id="mozjs52" autogen-sh="js/src/configure"
autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s %(autogenargs)s"
autogenargs="--enable-posix-nspr-emulation --with-system-zlib --with-system-icu --with-intl-api AUTOCONF=autoconf">
<!-- prefix option must have an = sign in mozilla's configure -->
<pkg-config>mozjs-52.pc</pkg-config>
<branch repo="github.com" module="ptomato/mozjs" revision="mozjs52"
checkoutdir="mozjs52"/>
<dependencies>
<dep package="libffi"/>
<dep package="libicu"/>
......
# HG changeset patch
# User Till Schneidereit <till@tillschneidereit.net>
# Date 1443697149 -7200
# Thu Oct 01 12:59:09 2015 +0200
# Node ID abab858f34206c8281ef6bfd0e046b4c8e70131a
# Parent 3b476e0a4777fc2f0d977e7a9137f3892924ef90
Bug 1176787 - Disable MOZ_GLUE_IN_PROGRAM in stand-alone builds on all platforms. r=glandium
diff --git a/js/src/configure.in b/js/src/configure.in
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -2931,26 +2931,31 @@ MOZ_ARG_DISABLE_BOOL(jemalloc,
dnl Consult the command-line arguments in stand alone-builds only. In
dnl non-stand-alone builds, we always use the value of MOZ_MEMORY inherited from
dnl the top-level configure script.
if test "$JS_STANDALONE"; then
MOZ_MEMORY=$LOCAL_MOZ_MEMORY
fi
-case "${OS_TARGET}" in
-Android|WINNT|Darwin)
+dnl In stand-alone builds we always only want to link executables against mozglue.
+if test "$JS_STANDALONE"; then
MOZ_GLUE_IN_PROGRAM=
- ;;
-*)
- dnl On !Android !Windows !OSX, we only want to link executables against mozglue
- MOZ_GLUE_IN_PROGRAM=1
- AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
- ;;
-esac
+else
+ case "${OS_TARGET}" in
+ Android|WINNT|Darwin)
+ MOZ_GLUE_IN_PROGRAM=
+ ;;
+ *)
+ dnl On !Android !Windows !OSX, we only want to link executables against mozglue
+ MOZ_GLUE_IN_PROGRAM=1
+ AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
+ ;;
+ esac
+fi
if test "$MOZ_MEMORY"; then
AC_DEFINE(MOZ_MEMORY)
if test "x$MOZ_DEBUG" = "x1"; then
AC_DEFINE(MOZ_MEMORY_DEBUG)
fi
dnl The generic feature tests that determine how to compute ncpus are long and
dnl complicated. Therefore, simply define special cpp variables for the
--- a/js/src/configure 2017-03-20 10:01:40.087593115 +0000
+++ b/js/src/configure 2017-03-20 10:03:55.320550817 +0000
@@ -14064,12 +14064,15 @@
MOZ_MEMORY=$LOCAL_MOZ_MEMORY
fi
-case "${OS_TARGET}" in
-Android|WINNT|Darwin)
+if test "$JS_STANDALONE"; then
MOZ_GLUE_IN_PROGRAM=
- ;;
-*)
- MOZ_GLUE_IN_PROGRAM=1
+else
+ case "${OS_TARGET}" in
+ Android|WINNT|Darwin)
+ MOZ_GLUE_IN_PROGRAM=
+ ;;
+ *)
+ MOZ_GLUE_IN_PROGRAM=1
cat >> confdefs.pytmp <<\EOF
(''' MOZ_GLUE_IN_PROGRAM ''', ' 1 ')
EOF
@@ -14077,8 +14080,9 @@
#define MOZ_GLUE_IN_PROGRAM 1
EOF
- ;;
-esac
+ ;;
+ esac
+fi
if test "$MOZ_MEMORY"; then
cat >> confdefs.pytmp <<\EOF
--- a/mozglue/build/moz.build 2017-04-29 18:04:50.000000000 -0700
+++ b/mozglue/build/moz.build 2017-04-29 18:04:57.000000000 -0700
@@ -6,7 +6,7 @@
# Build mozglue as a shared lib on Windows, OSX and Android.
# If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
-if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
+if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') and not CONFIG['JS_STANDALONE']:
SharedLibrary('mozglue')
else:
Library('mozglue')
--- a/js/src/jit/RegisterSets.h 2017-02-10 17:33:06.210702431 -0800
+++ b/js/src/jit/RegisterSets.h 2017-02-10 17:43:52.877514146 -0800
@@ -7,7 +7,6 @@
#ifndef jit_RegisterSets_h
#define jit_RegisterSets_h
-#include "mozilla/Alignment.h"
#include "mozilla/MathAlgorithms.h"
#include "jit/JitAllocPolicy.h"
@@ -26,8 +25,8 @@
Code code_;
public:
- AnyRegister()
- { }
+ AnyRegister() = default;
+
explicit AnyRegister(Register gpr) {
code_ = gpr.code();
}
@@ -156,7 +155,7 @@
}
#endif
- ValueOperand() {}
+ ValueOperand() = default;
};
// Registers to hold either either a typed or untyped value.
@@ -165,46 +164,25 @@
// Type of value being stored.
MIRType type_;
- // Space to hold either an AnyRegister or a ValueOperand.
union U {
- mozilla::AlignedStorage2<AnyRegister> typed;
- mozilla::AlignedStorage2<ValueOperand> value;
+ AnyRegister typed;
+ ValueOperand value;
} data;
- AnyRegister& dataTyped() {
- MOZ_ASSERT(hasTyped());
- return *data.typed.addr();
- }
- ValueOperand& dataValue() {
- MOZ_ASSERT(hasValue());
- return *data.value.addr();
- }
-
- AnyRegister dataTyped() const {
- MOZ_ASSERT(hasTyped());
- return *data.typed.addr();
- }
- const ValueOperand& dataValue() const {
- MOZ_ASSERT(hasValue());
- return *data.value.addr();
- }
-
public:
- TypedOrValueRegister()
- : type_(MIRType_None)
- {}
+ TypedOrValueRegister() = default;
TypedOrValueRegister(MIRType type, AnyRegister reg)
: type_(type)
{
- dataTyped() = reg;
+ data.typed = reg;
}
MOZ_IMPLICIT TypedOrValueRegister(ValueOperand value)
: type_(MIRType_Value)
{
- dataValue() = value;
+ data.value = value;
}
MIRType type() const {
@@ -220,11 +198,13 @@
}
AnyRegister typedReg() const {
- return dataTyped();
+ MOZ_ASSERT(hasTyped());
+ return data.typed;
}
ValueOperand valueReg() const {
- return dataValue();
+ MOZ_ASSERT(hasValue());
+ return data.value;
}
AnyRegister scratchReg() {
@@ -240,19 +220,18 @@
// Whether a constant value is being stored.
bool constant_;
- // Space to hold either a Value or a TypedOrValueRegister.
union U {
- mozilla::AlignedStorage2<Value> constant;
- mozilla::AlignedStorage2<TypedOrValueRegister> reg;
+ Value constant;
+ TypedOrValueRegister reg;
} data;
Value& dataValue() {
MOZ_ASSERT(constant());
- return *data.constant.addr();
+ return data.constant;
}
TypedOrValueRegister& dataReg() {
MOZ_ASSERT(!constant());
- return *data.reg.addr();
+ return data.reg;
}
public:
Add bracket for sed 4.3 compliance
Based on upstream fix by Daniel Stenberg in 09 jan 2017
See: https://hg.mozilla.org/mozilla-central/rev/ebcbf47a83e7
--- a/js/src/configure 2017-02-21 16:56:42.350105741 -0300
+++ b/js/src/configure 2017-02-21 17:33:13.183493978 -0300
@@ -15231,7 +15231,7 @@
fi
fi
- version=`sed -n 's/^[:space:]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"`
+ version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"`
if test x"$version" = x; then
{ echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&2; echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&5; exit 1; }
fi
Fixes the build so that it is parallel installable with other versions of
mozjs. The mozjs-45.pc, js45, and js45-config files need to have "45" in the
name.
FIXME put mozbugzilla link here
--- a/js/src/configure.in 2017-03-17 20:05:07.011058901 -0700
+++ b/js/src/configure.in 2017-03-17 20:05:44.011308025 -0700
@@ -713,16 +713,13 @@
MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"`
IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'`
-dnl XXX in a temporary bid to avoid developer anger at renaming files
-dnl XXX before "js" symlinks exist, don't change names.
-dnl
-dnl if test -n "$JS_STANDALONE"; then
-dnl JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION
-dnl JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config
-dnl else
+if test -n "$JS_STANDALONE"; then
+JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION
+JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config
+else
JS_SHELL_NAME=js
JS_CONFIG_NAME=js-config
-dnl fi
+fi
changequote([,])
if test -n "$IS_ALPHA"; then
--- a/js/src/configure 2017-03-17 20:05:02.147026160 -0700
+++ b/js/src/configure 2017-03-17 20:05:56.119389577 -0700
@@ -6015,8 +6015,13 @@
MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"`
IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'`
+if test -n "$JS_STANDALONE"; then
+JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION
+JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config
+else
JS_SHELL_NAME=js
JS_CONFIG_NAME=js-config
+fi
if test -n "$IS_ALPHA"; then
--- a/js/src/Makefile.in 2017-03-17 20:08:12.608309863 -0700
+++ b/js/src/Makefile.in 2017-03-17 20:09:59.449031469 -0700
@@ -175,10 +175,13 @@
SCRIPTS = $(JS_CONFIG_NAME)
SDK_BINARY = $(JS_CONFIG_NAME)
-$(LIBRARY_NAME).pc: js.pc
+$(JS_CONFIG_NAME): js-config
cp $^ $@
-install:: $(LIBRARY_NAME).pc
+$(JS_LIBRARY_NAME).pc: js.pc
+ cp $^ $@
+
+install:: $(JS_LIBRARY_NAME).pc
$(SYSINSTALL) $^ $(DESTDIR)$(libdir)/pkgconfig
install:: js-config.h
Copies installed files to the install directory, instead of symlinking them.
--- a/python/mozbuild/mozbuild/backend/recursivemake.py 2017-03-17 22:43:57.750699563 -0700
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py 2017-03-17 22:44:28.722912859 -0700
@@ -1306,7 +1306,7 @@
for f in files:
if not isinstance(f, ObjDirPath):
dest = mozpath.join(reltarget, path, mozpath.basename(f))
- install_manifest.add_symlink(f.full_path, dest)
+ install_manifest.add_copy(f.full_path, dest)
else:
backend_file.write('%s_FILES += %s\n' % (
target_var, self._pretty_path(f, backend_file)))
# === Fix the SM45 tracelogger ===
# This patch is a squashed version of several patches that were adapted
# to fix failing hunks.
#
# Applied in the following order, they are:
# * https://bugzilla.mozilla.org/show_bug.cgi?id=1266649
# Handle failing to add to pointermap gracefully.
# * https://bugzilla.mozilla.org/show_bug.cgi?id=1280648
# Don't cache based on pointers to movable GC things.
# * https://bugzilla.mozilla.org/show_bug.cgi?id=1255766
# Also mark resizing of memory.
# * https://bugzilla.mozilla.org/show_bug.cgi?id=1259403
# Only increase capacity by multiples of 2.
# Always make sure there are 3 free slots for events.
# ===
diff --git a/js/src/jit-test/tests/tracelogger/bug1266649.js b/js/src/jit-test/tests/tracelogger/bug1266649.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/tracelogger/bug1266649.js
@@ -0,0 +1,8 @@
+
+var du = new Debugger();
+if (typeof du.setupTraceLogger === "function") {
+ du.setupTraceLogger({
+ Scripts: true
+ })
+ oomTest(() => function(){});
+}
--- a/js/src/vm/TraceLogging.cpp 2016-04-14 10:55:17.000000000 -0700
+++ b/js/src/vm/TraceLogging.cpp 2017-03-29 18:17:25.235673763 -0700
@@ -393,14 +393,14 @@
return nullptr;
}
- if (!pointerMap.add(p, text, payload))
- return nullptr;
-
if (graph.get())
graph->addTextId(textId, str);
nextTextId++;
+ if (!pointerMap.add(p, text, payload))
+ return nullptr;
+
return payload;
}
@@ -420,10 +420,13 @@
if (!traceLoggerState->isTextIdEnabled(type))
return getOrCreateEventPayload(type);
- PointerHashMap::AddPtr p = pointerMap.lookupForAdd(ptr);
- if (p) {
- MOZ_ASSERT(p->value()->textId() < nextTextId); // Sanity check.
- return p->value();
+ PointerHashMap::AddPtr p;
+ if (ptr) {
+ p = pointerMap.lookupForAdd(ptr);
+ if (p) {
+ MOZ_ASSERT(p->value()->textId() < nextTextId); // Sanity check.
+ return p->value();
+ }
}
// Compute the length of the string to create.
@@ -455,14 +458,16 @@
return nullptr;
}
- if (!pointerMap.add(p, ptr, payload))
- return nullptr;
-
if (graph.get())
graph->addTextId(textId, str);
nextTextId++;
+ if (ptr) {
+ if (!pointerMap.add(p, ptr, payload))
+ return nullptr;
+ }
+
return payload;
}
@@ -477,7 +482,7 @@
TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId type,
const JS::ReadOnlyCompileOptions& script)
{
- return getOrCreateEventPayload(type, script.filename(), script.lineno, script.column, &script);
+ return getOrCreateEventPayload(type, script.filename(), script.lineno, script.column, nullptr);
}
void
@@ -550,19 +555,42 @@
return;
MOZ_ASSERT(traceLoggerState);
- if (!events.ensureSpaceBeforeAdd()) {
+ if (!events.hasSpaceForAdd(3)) {
uint64_t start = rdtsc() - traceLoggerState->startupTime;
- if (graph.get())
- graph->log(events);
+ if (!events.ensureSpaceBeforeAdd(3)) {
+ if (graph.get())
+ graph->log(events);
+
+ iteration_++;
+ events.clear();
+
+ // Remove the item in the pointerMap for which the payloads
+ // have no uses anymore
+ for (PointerHashMap::Enum e(pointerMap); !e.empty(); e.popFront()) {
+ if (e.front().value()->uses() != 0)
+ continue;
+
+ TextIdHashMap::Ptr p = textIdPayloads.lookup(e.front().value()->textId());
+ MOZ_ASSERT(p);
+ textIdPayloads.remove(p);
- iteration_++;
- events.clear();
+ e.removeFront();
+ }
+
+ // Free all payloads that have no uses anymore.
+ for (TextIdHashMap::Enum e(textIdPayloads); !e.empty(); e.popFront()) {
+ if (e.front().value()->uses() == 0) {
+ js_delete(e.front().value());
+ e.removeFront();
+ }
+ }
+ }
// Log the time it took to flush the events as being from the
// Tracelogger.
if (graph.get()) {
- MOZ_ASSERT(events.capacity() > 2);
+ MOZ_ASSERT(events.capacity() - events.size() > 2);
EventEntry& entryStart = events.pushUninitialized();
entryStart.time = start;
entryStart.textId = TraceLogger_Internal;
@@ -572,26 +600,6 @@
entryStop.textId = TraceLogger_Stop;
}
- // Remove the item in the pointerMap for which the payloads
- // have no uses anymore
- for (PointerHashMap::Enum e(pointerMap); !e.empty(); e.popFront()) {
- if (e.front().value()->uses() != 0)
- continue;
-
- TextIdHashMap::Ptr p = textIdPayloads.lookup(e.front().value()->textId());
- MOZ_ASSERT(p);
- textIdPayloads.remove(p);
-
- e.removeFront();
- }
-
- // Free all payloads that have no uses anymore.
- for (TextIdHashMap::Enum e(textIdPayloads); !e.empty(); e.popFront()) {
- if (e.front().value()->uses() == 0) {
- js_delete(e.front().value());
- e.removeFront();
- }
- }
}
uint64_t time = rdtsc() - traceLoggerState->startupTime;
diff --git a/js/src/vm/TraceLogging.h b/js/src/vm/TraceLogging.h
--- a/js/src/vm/TraceLogging.h
+++ b/js/src/vm/TraceLogging.h
@@ -237,17 +237,17 @@ class TraceLoggerThread
// If still logging in the same iteration, there are no lost events.
if (lastIteration == iteration_) {
MOZ_ASSERT(lastSize <= events.size());
return false;
}
// If we are in a consecutive iteration we are only sure we didn't lose any events,
// when the lastSize equals the maximum size 'events' can get.
- if (lastIteration == iteration_ - 1 && lastSize == CONTINUOUSSPACE_LIMIT)
+ if (lastIteration == iteration_ - 1 && lastSize == events.max_items())
return false;
return true;
}
const char* eventText(uint32_t id);
bool textIdIsScriptEvent(uint32_t id);
diff --git a/js/src/vm/TraceLoggingTypes.h b/js/src/vm/TraceLoggingTypes.h
--- a/js/src/vm/TraceLoggingTypes.h
+++ b/js/src/vm/TraceLoggingTypes.h
@@ -127,25 +127,25 @@ inline bool
TLTextIdIsTreeEvent(uint32_t id)
{
// Everything between TraceLogger_Error and TraceLogger_LastTreeItem are tree events and
// atm also every custom event.
return (id > TraceLogger_Error && id < TraceLogger_LastTreeItem) ||
id >= TraceLogger_Last;
}
-// The maximum amount of ram memory a continuous space structure can take (in bytes).
-static const uint32_t CONTINUOUSSPACE_LIMIT = 200 * 1024 * 1024;
-
template <class T>
class ContinuousSpace {
T* data_;
uint32_t size_;
uint32_t capacity_;
+ // The maximum amount of ram memory a continuous space structure can take (in bytes).
+ static const uint32_t LIMIT = 200 * 1024 * 1024;
+
public:
ContinuousSpace ()
: data_(nullptr)
{ }
bool init() {
capacity_ = 64;
size_ = 0;
@@ -157,16 +157,20 @@ class ContinuousSpace {
}
~ContinuousSpace()
{
js_free(data_);
data_ = nullptr;
}
+ uint32_t max_items() {
+ return LIMIT / sizeof(T);
+ }
+
T* data() {
return data_;
}
uint32_t capacity() {
return capacity_;
}
@@ -194,21 +198,24 @@ class ContinuousSpace {
}
bool ensureSpaceBeforeAdd(uint32_t count = 1) {
MOZ_ASSERT(data_);
if (hasSpaceForAdd(count))
return true;
uint32_t nCapacity = capacity_ * 2;
- if (size_ + count > nCapacity || nCapacity * sizeof(T) > CONTINUOUSSPACE_LIMIT) {
+ if (size_ + count > nCapacity)
nCapacity = size_ + count;
+ if (nCapacity > max_items()) {
+ nCapacity = max_items();
+
// Limit the size of a continuous buffer.
- if (nCapacity * sizeof(T) > CONTINUOUSSPACE_LIMIT)
+ if (size_ + count > nCapacity)
return false;
}
T* entries = (T*) js_realloc(data_, nCapacity * sizeof(T));
if (!entries)
return false;
data_ = entries;
Some symbols that need to be public are not marked as such.
--- a/js/public/CharacterEncoding.h 2017-03-22 18:06:39.633393242 +0000
+++ b/js/public/CharacterEncoding.h 2017-03-22 18:06:57.141741214 +0000
@@ -187,7 +187,7 @@
* - On success, returns a malloc'd TwoByteCharsZ, and updates |outlen| to hold
* its length; the length value excludes the trailing null.
*/
-extern TwoByteCharsZ
+extern JS_PUBLIC_API(TwoByteCharsZ)
UTF8CharsToNewTwoByteCharsZ(JSContext* cx, const UTF8Chars utf8, size_t* outlen);
/*
--- a/js/public/Utility.h 2017-03-20 06:15:15.283755975 +0000
+++ b/js/public/Utility.h 2017-03-20 06:16:06.528152239 +0000
@@ -91,7 +91,7 @@
# if defined(DEBUG) || defined(JS_OOM_BREAKPOINT)
extern bool InitThreadType(void);
extern void SetThreadType(ThreadType);
-extern uint32_t GetThreadType(void);
+extern JS_FRIEND_API(uint32_t) GetThreadType(void);
# else
inline bool InitThreadType(void) { return true; }
inline void SetThreadType(ThreadType t) {};
--- a/js/src/jsalloc.h 2017-03-29 18:22:18.902294948 -0700
+++ b/js/src/jsalloc.h 2017-03-29 18:23:36.694986602 -0700
@@ -17,6 +17,8 @@
#include "js/TypeDecls.h"
#include "js/Utility.h"
+extern JS_PUBLIC_API(void) JS_ReportOutOfMemory(JSContext* cx);
+
namespace js {
enum class AllocFunction {
@@ -130,7 +132,7 @@
bool checkSimulatedOOM() const {
if (js::oom::ShouldFailWithOOM()) {
- js::ReportOutOfMemory(reinterpret_cast<ExclusiveContext*>(cx_));
+ JS_ReportOutOfMemory(reinterpret_cast<JSContext*>(cx_));
return false;
}
--- a/js/src/jsapi.h 2017-03-20 06:27:47.265550528 +0000
+++ b/js/src/jsapi.h 2017-03-20 06:28:42.645975646 +0000
@@ -2411,7 +2411,7 @@
{}
static void trace(JSPropertyDescriptor* self, JSTracer* trc) { self->trace(trc); }
- void trace(JSTracer* trc);
+ JS_PUBLIC_API(void) trace(JSTracer* trc);
};
namespace JS {
--- a/js/src/vm/CharacterEncoding.cpp 2017-03-22 18:03:40.209786639 +0000
+++ b/js/src/vm/CharacterEncoding.cpp 2017-03-22 18:03:48.717959359 +0000
@@ -364,7 +364,7 @@
return TwoByteCharsZ(dst, *outlen);
}
-TwoByteCharsZ
+JS_PUBLIC_API(TwoByteCharsZ)
JS::UTF8CharsToNewTwoByteCharsZ(JSContext* cx, const UTF8Chars utf8, size_t* outlen)
{
return InflateUTF8StringHelper(cx, utf8, InflateUTF8StringToBuffer<CountAndReportInvalids>,
Fixes the library's install_name for JHBuild on macOS. It has to be an absolute
path due to JHBuild's LD_ environment variables getting clobbered.
--- a/config/rules.mk 2017-03-17 20:15:12.531151950 -0700
+++ b/config/rules.mk 2017-03-17 20:15:36.995318002 -0700
@@ -399,7 +399,7 @@
ifdef MOZ_IOS
_LOADER_PATH := @rpath
else
-_LOADER_PATH := @executable_path
+_LOADER_PATH := $(abspath $(prefix))/lib
endif
EXTRA_DSO_LDOPTS += -dynamiclib -install_name $(_LOADER_PATH)/$(SHARED_LIBRARY) -compatibility_version 1 -current_version 1 -single_module
endif
Removes the dependency on NSPR from the pkg-config file in the case where
SpiderMonkey was configured with --enable-posix-nspr-emulation.
--- a/build/autoconf/nspr-build.m4 2017-04-24 21:52:45.000000000 -0700
+++ b/build/autoconf/nspr-build.m4 2017-04-24 21:53:42.000000000 -0700
@@ -181,6 +181,8 @@
,
AC_MSG_ERROR([system NSPR does not support PR_STATIC_ASSERT]))
CFLAGS=$_SAVE_CFLAGS
+elif test -n "$JS_POSIX_NSPR"; then
+ NSPR_PKGCONF_CHECK=
fi
AC_SUBST(NSPR_PKGCONF_CHECK)
--- a/js/src/configure 2017-04-24 22:18:01.000000000 -0700
+++ b/js/src/configure 2017-04-24 22:18:30.000000000 -0700
@@ -12863,6 +12863,8 @@
fi
rm -f conftest*
CFLAGS=$_SAVE_CFLAGS
+elif test -n "$JS_POSIX_NSPR"; then
+ NSPR_PKGCONF_CHECK=
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment