Bug 1021001 - Remove AutoCheckCannotGC from NamespaceImports.h, and require users to use the sole definition in GCAPI.h. r=terrence

This commit is contained in:
Jeff Walden 2014-06-09 09:44:30 -07:00
parent f76da34a54
commit 7e698a4907
11 changed files with 17 additions and 7 deletions

View File

@ -42,8 +42,6 @@ class MOZ_STACK_CLASS SourceBufferHolder;
class HandleValueArray; class HandleValueArray;
class AutoCheckCannotGC;
} }
// Do the importing. // Do the importing.
@ -135,8 +133,6 @@ using JS::HandleValueArray;
using JS::Zone; using JS::Zone;
using JS::AutoCheckCannotGC;
} /* namespace js */ } /* namespace js */
#endif /* NamespaceImports_h */ #endif /* NamespaceImports_h */

View File

@ -17,6 +17,8 @@
using namespace js; using namespace js;
using namespace jit; using namespace jit;
using JS::AutoCheckCannotGC;
using parallel::Spew; using parallel::Spew;
using parallel::SpewOps; using parallel::SpewOps;
using parallel::SpewBailouts; using parallel::SpewBailouts;

View File

@ -49,6 +49,8 @@ using mozilla::DebugOnly;
using mozilla::IsNaN; using mozilla::IsNaN;
using mozilla::PointerRangeSize; using mozilla::PointerRangeSize;
using JS::AutoCheckCannotGC;
bool bool
js::GetLengthProperty(JSContext *cx, HandleObject obj, uint32_t *lengthp) js::GetLengthProperty(JSContext *cx, HandleObject obj, uint32_t *lengthp)
{ {

View File

@ -203,7 +203,7 @@ IdToTypeId(jsid id)
if (JSID_IS_STRING(id)) { if (JSID_IS_STRING(id)) {
JSAtom *atom = JSID_TO_ATOM(id); JSAtom *atom = JSID_TO_ATOM(id);
AutoCheckCannotGC nogc; JS::AutoCheckCannotGC nogc;
bool isNumeric = atom->hasLatin1Chars() bool isNumeric = atom->hasLatin1Chars()
? IdIsNumericTypeId(atom->latin1Range(nogc)) ? IdIsNumericTypeId(atom->latin1Range(nogc))
: IdIsNumericTypeId(atom->twoByteRange(nogc)); : IdIsNumericTypeId(atom->twoByteRange(nogc));

View File

@ -46,6 +46,8 @@ using mozilla::NegativeInfinity;
using mozilla::PodCopy; using mozilla::PodCopy;
using mozilla::PositiveInfinity; using mozilla::PositiveInfinity;
using mozilla::RangedPtr; using mozilla::RangedPtr;
using JS::AutoCheckCannotGC;
using JS::GenericNaN; using JS::GenericNaN;
/* /*

View File

@ -45,6 +45,8 @@
using namespace js; using namespace js;
using namespace js::gc; using namespace js::gc;
using JS::AutoCheckCannotGC;
using js::frontend::IsIdentifier; using js::frontend::IsIdentifier;
/* /*

View File

@ -73,6 +73,8 @@ using mozilla::PodCopy;
using mozilla::PodEqual; using mozilla::PodEqual;
using mozilla::SafeCast; using mozilla::SafeCast;
using JS::AutoCheckCannotGC;
typedef Handle<JSLinearString*> HandleLinearString; typedef Handle<JSLinearString*> HandleLinearString;
static JSLinearString * static JSLinearString *

View File

@ -33,6 +33,8 @@
using namespace js; using namespace js;
using namespace js::selfhosted; using namespace js::selfhosted;
using JS::AutoCheckCannotGC;
static void static void
selfHosting_ErrorReporter(JSContext *cx, const char *message, JSErrorReport *report) selfHosting_ErrorReporter(JSContext *cx, const char *message, JSErrorReport *report)
{ {

View File

@ -88,7 +88,7 @@ NewFatInlineString(ExclusiveContext *cx, Handle<JSLinearString*> base, size_t st
if (!s) if (!s)
return nullptr; return nullptr;
AutoCheckCannotGC nogc; JS::AutoCheckCannotGC nogc;
mozilla::PodCopy(chars, base->chars<CharT>(nogc) + start, length); mozilla::PodCopy(chars, base->chars<CharT>(nogc) + start, length);
chars[length] = 0; chars[length] = 0;
return s; return s;

View File

@ -24,6 +24,8 @@ using mozilla::PodCopy;
using mozilla::RangedPtr; using mozilla::RangedPtr;
using mozilla::RoundUpPow2; using mozilla::RoundUpPow2;
using JS::AutoCheckCannotGC;
size_t size_t
JSString::sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) JSString::sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf)
{ {

View File

@ -188,7 +188,7 @@ IsTypedArrayIndex(jsid id, uint64_t *indexp)
if (MOZ_UNLIKELY(!JSID_IS_STRING(id))) if (MOZ_UNLIKELY(!JSID_IS_STRING(id)))
return false; return false;
AutoCheckCannotGC nogc; JS::AutoCheckCannotGC nogc;
JSAtom *atom = JSID_TO_ATOM(id); JSAtom *atom = JSID_TO_ATOM(id);
size_t length = atom->length(); size_t length = atom->length();