diff --git a/toolkit/modules/AsyncShutdown.jsm b/toolkit/modules/AsyncShutdown.jsm index b6420e2d71d1..372dbcb2fb08 100644 --- a/toolkit/modules/AsyncShutdown.jsm +++ b/toolkit/modules/AsyncShutdown.jsm @@ -453,7 +453,7 @@ function Barrier(name) { frames.push(frame.filename + ":" + frame.name + ":" + frame.lineNumber); frame = frame.caller; } - let stack = Task.Debugging.generateReadableStack(frames.join("\n")); + let stack = Task.Debugging.generateReadableStack(frames.join("\n")).split("\n"); let set = this._conditions.get(condition); if (!set) { diff --git a/toolkit/modules/tests/xpcshell/test_AsyncShutdown.js b/toolkit/modules/tests/xpcshell/test_AsyncShutdown.js index 273c43e18541..90d50a46e879 100644 --- a/toolkit/modules/tests/xpcshell/test_AsyncShutdown.js +++ b/toolkit/modules/tests/xpcshell/test_AsyncShutdown.js @@ -293,8 +293,8 @@ add_task(function* test_state() { Assert.equal(state.filename, filename); Assert.equal(state.lineNumber, lineNumber + 1); Assert.equal(state.name, BLOCKER_NAME); - Assert.ok(state.stack.contains("test_state"), "The stack contains the caller function's name"); - Assert.ok(state.stack.contains(filename), "The stack contains the calling file's name"); + Assert.ok(state.stack.some(x => x.contains("test_state")), "The stack contains the caller function's name"); + Assert.ok(state.stack.some(x => x.contains(filename)), "The stack contains the calling file's name"); deferred.resolve(); yield promiseDone;