зеркало из https://github.com/mozilla/gecko-dev.git
Bug 620101 - Intermittent failing in test_nsIProcess.js | TEST-UNEXPECTED-FAIL | Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIProcess.run]; r=glandium,a=test-only fix
This commit is contained in:
Родитель
3e427b29db
Коммит
93e1b98628
|
@ -235,6 +235,8 @@ function test_notify_killed()
|
|||
function test_kill_2()
|
||||
{
|
||||
var file = get_test_program("TestQuickReturn");
|
||||
var thread = Components.classes["@mozilla.org/thread-manager;1"]
|
||||
.getService().currentThread;
|
||||
|
||||
for (var i = 0; i < 1000; i++) {
|
||||
var process = Components.classes["@mozilla.org/process/util;1"]
|
||||
|
@ -248,6 +250,12 @@ function test_kill_2()
|
|||
}
|
||||
catch (e) { }
|
||||
}
|
||||
|
||||
// We need to ensure that we process any events on the main thread -
|
||||
// this allow threads to clean up properly and avoid out of memory
|
||||
// errors during the test.
|
||||
while (thread.hasPendingEvents())
|
||||
thread.processNextEvent(false);
|
||||
}
|
||||
|
||||
function run_test() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче