diff --git a/js/src/builtin/AtomicsObject.cpp b/js/src/builtin/AtomicsObject.cpp index 98a11d4d50d0..58a716fdc4fd 100644 --- a/js/src/builtin/AtomicsObject.cpp +++ b/js/src/builtin/AtomicsObject.cpp @@ -55,8 +55,8 @@ #include "prmjtime.h" +#include "asmjs/AsmJSModule.h" #include "jit/AtomicOperations.h" - #include "js/Class.h" #include "vm/GlobalObject.h" #include "vm/SharedTypedArrayObject.h" diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index 7a900b705935..d06ef3dc772e 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -1503,7 +1503,7 @@ js::testingFunc_inJit(JSContext* cx, unsigned argc, jsval* vp) { CallArgs args = CallArgsFromVp(argc, vp); - if (!IsBaselineEnabled(cx)) { + if (!jit::IsBaselineEnabled(cx)) { JSString* error = JS_NewStringCopyZ(cx, "Baseline is disabled."); if(!error) return false; @@ -1531,7 +1531,7 @@ js::testingFunc_inIon(JSContext* cx, unsigned argc, jsval* vp) { CallArgs args = CallArgsFromVp(argc, vp); - if (!IsIonEnabled(cx)) { + if (!jit::IsIonEnabled(cx)) { JSString* error = JS_NewStringCopyZ(cx, "Ion is disabled."); if (!error) return false; diff --git a/js/src/ds/IdValuePair.h b/js/src/ds/IdValuePair.h index b77c3079194d..2fa220d69303 100644 --- a/js/src/ds/IdValuePair.h +++ b/js/src/ds/IdValuePair.h @@ -7,8 +7,9 @@ #ifndef ds_IdValuePair_h #define ds_IdValuePair_h -#include "NamespaceImports.h" +#include "jsapi.h" +#include "NamespaceImports.h" #include "js/Id.h" namespace js { diff --git a/js/src/gc/Allocator.cpp b/js/src/gc/Allocator.cpp index fe38f7fab470..b3f137f4e58c 100644 --- a/js/src/gc/Allocator.cpp +++ b/js/src/gc/Allocator.cpp @@ -346,7 +346,7 @@ ArenaLists::allocateFromArena(JS::Zone* zone, AllocKind thingKind, AutoMaybeStartBackgroundAllocation& maybeStartBGAlloc) { JSRuntime* rt = zone->runtimeFromAnyThread(); - Maybe maybeLock; + mozilla::Maybe maybeLock; // See if we can proceed without taking the GC lock. if (backgroundFinalizeState[thingKind] != BFS_DONE) diff --git a/js/src/jsapi-tests/testForwardSetProperty.cpp b/js/src/jsapi-tests/testForwardSetProperty.cpp index 59ad29d0f77c..04d537f990f2 100644 --- a/js/src/jsapi-tests/testForwardSetProperty.cpp +++ b/js/src/jsapi-tests/testForwardSetProperty.cpp @@ -45,7 +45,7 @@ BEGIN_TEST(testForwardSetProperty) // Non-strict setter - ObjectOpResult result; + JS::ObjectOpResult result; CHECK(JS_ForwardSetPropertyTo(cx, obj2, prop, setval, v3, result)); CHECK(result); diff --git a/js/src/jsapi-tests/testJSEvaluateScript.cpp b/js/src/jsapi-tests/testJSEvaluateScript.cpp index fb85fdb5a453..615b90c092de 100644 --- a/js/src/jsapi-tests/testJSEvaluateScript.cpp +++ b/js/src/jsapi-tests/testJSEvaluateScript.cpp @@ -4,6 +4,8 @@ #include "jsapi-tests/tests.h" +using mozilla::ArrayLength; + BEGIN_TEST(testJSEvaluateScript) { JS::RootedObject obj(cx, JS_NewPlainObject(cx)); diff --git a/js/src/jsapi-tests/tests.h b/js/src/jsapi-tests/tests.h index 7e3bef12e018..a57a0b7b218b 100644 --- a/js/src/jsapi-tests/tests.h +++ b/js/src/jsapi-tests/tests.h @@ -7,6 +7,7 @@ #ifndef jsapi_tests_tests_h #define jsapi_tests_tests_h +#include "mozilla/ArrayUtils.h" #include "mozilla/TypeTraits.h" #include diff --git a/js/src/jsexn.h b/js/src/jsexn.h index 240479cd7df5..1cdcac947e5d 100644 --- a/js/src/jsexn.h +++ b/js/src/jsexn.h @@ -125,7 +125,7 @@ class AutoClearPendingException { } ~AutoClearPendingException() { - cx->clearPendingException(); + JS_ClearPendingException(cx); } }; diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index 829b23399fc6..5c9265106d2a 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -4314,7 +4314,7 @@ SetSharedArrayBuffer(JSContext* cx, unsigned argc, Value* vp) return true; } -class SprintOptimizationTypeInfoOp : public ForEachTrackedOptimizationTypeInfoOp +class SprintOptimizationTypeInfoOp : public JS::ForEachTrackedOptimizationTypeInfoOp { Sprinter* sp; bool startedTypes_; @@ -4345,7 +4345,7 @@ class SprintOptimizationTypeInfoOp : public ForEachTrackedOptimizationTypeInfoOp Sprint(sp, "},"); } - void operator()(TrackedTypeSite site, const char* mirType) override { + void operator()(JS::TrackedTypeSite site, const char* mirType) override { if (startedTypes_) { // Clear trailing , if ((*sp)[sp->getOffset() - 1] == ',') @@ -4361,7 +4361,7 @@ class SprintOptimizationTypeInfoOp : public ForEachTrackedOptimizationTypeInfoOp } }; -class SprintOptimizationAttemptsOp : public ForEachTrackedOptimizationAttemptOp +class SprintOptimizationAttemptsOp : public JS::ForEachTrackedOptimizationAttemptOp { Sprinter* sp; @@ -4370,7 +4370,7 @@ class SprintOptimizationAttemptsOp : public ForEachTrackedOptimizationAttemptOp : sp(sp) { } - void operator()(TrackedStrategy strategy, TrackedOutcome outcome) override { + void operator()(JS::TrackedStrategy strategy, JS::TrackedOutcome outcome) override { Sprint(sp, "{\"strategy\":\"%s\",\"outcome\":\"%s\"},", TrackedStrategyString(strategy), TrackedOutcomeString(outcome)); }