Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2014-11-22 18:59:48 +0300
committerBen Noordhuis <info@bnoordhuis.nl>2014-11-22 19:23:30 +0300
commit21130c7d6fcaee666f33735768c060be2e06614a (patch)
tree0148a92dd9e6fb13ab6fac3311bd96d926f313fc /lib/console.js
parent963f5e8a886841d69e79fdc46aaa0010126408e8 (diff)
lib: turn on strict mode
Turn on strict mode for the files in the lib/ directory. It helps catch bugs and can have a positive effect on performance. PR-URL: https://github.com/node-forward/node/pull/64 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'lib/console.js')
-rw-r--r--lib/console.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/console.js b/lib/console.js
index 2a09329595d..ff7fd4dadb5 100644
--- a/lib/console.js
+++ b/lib/console.js
@@ -19,6 +19,8 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
+'use strict';
+
var util = require('util');
function Console(stdout, stderr) {
@@ -89,13 +91,13 @@ Console.prototype.timeEnd = function(label) {
};
-Console.prototype.trace = function() {
+Console.prototype.trace = function trace() {
// TODO probably can to do this better with V8's debug object once that is
// exposed.
var err = new Error;
err.name = 'Trace';
err.message = util.format.apply(this, arguments);
- Error.captureStackTrace(err, arguments.callee);
+ Error.captureStackTrace(err, trace);
this.error(err.stack);
};