mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1142816 - js/src/jsapi-tests/testGCHeapPostBarriers.cpp has leaks. r=erahm
This commit is contained in:
parent
661520ca49
commit
7816efe925
@ -8,6 +8,8 @@
|
||||
#include "js/RootingAPI.h"
|
||||
#include "jsapi-tests/tests.h"
|
||||
|
||||
using mozilla::ScopedDeletePtr;
|
||||
|
||||
BEGIN_TEST(testGCHeapPostBarriers)
|
||||
{
|
||||
#ifdef JS_GC_ZEAL
|
||||
@ -44,8 +46,8 @@ TestHeapPostBarriers(T initialObj)
|
||||
CHECK(js::gc::IsInsideNursery(initialObj));
|
||||
|
||||
/* Construct Heap<> wrapper. */
|
||||
JS::Heap<T>* heapData = new JS::Heap<T>();
|
||||
CHECK(heapData);
|
||||
ScopedDeletePtr<JS::Heap<T>> heapData(new JS::Heap<T>);
|
||||
CHECK(heapData.get());
|
||||
CHECK(Passthrough(heapData->get() == nullptr));
|
||||
*heapData = initialObj;
|
||||
|
||||
@ -64,7 +66,6 @@ TestHeapPostBarriers(T initialObj)
|
||||
CHECK(value.isInt32());
|
||||
CHECK(value.toInt32() == 42);
|
||||
|
||||
delete heapData;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user