diff --git a/js/src/NamespaceImports.h b/js/src/NamespaceImports.h index 6fe6c51a9b1..32ffe001bbc 100644 --- a/js/src/NamespaceImports.h +++ b/js/src/NamespaceImports.h @@ -42,8 +42,6 @@ class MOZ_STACK_CLASS SourceBufferHolder; class HandleValueArray; -class AutoCheckCannotGC; - } // Do the importing. @@ -135,8 +133,6 @@ using JS::HandleValueArray; using JS::Zone; -using JS::AutoCheckCannotGC; - } /* namespace js */ #endif /* NamespaceImports_h */ diff --git a/js/src/jit/ParallelFunctions.cpp b/js/src/jit/ParallelFunctions.cpp index e2820035700..130b7380974 100644 --- a/js/src/jit/ParallelFunctions.cpp +++ b/js/src/jit/ParallelFunctions.cpp @@ -17,6 +17,8 @@ using namespace js; using namespace jit; +using JS::AutoCheckCannotGC; + using parallel::Spew; using parallel::SpewOps; using parallel::SpewBailouts; diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index 257e2b462d2..c863485dd0b 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -49,6 +49,8 @@ using mozilla::DebugOnly; using mozilla::IsNaN; using mozilla::PointerRangeSize; +using JS::AutoCheckCannotGC; + bool js::GetLengthProperty(JSContext *cx, HandleObject obj, uint32_t *lengthp) { diff --git a/js/src/jsinferinlines.h b/js/src/jsinferinlines.h index b3791f802f6..e017b655fb2 100644 --- a/js/src/jsinferinlines.h +++ b/js/src/jsinferinlines.h @@ -203,7 +203,7 @@ IdToTypeId(jsid id) if (JSID_IS_STRING(id)) { JSAtom *atom = JSID_TO_ATOM(id); - AutoCheckCannotGC nogc; + JS::AutoCheckCannotGC nogc; bool isNumeric = atom->hasLatin1Chars() ? IdIsNumericTypeId(atom->latin1Range(nogc)) : IdIsNumericTypeId(atom->twoByteRange(nogc)); diff --git a/js/src/jsnum.cpp b/js/src/jsnum.cpp index d801d715cff..9ce6d7bd2f7 100644 --- a/js/src/jsnum.cpp +++ b/js/src/jsnum.cpp @@ -46,6 +46,8 @@ using mozilla::NegativeInfinity; using mozilla::PodCopy; using mozilla::PositiveInfinity; using mozilla::RangedPtr; + +using JS::AutoCheckCannotGC; using JS::GenericNaN; /* diff --git a/js/src/jsopcode.cpp b/js/src/jsopcode.cpp index 71be550b896..008b354a466 100644 --- a/js/src/jsopcode.cpp +++ b/js/src/jsopcode.cpp @@ -45,6 +45,8 @@ using namespace js; using namespace js::gc; +using JS::AutoCheckCannotGC; + using js::frontend::IsIdentifier; /* diff --git a/js/src/jsstr.cpp b/js/src/jsstr.cpp index b23337be8a8..f031d66bff6 100644 --- a/js/src/jsstr.cpp +++ b/js/src/jsstr.cpp @@ -73,6 +73,8 @@ using mozilla::PodCopy; using mozilla::PodEqual; using mozilla::SafeCast; +using JS::AutoCheckCannotGC; + typedef Handle HandleLinearString; static JSLinearString * diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp index df64955997c..c6a0c95aa09 100644 --- a/js/src/vm/SelfHosting.cpp +++ b/js/src/vm/SelfHosting.cpp @@ -33,6 +33,8 @@ using namespace js; using namespace js::selfhosted; +using JS::AutoCheckCannotGC; + static void selfHosting_ErrorReporter(JSContext *cx, const char *message, JSErrorReport *report) { diff --git a/js/src/vm/String-inl.h b/js/src/vm/String-inl.h index 48078a937ad..0cf39f30c87 100644 --- a/js/src/vm/String-inl.h +++ b/js/src/vm/String-inl.h @@ -88,7 +88,7 @@ NewFatInlineString(ExclusiveContext *cx, Handle base, size_t st if (!s) return nullptr; - AutoCheckCannotGC nogc; + JS::AutoCheckCannotGC nogc; mozilla::PodCopy(chars, base->chars(nogc) + start, length); chars[length] = 0; return s; diff --git a/js/src/vm/String.cpp b/js/src/vm/String.cpp index 9f32a17cd34..26431728c70 100644 --- a/js/src/vm/String.cpp +++ b/js/src/vm/String.cpp @@ -24,6 +24,8 @@ using mozilla::PodCopy; using mozilla::RangedPtr; using mozilla::RoundUpPow2; +using JS::AutoCheckCannotGC; + size_t JSString::sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) { diff --git a/js/src/vm/TypedArrayObject.h b/js/src/vm/TypedArrayObject.h index ac02085d3d2..5dcaefff4b0 100644 --- a/js/src/vm/TypedArrayObject.h +++ b/js/src/vm/TypedArrayObject.h @@ -188,7 +188,7 @@ IsTypedArrayIndex(jsid id, uint64_t *indexp) if (MOZ_UNLIKELY(!JSID_IS_STRING(id))) return false; - AutoCheckCannotGC nogc; + JS::AutoCheckCannotGC nogc; JSAtom *atom = JSID_TO_ATOM(id); size_t length = atom->length();