Bug 1384513 - Change all public APIs to take JS::AutoRequireNoGC instead of JS::AutoCheckCannotGC. r=jonco

Additionally, change the base class of AutoSuppressGCAnalysis from AutoAssertNoAlloc to AutoAssertNoGC.

In combination, these chances enable passing either JS::AutoCheckCannotGC or JS::AutoSuppressGCAnalysis, depending on whether suppressing the GC analysis is desired or not.

MozReview-Commit-ID: Eg1cl28ezeJ
* * *
Bug 1384513 - Follow-up to fix bustage from template usage of functions with a changed signature, on a CLOSED TREE. r=bustage

MozReview-Commit-ID: 5SsI4DoDwAT
This commit is contained in:
Till Schneidereit 2017-07-26 12:20:59 +02:00
Родитель 60198b9324
Коммит fb21cc09de
13 изменённых файлов: 65 добавлений и 62 удалений

Просмотреть файл

@ -149,7 +149,7 @@ private:
template<typename T,
JSObject* UnwrapArray(JSObject*),
T* GetData(JSObject*, bool* isShared, const JS::AutoCheckCannotGC&),
T* GetData(JSObject*, bool* isShared, const JS::AutoRequireNoGC&),
void GetLengthAndDataAndSharedness(JSObject*, uint32_t*, bool*, T**),
JSObject* CreateNew(JSContext*, uint32_t)>
struct TypedArray

Просмотреть файл

