diff --git a/build/pgo/Makefile.in b/build/pgo/Makefile.in index 748258f31c10..23e034a7d28c 100644 --- a/build/pgo/Makefile.in +++ b/build/pgo/Makefile.in @@ -55,6 +55,14 @@ include $(topsrcdir)/config/rules.mk TARGET_DEPTH = ../.. include $(topsrcdir)/build/automation-build.mk +# Need to override the browser_path from binary-location.mk (included via automation-build.mk) +# since we want to run from e.g. dist/firefox rather than dist/bin +ifeq ($(OS_ARCH),Darwin) +browser_path = \"$(TARGET_DIST)/$(MOZ_APP_NAME)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/$(PROGRAM)\" +else +browser_path = \"$(TARGET_DIST)/$(MOZ_APP_NAME)/$(PROGRAM)\" +endif + # Stuff to make a build with a profile _PGO_FILES = \ diff --git a/js/src/jsapi-tests/Makefile.in b/js/src/jsapi-tests/Makefile.in index 7d91b49879b2..525e0cea540e 100644 --- a/js/src/jsapi-tests/Makefile.in +++ b/js/src/jsapi-tests/Makefile.in @@ -70,6 +70,7 @@ CPPSRCS = \ testGetPropertyDefault.cpp \ testIndexToString.cpp \ testIntString.cpp \ + testIntTypesABI.cpp \ testIntern.cpp \ testLookup.cpp \ testLooselyEqual.cpp \ diff --git a/js/src/jsapi-tests/testIntTypesABI.cpp b/js/src/jsapi-tests/testIntTypesABI.cpp new file mode 100644 index 000000000000..450cef843a34 --- /dev/null +++ b/js/src/jsapi-tests/testIntTypesABI.cpp @@ -0,0 +1,65 @@ +#include "tests.h" + +/* + * This test exercises the full, deliberately-exposed JSAPI interface to ensure + * that no internal integer typedefs leak out. Include every intentionally + * public header file (and those headers included by them, for completeness), + * even the ones tests.h itself included, to verify this. + */ +#include "js-config.h" +#include "jsapi.h" +#include "jsclass.h" +#include "jscompat.h" +#include "jscpucfg.h" +#include "jspubtd.h" +#include "jsstdint.h" +#include "jstypes.h" +#include "jsval.h" +#include "jsxdrapi.h" + +#include "js/HashTable.h" +#include "js/TemplateLib.h" +#include "js/Utility.h" +#include "js/Vector.h" + +/* + * Verify that our public (and intended to be public, versus being that way + * because we haven't made them private yet) headers don't define + * {u,}int{8,16,32,64} or JS{Ui,I}nt{8,16,32,64} types. If any do, they will + * assuredly conflict with a corresponding typedef below mapping to a *struct*. + * + * Note that tests.h includes a few internal headers; in order that this + * jsapi-test be writable, those internal headers must not import the legacy + * typedefs. + */ + +struct ConflictingType { + uint64_t u64; +}; + +typedef ConflictingType uint8; +typedef ConflictingType uint16; +typedef ConflictingType uint32; +typedef ConflictingType uint64; + +typedef ConflictingType int8; +typedef ConflictingType int16; +typedef ConflictingType int32; +typedef ConflictingType int64; + +typedef ConflictingType JSUint8; +typedef ConflictingType JSUint16; +typedef ConflictingType JSUint32; +typedef ConflictingType JSUint64; + +typedef ConflictingType JSInt8; +typedef ConflictingType JSInt16; +typedef ConflictingType JSInt32; +typedef ConflictingType JSInt64; + +BEGIN_TEST(testIntTypesABI) +{ + /* This passes if the typedefs didn't conflict at compile time. */ + return true; +} +END_TEST(testIntTypesABI) diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 3cf9354ad44c..38f5285ea33a 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -44,7 +44,7 @@ * JavaScript API. */ -#include "js/LegacyIntTypes.h" +#include "mozilla/StdInt.h" #include #include