mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 868799 part 2. Disallow copy-construction of typed array structs, so people can't accidentally pass them by value and end up unrooted. r=smaug
This commit is contained in:
parent
b3c31c681b
commit
b208c4d50c
@ -23,11 +23,18 @@ struct TypedArrayObjectStorage : AllTypedArraysBase {
|
||||
protected:
|
||||
JSObject* mObj;
|
||||
|
||||
TypedArrayObjectStorage()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
inline void TraceSelf(JSTracer* trc)
|
||||
{
|
||||
JS_CallObjectTracer(trc, &mObj, "TypedArray.mObj");
|
||||
}
|
||||
|
||||
private:
|
||||
TypedArrayObjectStorage(const TypedArrayObjectStorage&) MOZ_DELETE;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -90,6 +97,9 @@ protected:
|
||||
{
|
||||
mObj = UnboxArray(obj, &mLength, &mData);
|
||||
}
|
||||
|
||||
private:
|
||||
TypedArray_base(const TypedArray_base&) MOZ_DELETE;
|
||||
};
|
||||
|
||||
|
||||
@ -143,6 +153,8 @@ private:
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
TypedArray(const TypedArray&) MOZ_DELETE;
|
||||
};
|
||||
|
||||
typedef TypedArray<int8_t, JS_GetInt8ArrayData, JS_GetObjectAsInt8Array,
|
||||
|
Loading…
Reference in New Issue
Block a user