Backed out changeset 2572592c326d (bug 945813) for Linux64 debug xpcshell crashes.

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2013-12-03 20:35:03 -05:00
parent 1f290ef285
commit 70aeae383f
6 changed files with 2 additions and 84 deletions

View File

@ -1,50 +0,0 @@
/**
* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
var testGenerator = testSteps();
function testSteps()
{
const Bob = { ss: "237-23-7732", name: "Bob" };
let request = indexedDB.open(this.window ? window.location.pathname : "Splendid Test", 1);
request.onerror = errorHandler;
request.onupgradeneeded = grabEventAndContinueHandler;
let event = yield undefined;
let db = event.target.result;
event.target.onsuccess = continueToNextStep;
let objectStore = db.createObjectStore("foo", { keyPath: "ss" });
objectStore.createIndex("name", "name", { unique: true });
objectStore.add(Bob);
yield undefined;
// This function expression causes objectStore to be aliased, and thus
// allocated on the scope chain. Comment it out and the test passes.
// Bug 943409.
(function() { objectStore });
db.transaction("foo", "readwrite").objectStore("foo")
.index("name").openCursor().onsuccess = function(event) {
event.target.transaction.oncomplete = continueToNextStep;
let cursor = event.target.result;
if (cursor) {
let objectStore = event.target.transaction.objectStore("foo");
objectStore.delete(Bob.ss)
.onsuccess = function(event) { cursor.continue(); };
}
};
yield undefined;
finishTest();
// This workaround allows this cycle test to pass, as the data
// associated with the transaction is collected, and thus there is no
// more cycle in which the outer objectStore participates. Bug
// 943409.
gc();
yield undefined;
}

View File

@ -35,11 +35,6 @@ function testSteps()
let objectStore = db.createObjectStore("foo", { keyPath: "ss" });
objectStore.createIndex("name", "name", { unique: true });
// This function expression causes objectStore to be aliased, and thus
// allocated on the scope chain. Comment it out and the test passes.
// Bug 943409.
(function() { objectStore });
for (let i = 0; i < objectStoreData.length - 1; i++) {
objectStore.add(objectStoreData[i]);
}
@ -116,12 +111,5 @@ function testSteps()
is(sawRemoved, false, "Didn't see item that was removed");
finishTest();
// This workaround allows this cycle test to pass, as the data
// associated with the transaction is collected, and thus there is no
// more cycle in which the outer objectStore participates. Bug
// 943409.
gc();
yield undefined;
}

View File

@ -34,17 +34,10 @@ function testSteps()
event.target.onsuccess = continueToNextStep;
// Bug 943409.
var bug943409 = [];
(function () { bug943409 })();
for (let objectStoreIndex in objectStoreData) {
const objectStoreInfo = objectStoreData[objectStoreIndex];
let objectStore = db.createObjectStore(objectStoreInfo.name,
objectStoreInfo.options);
bug943409.push(objectStore);
for (let indexIndex in indexData) {
const indexInfo = indexData[indexIndex];
let index = objectStore.createIndex(indexInfo.name,
@ -148,7 +141,5 @@ function testSteps()
}
finishTest();
// Bug 943409.
gc();
yield undefined;
}

View File

@ -18,18 +18,11 @@ function testSteps()
let db = event.target.result;
db.onerror = errorHandler;
// Bug 943409.
var bug943409 = [];
(function () { bug943409 })();
for each (let autoIncrement in [false, true]) {
let objectStore =
db.createObjectStore(autoIncrement, { keyPath: "id",
autoIncrement: autoIncrement });
// Bug 943409.
bug943409.push(objectStore);
for (let i = 0; i < 10; i++) {
objectStore.add({ id: i, index: i });
}
@ -170,7 +163,5 @@ function testSteps()
}
finishTest();
// Bug 943409.
gc();
yield undefined;
}

View File

@ -21,7 +21,6 @@ support-files =
[test_create_index.js]
[test_create_index_with_integer_keys.js]
[test_create_objectStore.js]
[test_cursor_cycle.js]
[test_cursor_mutation.js]
[test_cursor_update_updates_indexes.js]
[test_cursors.js]

View File

@ -2724,13 +2724,12 @@ void
nsCycleCollector::ShutdownCollect()
{
SliceBudget unlimitedBudget;
uint32_t i;
for (i = 0; i < DEFAULT_SHUTDOWN_COLLECTIONS; ++i) {
for (uint32_t i = 0; i < DEFAULT_SHUTDOWN_COLLECTIONS; ++i) {
NS_ASSERTION(i < NORMAL_SHUTDOWN_COLLECTIONS, "Extra shutdown CC");
if (!Collect(ShutdownCC, unlimitedBudget, nullptr)) {
break;
}
}
NS_ASSERTION(i < NORMAL_SHUTDOWN_COLLECTIONS, "Extra shutdown CC");
}
static void