This commit is contained in:
Ryan VanderMeulen 2013-04-19 13:44:55 -04:00
Родитель b79b47e80f 6db182f678
Коммит d9c53ec2c8
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -89,7 +89,8 @@ function checkTools() {
for (let tool of toolsPref) { for (let tool of toolsPref) {
prefNodes.push(tool); prefNodes.push(tool);
} }
toggleTools(); // Wait for the next turn of the event loop to avoid stack overflow errors.
executeSoon(toggleTools);
} }
function toggleTools() { function toggleTools() {
@ -113,7 +114,8 @@ function checkUnregistered(event, data) {
// checking tab on the toolbox // checking tab on the toolbox
ok(!doc.getElementById("toolbox-tab-" + data), "Tab removed for " + data); ok(!doc.getElementById("toolbox-tab-" + data), "Tab removed for " + data);
index++; index++;
toggleTools(); // Wait for the next turn of the event loop to avoid stack overflow errors.
executeSoon(toggleTools);
return; return;
} }
ok(false, "Something went wrong, " + data + " was not unregistered"); ok(false, "Something went wrong, " + data + " was not unregistered");
@ -126,7 +128,8 @@ function checkRegistered(event, data) {
// checking tab on the toolbox // checking tab on the toolbox
ok(doc.getElementById("toolbox-tab-" + data), "Tab added back for " + data); ok(doc.getElementById("toolbox-tab-" + data), "Tab added back for " + data);
index++; index++;
toggleTools(); // Wait for the next turn of the event loop to avoid stack overflow errors.
executeSoon(toggleTools);
return; return;
} }
ok(false, "Something went wrong, " + data + " was not registered back"); ok(false, "Something went wrong, " + data + " was not registered back");