blob: dc27d7bc1c9c7437599d83cf23d41bd31518455a [file] [log] [blame]
description("Ensures that window.internals.observegc works as expected");
var observers = [];
for (let i = 0; i < 1000; ++i) {
let testObject = { testProperty : "testValue" };
let observer = internals.observeGC(testObject);
observers.push(observer);
testObject = null;
}
gc();
var anyCollected = false;
for (let observer of observers) {
if (observer.wasCollected)
anyCollected = true;
}
shouldBe('anyCollected', 'true');