зеркало из https://github.com/mozilla/gecko-dev.git
Call dumpArray() after deleting array, to see if all objects are properly deleted.
This commit is contained in:
Родитель
a8b0f50343
Коммит
2554d099dd
|
@ -164,6 +164,7 @@ public class TestArray {
|
|||
System.out.println("release array:");
|
||||
array = null;
|
||||
System.gc();
|
||||
dumpArray(array, 0, null, 0);
|
||||
|
||||
componentManager = null;
|
||||
System.gc();
|
||||
|
@ -190,7 +191,9 @@ public class TestArray {
|
|||
static void dumpArray(nsIMutableArray aArray, int aExpectedCount,
|
||||
int[] aElementIDs, int aExpectedTotal)
|
||||
{
|
||||
int count = aArray.getLength();
|
||||
int count = 0;
|
||||
if (aArray != null)
|
||||
count = aArray.getLength();
|
||||
|
||||
System.out.println("object count " + Foo.gCount + " = " + aExpectedTotal +
|
||||
" " + assertEqual(Foo.gCount, aExpectedTotal));
|
||||
|
|
Загрузка…
Ссылка в новой задаче