-// test the througput of the fs.WriteStream class.
+// test the throughput of the fs.WriteStream class.
var path = require('path');
var common = require('../common.js');
-// test the througput of the fs.WriteStream class.
+// test the throughput of the fs.WriteStream class.
var path = require('path');
var common = require('../common.js');
};
-// Finds the first scope in the array in which the epxression evals.
+// Finds the first scope in the array in which the expression evals.
Client.prototype._reqFramesEval = function(expression, evalFrames, cb) {
if (evalFrames.length == 0) {
// Just eval in global scope.
this.reading = false;
// a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, becuase any
+ // or on a later tick. We set this to true at first, because any
// actions that shouldn't happen until "later" should generally also
// not happen before the first write call.
this.sync = true;
this.corked = 0;
// a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, becuase any
+ // or on a later tick. We set this to true at first, because any
// actions that shouldn't happen until "later" should generally also
// not happen before the first write call.
this.sync = true;
// lib/net.js expect this value to be non-zero if write hasn't been flushed
// immediately
// TODO(indutny): rewise this solution, it might be 1 before handshake and
- // repersent real writeQueueSize during regular writes.
+ // represent real writeQueueSize during regular writes.
this._handle.writeQueueSize = 1;
var self = this;
var EventEmitter = events.EventEmitter;
var inherits = util.inherits;
-// methods that are called when trying to shut down expliclitly bound EEs
+// methods that are called when trying to shut down explicitly bound EEs
var endMethods = ['end', 'abort', 'destroy', 'destroySoon'];
// communicate with events module, but don't require that
module.exports = Module;
// Set the environ variable NODE_MODULE_CONTEXTS=1 to make node load all
-// modules in thier own context.
+// modules in their own context.
Module._contextLoad = (+process.env['NODE_MODULE_CONTEXTS'] > 0);
Module._cache = {};
Module._pathCache = {};
self.pause();
self.emit('SIGCONT');
}
- // explictly re-enable "raw mode" and move the cursor to
+ // explicitly re-enable "raw mode" and move the cursor to
// the correct position.
// See https://github.com/joyent/node/issues/3295.
self._setRawMode(true);
var path = NativeModule.require('path');
process.argv[1] = path.resolve(process.argv[1]);
- // If this is a worker in cluster mode, start up the communiction
+ // If this is a worker in cluster mode, start up the communication
// channel.
if (process.env.NODE_UNIQUE_ID) {
var cluster = NativeModule.require('cluster');
var nextTickQueue = [];
// this infoBox thing is used so that the C++ code in src/node.cc
- // can have easy accesss to our nextTick state, and avoid unnecessary
+ // can have easy access to our nextTick state, and avoid unnecessary
// calls into process._tickCallback.
// order is [length, index, inTick, lastThrew]
// Never write code like this without very good reason!
var count = 100;
var fs = require('fs');
-// person.jpg is 57kb. We just need some file that is sufficently large.
+// person.jpg is 57kb. We just need some file that is sufficiently large.
var filename = require('path').join(common.fixturesDir, 'person.jpg');
function tryToKillEventLoop() {
// path, they are sent the write end of the pipe from above.
// 3. The client is sent n JSON representations of the DATA variable, each
// with a different ordinal. We send these delimited by '\n' strings
-// so that the receiving end can avoid any coalescing that hapepns
+// so that the receiving end can avoid any coalescing that happens
// due to the stream nature of the socket (e.g. '{}{}' is not a valid
// JSON string).
// 4. The child process receives file descriptors and JSON blobs and,
-// Requires special privlages
+// Requires special privileges
var common = require('../common');
var assert = require('assert');
childSelfTerminate = true;
});
- // when child is listning
+ // when child is listening
child.on('message', function(msg) {
if (msg === 'ready') {
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
-// following condonitions:
+// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
// Spawn worker
var worker = cluster.fork();
- // When a IPC message is resicved form the worker
+ // When a IPC message is received form the worker
worker.on('message', function(message) {
check('master', message === 'message from worker');
});
checks.cluster.emitExit = true;
});
- // Check worker eventes and properties
+ // Check worker events and properties
worker.once('disconnect', function() {
checks.worker.emitDisconnect = true;
checks.worker.suicideMode = worker.suicide;
"cluster: 'exit' event before 'disconnect' event");
});
- // Check worker eventes and properties
+ // Check worker events and properties
worker.on('disconnect', function() {
results.worker_emitDisconnect += 1;
results.worker_suicideMode = worker.suicide;
"cluster: 'exit' event before 'disconnect' event");
});
- // Check worker eventes and properties
+ // Check worker events and properties
worker.on('disconnect', function() {
results.worker_emitDisconnect += 1;
results.worker_suicideMode = worker.suicide;
// this space intentionally left blank
});
req.on('error', function() {
- // this space is intentially left blank
+ // this space is intentionally left blank
});
req.on('close', function() {
server.close();
// just make a request, other tests handle responses
http.get({port: common.PORT}, function(res) {
res.resume();
- // lazy serial test, becuase we can only call end once per request
+ // lazy serial test, because we can only call end once per request
test += 1;
// do it again to test .end(Buffer);
http.get({port: common.PORT}, function(res) {
var loadFile = join(common.tmpDir, 'file.does.not.exist');
-// shold not break
+// should not break
putIn.write = function(data) {
// make sure I get a failed to load message and not some crazy error
assert.equal(data, 'Failed to load:' + loadFile + '\n');
});
//format: [to, from, result]
-// the test: ['.//g', 'f:/a', 'f://g'] is a fundimental problem
+// the test: ['.//g', 'f:/a', 'f://g'] is a fundamental problem
// url.parse('f:/a') does not have a host
-// url.resolve('f:/a', './/g') does not have a host becuase you have moved
+// url.resolve('f:/a', './/g') does not have a host because you have moved
// down to the g directory. i.e. f: //g, however when this url is parsed
// f:// will indicate that the host is g which is not the case.
// it is unclear to me how to keep this information from being lost
-// it may be that a pathname of ////g should colapse to /g but this seems
+// it may be that a pathname of ////g should collapse to /g but this seems
// to be a lot of work for an edge case. Right now I remove the test
if (relativeTests2[181][0] === './/g' &&
relativeTests2[181][1] === 'f:/a' &&
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
-// test compression/decompresion with dictionary
+// test compression/decompression with dictionary
var common = require('../common.js');
var assert = require('assert');