From caa3295271b669811b4ec869c6ad2a2f092408b3 Mon Sep 17 00:00:00 2001 From: Atul Varma Date: Tue, 24 Jun 2008 19:08:35 -0700 Subject: [PATCH] Renamed the global trace() function in async.js to traceAsyncFrame(), to avoid confusing it with Logger.trace(), AsyncException.trace, and Generator.trace, all of which are also used in that file. --- services/sync/modules/async.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/sync/modules/async.js b/services/sync/modules/async.js index b02acc9d963..b50d7647b5e 100644 --- a/services/sync/modules/async.js +++ b/services/sync/modules/async.js @@ -162,7 +162,7 @@ Generator.prototype = { }, get trace() { - return "unknown (async) :: " + this.name + "\n" + trace(this._initFrame); + return "unknown (async) :: " + this.name + "\n" + traceAsyncFrame(this._initFrame); }, _handleException: function AsyncGen__handleException(e) { @@ -282,7 +282,7 @@ Generator.prototype = { this._log.error("Exception caught from onComplete handler of " + this.name + " generator"); this._log.error("Exception: " + Utils.exceptionStr(e)); - this._log.trace("Current stack trace:\n" + trace(Components.stack)); + this._log.trace("Current stack trace:\n" + traceAsyncFrame(Components.stack)); this._log.trace("Initial stack trace:\n" + this.trace); } } @@ -298,7 +298,7 @@ function formatFrame(frame) { return tmp; } -function trace(frame, str) { +function traceAsyncFrame(frame, str) { if (!str) str = ""; @@ -308,7 +308,7 @@ function trace(frame, str) { frame = frame.caller; if (frame.caller) - str = trace(frame.caller, str); + str = traceAsyncFrame(frame.caller, str); str = formatFrame(frame) + (str? "\n" : "") + str; return str;