@ -535,7 +535,7 @@ class JS_PUBLIC_API(AutoAssertNoGC) : public AutoRequireNoGC
* Assert if an allocation of a GC thing occurs while this class is live. This
* class does not disable the static rooting hazard analysis.
*/
class JS_PUBLIC_API(AutoAssertNoAlloc)
class JS_PUBLIC_API(AutoAssertNoAlloc) : public AutoRequireNoGC
{
#ifdef JS_DEBUG
js::gc::GCRuntime* gc;

Просмотреть файл

@ -83,7 +83,7 @@ struct BreadthFirst {
//
// We do nothing with noGC, other than require it to exist, with a lifetime
// that encloses our own.
BreadthFirst(JSContext* cx, Handler& handler, const JS::AutoCheckCannotGC& noGC)
BreadthFirst(JSContext* cx, Handler& handler, const JS::AutoRequireNoGC& noGC)
: wantNames(true), cx(cx), visited(), handler(handler), pending(),
traversalBegun(false), stopRequested(false), abandonRequested(false)
{ }

Просмотреть файл

@ -1011,7 +1011,7 @@ JS_GetDataViewByteOffset(JSObject* obj)
}
JS_FRIEND_API(void*)
JS_GetDataViewData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&)
JS_GetDataViewData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&)
{
obj = CheckedUnwrap(obj);
if (!obj)

Просмотреть файл

@ -73,7 +73,7 @@ BEGIN_TEST(testTypedArrays)
template<JSObject* Create(JSContext*, uint32_t),
typename Element,
Element* GetData(JSObject*, bool* isShared, const JS::AutoCheckCannotGC&)>
Element* GetData(JSObject*, bool* isShared, const JS::AutoRequireNoGC&)>
bool
TestPlainTypedArray(JSContext* cx)
{
@ -111,7 +111,7 @@ template<JSObject* CreateWithBuffer(JSContext*, JS::HandleObject, uint32_t, int3
JSObject* CreateFromArray(JSContext*, JS::HandleObject),
typename Element,
bool Shared,
Element* GetData(JSObject*, bool*, const JS::AutoCheckCannotGC&)>
Element* GetData(JSObject*, bool*, const JS::AutoRequireNoGC&)>
bool
TestArrayFromBuffer(JSContext* cx)
{

Просмотреть файл

@ -5841,7 +5841,7 @@ JS_StringHasLatin1Chars(JSString* str)
}
JS_PUBLIC_API(const JS::Latin1Char*)
JS_GetLatin1StringCharsAndLength(JSContext* cx, const JS::AutoCheckCannotGC& nogc, JSString* str,
JS_GetLatin1StringCharsAndLength(JSContext* cx, const JS::AutoRequireNoGC& nogc, JSString* str,
size_t* plength)
{
MOZ_ASSERT(plength);
@ -5856,7 +5856,7 @@ JS_GetLatin1StringCharsAndLength(JSContext* cx, const JS::AutoCheckCannotGC& nog
}
JS_PUBLIC_API(const char16_t*)
JS_GetTwoByteStringCharsAndLength(JSContext* cx, const JS::AutoCheckCannotGC& nogc, JSString* str,
JS_GetTwoByteStringCharsAndLength(JSContext* cx, const JS::AutoRequireNoGC& nogc, JSString* str,
size_t* plength)
{
MOZ_ASSERT(plength);
@ -5914,7 +5914,7 @@ JS_CopyStringChars(JSContext* cx, mozilla::Range<char16_t> dest, JSString* str)
}
JS_PUBLIC_API(const Latin1Char*)
JS_GetLatin1InternedStringChars(const JS::AutoCheckCannotGC& nogc, JSString* str)
JS_GetLatin1InternedStringChars(const JS::AutoRequireNoGC& nogc, JSString* str)
{
MOZ_ASSERT(str->isAtom());
JSFlatString* flat = str->ensureFlat(nullptr);
@ -5924,7 +5924,7 @@ JS_GetLatin1InternedStringChars(const JS::AutoCheckCannotGC& nogc, JSString* str
}
JS_PUBLIC_API(const char16_t*)
JS_GetTwoByteInternedStringChars(const JS::AutoCheckCannotGC& nogc, JSString* str)
JS_GetTwoByteInternedStringChars(const JS::AutoRequireNoGC& nogc, JSString* str)
{
MOZ_ASSERT(str->isAtom());
JSFlatString* flat = str->ensureFlat(nullptr);
@ -5946,13 +5946,13 @@ JS_FlattenString(JSContext* cx, JSString* str)
}
extern JS_PUBLIC_API(const Latin1Char*)
JS_GetLatin1FlatStringChars(const JS::AutoCheckCannotGC& nogc, JSFlatString* str)
JS_GetLatin1FlatStringChars(const JS::AutoRequireNoGC& nogc, JSFlatString* str)
{
return str->latin1Chars(nogc);
}
extern JS_PUBLIC_API(const char16_t*)
JS_GetTwoByteFlatStringChars(const JS::AutoCheckCannotGC& nogc, JSFlatString* str)
JS_GetTwoByteFlatStringChars(const JS::AutoRequireNoGC& nogc, JSFlatString* str)
{
return str->twoByteChars(nogc);
}

Просмотреть файл

@ -5135,11 +5135,11 @@ extern JS_PUBLIC_API(bool)
JS_StringHasLatin1Chars(JSString* str);
extern JS_PUBLIC_API(const JS::Latin1Char*)
JS_GetLatin1StringCharsAndLength(JSContext* cx, const JS::AutoCheckCannotGC& nogc, JSString* str,
JS_GetLatin1StringCharsAndLength(JSContext* cx, const JS::AutoRequireNoGC& nogc, JSString* str,
size_t* length);
extern JS_PUBLIC_API(const char16_t*)
JS_GetTwoByteStringCharsAndLength(JSContext* cx, const JS::AutoCheckCannotGC& nogc, JSString* str,
JS_GetTwoByteStringCharsAndLength(JSContext* cx, const JS::AutoRequireNoGC& nogc, JSString* str,
size_t* length);
extern JS_PUBLIC_API(bool)
@ -5158,10 +5158,10 @@ extern JS_PUBLIC_API(JSFlatString*)
JS_FlattenString(JSContext* cx, JSString* str);
extern JS_PUBLIC_API(const JS::Latin1Char*)
JS_GetLatin1FlatStringChars(const JS::AutoCheckCannotGC& nogc, JSFlatString* str);
JS_GetLatin1FlatStringChars(const JS::AutoRequireNoGC& nogc, JSFlatString* str);
extern JS_PUBLIC_API(const char16_t*)
JS_GetTwoByteFlatStringChars(const JS::AutoCheckCannotGC& nogc, JSFlatString* str);
JS_GetTwoByteFlatStringChars(const JS::AutoRequireNoGC& nogc, JSFlatString* str);
static MOZ_ALWAYS_INLINE JSFlatString*
JSID_TO_FLAT_STRING(jsid id)

Просмотреть файл

@ -833,7 +833,7 @@ StringHasLatin1Chars(JSString* s)
}
MOZ_ALWAYS_INLINE const JS::Latin1Char*
GetLatin1LinearStringChars(const JS::AutoCheckCannotGC& nogc, JSLinearString* linear)
GetLatin1LinearStringChars(const JS::AutoRequireNoGC& nogc, JSLinearString* linear)
{
MOZ_ASSERT(LinearStringHasLatin1Chars(linear));
@ -845,7 +845,7 @@ GetLatin1LinearStringChars(const JS::AutoCheckCannotGC& nogc, JSLinearString* li
}
MOZ_ALWAYS_INLINE const char16_t*
GetTwoByteLinearStringChars(const JS::AutoCheckCannotGC& nogc, JSLinearString* linear)
GetTwoByteLinearStringChars(const JS::AutoRequireNoGC& nogc, JSLinearString* linear)
{
MOZ_ASSERT(!LinearStringHasLatin1Chars(linear));
@ -875,13 +875,13 @@ FlatStringToLinearString(JSFlatString* s)
}
MOZ_ALWAYS_INLINE const JS::Latin1Char*
GetLatin1AtomChars(const JS::AutoCheckCannotGC& nogc, JSAtom* atom)
GetLatin1AtomChars(const JS::AutoRequireNoGC& nogc, JSAtom* atom)
{
return GetLatin1LinearStringChars(nogc, AtomToLinearString(atom));
}
MOZ_ALWAYS_INLINE const char16_t*
GetTwoByteAtomChars(const JS::AutoCheckCannotGC& nogc, JSAtom* atom)
GetTwoByteAtomChars(const JS::AutoRequireNoGC& nogc, JSAtom* atom)
{
return GetTwoByteLinearStringChars(nogc, AtomToLinearString(atom));
}
@ -1972,7 +1972,7 @@ GetSharedArrayBufferLengthAndData(JSObject* obj, uint32_t* length, bool* isShare
} // namespace js
JS_FRIEND_API(uint8_t*)
JS_GetSharedArrayBufferData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&);
JS_GetSharedArrayBufferData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&);
/*
* Unwrap Typed arrays all at once. Return nullptr without throwing if the
@ -2070,7 +2070,7 @@ JS_ArrayBufferHasData(JSObject* obj);
* its use from code that also interacts with SharedArrayBuffer.
*/
extern JS_FRIEND_API(uint8_t*)
JS_GetArrayBufferData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&);
JS_GetArrayBufferData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&);
/**
* Check whether the obj is ArrayBufferObject and memory mapped. Note that this
@ -2147,30 +2147,30 @@ JS_GetArrayBufferViewByteOffset(JSObject* obj);
*/
extern JS_FRIEND_API(int8_t*)
JS_GetInt8ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&);
JS_GetInt8ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&);
extern JS_FRIEND_API(uint8_t*)
JS_GetUint8ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&);
JS_GetUint8ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&);
extern JS_FRIEND_API(uint8_t*)
JS_GetUint8ClampedArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&);
JS_GetUint8ClampedArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&);
extern JS_FRIEND_API(int16_t*)
JS_GetInt16ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&);
JS_GetInt16ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&);
extern JS_FRIEND_API(uint16_t*)
JS_GetUint16ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&);
JS_GetUint16ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&);
extern JS_FRIEND_API(int32_t*)
JS_GetInt32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&);
JS_GetInt32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&);
extern JS_FRIEND_API(uint32_t*)
JS_GetUint32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&);
JS_GetUint32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&);
extern JS_FRIEND_API(float*)
JS_GetFloat32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&);
JS_GetFloat32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&);
extern JS_FRIEND_API(double*)
JS_GetFloat64ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&);
JS_GetFloat64ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&);
/**
* Same as above, but for any kind of ArrayBufferView. Prefer the type-specific
* versions when possible.
*/
extern JS_FRIEND_API(void*)
JS_GetArrayBufferViewData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&);
JS_GetArrayBufferViewData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&);
/**
* Return the ArrayBuffer or SharedArrayBuffer underlying an ArrayBufferView.
@ -2247,7 +2247,7 @@ JS_GetDataViewByteLength(JSObject* obj);
* otherwise to false.
*/
JS_FRIEND_API(void*)
JS_GetDataViewData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&);
JS_GetDataViewData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&);
namespace js {

Просмотреть файл

@ -8094,13 +8094,16 @@ js::gc::AssertGCThingHasType(js::gc::Cell* cell, JS::TraceKind kind)
JS::AutoAssertNoGC::AutoAssertNoGC(JSContext* maybecx)
: cx_(maybecx ? maybecx : TlsContext.get())
{
cx_->inUnsafeRegion++;
if (cx_)
cx_->inUnsafeRegion++;
}
JS::AutoAssertNoGC::~AutoAssertNoGC()
{
MOZ_ASSERT(cx_->inUnsafeRegion > 0);
cx_->inUnsafeRegion--;
if (cx_) {
MOZ_ASSERT(cx_->inUnsafeRegion > 0);
cx_->inUnsafeRegion--;
}
}
#ifdef DEBUG

Просмотреть файл

@ -1608,7 +1608,7 @@ JS_GetArrayBufferByteLength(JSObject* obj)
}
JS_FRIEND_API(uint8_t*)
JS_GetArrayBufferData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&)
JS_GetArrayBufferData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&)
{
obj = CheckedUnwrap(obj);
if (!obj)
@ -1824,7 +1824,7 @@ JS_IsMappedArrayBufferObject(JSObject* obj)
}
JS_FRIEND_API(void*)
JS_GetArrayBufferViewData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&)
JS_GetArrayBufferViewData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&)
{
obj = CheckedUnwrap(obj);
if (!obj)

Просмотреть файл

@ -511,7 +511,7 @@ JS_IsSharedArrayBufferObject(JSObject* obj)
}
JS_FRIEND_API(uint8_t*)
JS_GetSharedArrayBufferData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&)
JS_GetSharedArrayBufferData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&)
{
obj = CheckedUnwrap(obj);
if (!obj)

Просмотреть файл

@ -652,17 +652,17 @@ class JSLinearString : public JSString
public:
template<typename CharT>
MOZ_ALWAYS_INLINE
const CharT* nonInlineChars(const JS::AutoCheckCannotGC& nogc) const;
const CharT* nonInlineChars(const JS::AutoRequireNoGC& nogc) const;
MOZ_ALWAYS_INLINE
const JS::Latin1Char* nonInlineLatin1Chars(const JS::AutoCheckCannotGC& nogc) const {
const JS::Latin1Char* nonInlineLatin1Chars(const JS::AutoRequireNoGC& nogc) const {
MOZ_ASSERT(!isInline());
MOZ_ASSERT(hasLatin1Chars());
return d.s.u2.nonInlineCharsLatin1;
}
MOZ_ALWAYS_INLINE
const char16_t* nonInlineTwoByteChars(const JS::AutoCheckCannotGC& nogc) const {
const char16_t* nonInlineTwoByteChars(const JS::AutoRequireNoGC& nogc) const {
MOZ_ASSERT(!isInline());
MOZ_ASSERT(hasTwoByteChars());
return d.s.u2.nonInlineCharsTwoByte;
@ -670,24 +670,24 @@ class JSLinearString : public JSString
template<typename CharT>
MOZ_ALWAYS_INLINE
const CharT* chars(const JS::AutoCheckCannotGC& nogc) const;
const CharT* chars(const JS::AutoRequireNoGC& nogc) const;
MOZ_ALWAYS_INLINE
const JS::Latin1Char* latin1Chars(const JS::AutoCheckCannotGC& nogc) const {
const JS::Latin1Char* latin1Chars(const JS::AutoRequireNoGC& nogc) const {
return rawLatin1Chars();
}
MOZ_ALWAYS_INLINE
const char16_t* twoByteChars(const JS::AutoCheckCannotGC& nogc) const {
const char16_t* twoByteChars(const JS::AutoRequireNoGC& nogc) const {
return rawTwoByteChars();
}
mozilla::Range<const JS::Latin1Char> latin1Range(const JS::AutoCheckCannotGC& nogc) const {
mozilla::Range<const JS::Latin1Char> latin1Range(const JS::AutoRequireNoGC& nogc) const {
MOZ_ASSERT(JSString::isLinear());
return mozilla::Range<const JS::Latin1Char>(latin1Chars(nogc), length());
}
mozilla::Range<const char16_t> twoByteRange(const JS::AutoCheckCannotGC& nogc) const {
mozilla::Range<const char16_t> twoByteRange(const JS::AutoRequireNoGC& nogc) const {
MOZ_ASSERT(JSString::isLinear());
return mozilla::Range<const char16_t>(twoByteChars(nogc), length());
}
@ -864,14 +864,14 @@ class JSInlineString : public JSFlatString
{
public:
MOZ_ALWAYS_INLINE
const JS::Latin1Char* latin1Chars(const JS::AutoCheckCannotGC& nogc) const {
const JS::Latin1Char* latin1Chars(const JS::AutoRequireNoGC& nogc) const {
MOZ_ASSERT(JSString::isInline());
MOZ_ASSERT(hasLatin1Chars());
return d.inlineStorageLatin1;
}
MOZ_ALWAYS_INLINE
const char16_t* twoByteChars(const JS::AutoCheckCannotGC& nogc) const {
const char16_t* twoByteChars(const JS::AutoRequireNoGC& nogc) const {
MOZ_ASSERT(JSString::isInline());
MOZ_ASSERT(hasTwoByteChars());
return d.inlineStorageTwoByte;
@ -1424,28 +1424,28 @@ JSString::base() const
template<>
MOZ_ALWAYS_INLINE const char16_t*
JSLinearString::nonInlineChars(const JS::AutoCheckCannotGC& nogc) const
JSLinearString::nonInlineChars(const JS::AutoRequireNoGC& nogc) const
{
return nonInlineTwoByteChars(nogc);
}
template<>
MOZ_ALWAYS_INLINE const JS::Latin1Char*
JSLinearString::nonInlineChars(const JS::AutoCheckCannotGC& nogc) const
JSLinearString::nonInlineChars(const JS::AutoRequireNoGC& nogc) const
{
return nonInlineLatin1Chars(nogc);
}
template<>
MOZ_ALWAYS_INLINE const char16_t*
JSLinearString::chars(const JS::AutoCheckCannotGC& nogc) const
JSLinearString::chars(const JS::AutoRequireNoGC& nogc) const
{
return rawTwoByteChars();
}
template<>
MOZ_ALWAYS_INLINE const JS::Latin1Char*
JSLinearString::chars(const JS::AutoCheckCannotGC& nogc) const
JSLinearString::chars(const JS::AutoRequireNoGC& nogc) const
{
return rawLatin1Chars();
}

Просмотреть файл

@ -2347,7 +2347,7 @@ JS_GetArrayBufferViewType(JSObject* obj)
}
JS_FRIEND_API(int8_t*)
JS_GetInt8ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&)
JS_GetInt8ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&)
{
obj = CheckedUnwrap(obj);
if (!obj)
@ -2359,7 +2359,7 @@ JS_GetInt8ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCann
}
JS_FRIEND_API(uint8_t*)
JS_GetUint8ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&)
JS_GetUint8ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&)
{
obj = CheckedUnwrap(obj);
if (!obj)
@ -2371,7 +2371,7 @@ JS_GetUint8ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCan
}
JS_FRIEND_API(uint8_t*)
JS_GetUint8ClampedArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&)
JS_GetUint8ClampedArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&)
{
obj = CheckedUnwrap(obj);
if (!obj)
@ -2383,7 +2383,7 @@ JS_GetUint8ClampedArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoC
}
JS_FRIEND_API(int16_t*)
JS_GetInt16ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&)
JS_GetInt16ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&)
{
obj = CheckedUnwrap(obj);
if (!obj)
@ -2395,7 +2395,7 @@ JS_GetInt16ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCan
}
JS_FRIEND_API(uint16_t*)
JS_GetUint16ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&)
JS_GetUint16ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&)
{
obj = CheckedUnwrap(obj);
if (!obj)
@ -2407,7 +2407,7 @@ JS_GetUint16ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCa
}
JS_FRIEND_API(int32_t*)
JS_GetInt32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&)
JS_GetInt32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&)
{
obj = CheckedUnwrap(obj);
if (!obj)
@ -2419,7 +2419,7 @@ JS_GetInt32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCan
}
JS_FRIEND_API(uint32_t*)
JS_GetUint32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&)
JS_GetUint32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&)
{
obj = CheckedUnwrap(obj);
if (!obj)
@ -2431,7 +2431,7 @@ JS_GetUint32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCa
}
JS_FRIEND_API(float*)
JS_GetFloat32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&)
JS_GetFloat32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&)
{
obj = CheckedUnwrap(obj);
if (!obj)
@ -2443,7 +2443,7 @@ JS_GetFloat32ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckC
}
JS_FRIEND_API(double*)
JS_GetFloat64ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoCheckCannotGC&)
JS_GetFloat64ArrayData(JSObject* obj, bool* isSharedMemory, const JS::AutoRequireNoGC&)
{
obj = CheckedUnwrap(obj);
if (!obj)