From f115dfc0b9ce9435b334992452b60049c4adec2b Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Wed, 17 Jun 2015 11:42:00 -0600 Subject: [PATCH] buffer: minor cleanup from rebase PR-URL: https://github.com/nodejs/io.js/pull/2003 Reviewed-By: Chris Dickinson --- lib/internal/buffer_new.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/internal/buffer_new.js b/lib/internal/buffer_new.js index 4bbb1a57a039b5..3b3a2006146663 100644 --- a/lib/internal/buffer_new.js +++ b/lib/internal/buffer_new.js @@ -457,16 +457,7 @@ Buffer.prototype.write = function(string, offset, length, encoding) { // XXX legacy write(string, encoding, offset, length) - remove in v0.13 } else { - if (!writeWarned) { - if (process.throwDeprecation) - throw new Error(writeMsg); - else if (process.traceDeprecation) - console.trace(writeMsg); - else - console.error(writeMsg); - writeWarned = true; - } - + writeWarned = internalUtil.printDeprecationMessage(writeMsg, writeWarned); var swap = encoding; encoding = offset; offset = length >>> 0;