зеркало из https://github.com/mozilla/gecko-dev.git
Bug 968616 - Hide the explicitly unsafe things we do for testing from the hazard analysis; r=sfink
This commit is contained in:
Родитель
79cd1362c3
Коммит
e02e6aeb19
|
@ -23,10 +23,13 @@ BEGIN_TEST(testGCStoreBufferRemoval)
|
|||
CHECK(!js::gc::IsInsideNursery(rt, obj.get()));
|
||||
JS::RootedObject tenuredObject(cx, obj);
|
||||
|
||||
// Hide the horrors herein from the static rooting analysis.
|
||||
typedef JSObject *ObjectPtr;
|
||||
|
||||
// Test removal of store buffer entries added by RelocatablePtr<T>.
|
||||
{
|
||||
JSObject *badObject = reinterpret_cast<JSObject*>(1);
|
||||
JSObject *punnedPtr = nullptr;
|
||||
ObjectPtr badObject = reinterpret_cast<JSObject*>(1);
|
||||
ObjectPtr punnedPtr = nullptr;
|
||||
RelocatablePtrObject* relocPtr =
|
||||
reinterpret_cast<RelocatablePtrObject*>(&punnedPtr);
|
||||
new (relocPtr) RelocatablePtrObject;
|
||||
|
@ -77,8 +80,8 @@ BEGIN_TEST(testGCStoreBufferRemoval)
|
|||
|
||||
// Test removal of store buffer entries added by Heap<T>.
|
||||
{
|
||||
JSObject *badObject = reinterpret_cast<JSObject*>(1);
|
||||
JSObject *punnedPtr = nullptr;
|
||||
ObjectPtr badObject = reinterpret_cast<JSObject*>(1);
|
||||
ObjectPtr punnedPtr = nullptr;
|
||||
Heap<JSObject*>* heapPtr =
|
||||
reinterpret_cast<Heap<JSObject*>*>(&punnedPtr);
|
||||
new (heapPtr) Heap<JSObject*>;
|
||||
|
|
Загрузка…
Ссылка в новой задаче