Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

replace sys => util for node 0.3.0

  • Loading branch information...
commit 86b0b01287cad5efe8292bb47030eee0c533495d 1 parent d7ee94f
Scott Taylor smtlaissezfaire authored
2  lib/ndb/commands/evaluate.js
View
@@ -18,7 +18,7 @@ var construct_expression = function(expr) {
str += "if (typeof(require) === 'undefined') { \n";
str += " " + expr + " \n";
str += "} else { \n";
- str += " require('sys').inspect(" + expr + "); \n";
+ str += " require('util').inspect(" + expr + "); \n";
str += "} \n";
return str;
};
2  lib/ndb/event_listener.js
View
@@ -1,5 +1,5 @@
var ndb = require("ndb"),
- sys = require("sys");
+ sys = require("util");
exports.reset = function() {
this.buffer = "";
2  lib/ndb/helpers.js
View
@@ -1,4 +1,4 @@
-var sys = require("sys"),
+var sys = require("util"),
tcp = require("net"),
child_process = require("child_process");
ndb = require("ndb");
2  lib/vendor/js-opts/example1.js
View
@@ -22,7 +22,7 @@
*/
var opts = require('./opts')
- , puts = require('sys').puts;
+ , puts = require('util').puts;
var options = [
{ short : 'v'
2  lib/vendor/js-opts/example2.js
View
@@ -10,7 +10,7 @@
*/
var opts = require('./opts')
- , puts = require('sys').puts
+ , puts = require('util').puts
, host = 'localhost'; // default host value
var options = [
2  lib/vendor/js-opts/example4.js
View
@@ -7,7 +7,7 @@
*/
var opts = require('./opts')
- , puts = require('sys').puts
+ , puts = require('util').puts
, host = 'localhost'; // default host value
// Example of using some library in the same app
4 lib/vendor/js-opts/opts.js
View
@@ -34,7 +34,7 @@ of the authors and should not be interpreted as representing official policies,
either expressed or implied, of Joey Mazzarelli.
***************************************************************************/
-var puts = require('sys').puts
+var puts = require('util').puts
, values = {}
, args = {}
, argv = []
@@ -226,7 +226,7 @@ exports.args = function () {
* @return string Value of arg
*/
exports.arg = function (name) {
- //puts(require('sys').inspect(arguments));
+ //puts(require('util').inspect(arguments));
return args[name];
};
2  spec/fixtures/backtrace_one.js
View
@@ -1 +1 @@
-{"seq":13,"type":"response","command":"backtrace","success":true,"body":{"fromFrame":0,"toFrame":6,"totalFrames":6,"frames":[{"type":"frame","index":0,"receiver":{"ref":1},"func":{"ref":0},"script":{"ref":12},"constructCall":false,"debuggerFrame":false,"arguments":[{"name":"exports","value":{"ref":1}},{"name":"require","value":{"ref":6}},{"name":"module","value":{"ref":7}},{"name":"__filename","value":{"ref":9}},{"name":"__dirname","value":{"ref":10}}],"locals":[],"position":148,"line":3,"column":0,"sourceLineText":"require(\"./espionage/lib/espionage\");","scopes":[{"type":1,"index":0},{"type":0,"index":1}],"text":"#00 #<an Object>.[anonymous](exports=#<an Object>, require=function require(path) {\n return loadModule(path, self);\n }, module=#<a Module>, __filename=/Users/scotttaylor/src/git/ndb/spec/node.js, __dirname=/Users/scotttaylor/src/git/ndb/spec) /Users/scotttaylor/src/git/ndb/spec/node.js line 4 column 1 (position 149)"},{"type":"frame","index":1,"receiver":{"ref":7},"func":{"ref":13},"script":{"ref":15},"constructCall":false,"debuggerFrame":false,"arguments":[{"name":"content","value":{"ref":16}},{"name":"filename","value":{"ref":9}}],"locals":[{"name":"require","value":{"ref":6}},{"name":"dirName","value":{"ref":10}},{"name":"requireAsync","value":{"ref":17}},{"name":"compiledWrapper","value":{"ref":0}},{"name":"wrapper","value":{"ref":18}},{"name":"ext","value":{"ref":19}},{"name":"self","value":{"ref":7}}],"position":9265,"line":383,"column":22,"sourceLineText":" compiledWrapper.apply(self.exports, [self.exports, require, self, filename, dirName]);","scopes":[{"type":1,"index":0},{"type":3,"index":1},{"type":0,"index":2}],"text":"#01 #<a Module>._compile(content=require.paths.unshift(\"./lib/\");\n\nrequire(\"./jspec_dot_reporter/jspec_dot_report... (length: 1374), filename=/Users/scotttaylor/src/git/ndb/spec/node.js) module line 384 column 23 (position 9266)"},{"type":"frame","index":2,"receiver":{"ref":7},"func":{"ref":21},"script":{"ref":15},"constructCall":false,"debuggerFrame":false,"arguments":[{"name":"filename","value":{"ref":9}}],"locals":[{"name":"e","value":{"ref":3}},{"name":"content","value":{"ref":16}}],"position":9516,"line":392,"column":15,"sourceLineText":" var e = this._compile(content, filename);","scopes":[{"type":1,"index":0},{"type":3,"index":1},{"type":0,"index":2}],"text":"#02 #<a Module>._loadScriptSync(filename=/Users/scotttaylor/src/git/ndb/spec/node.js) module line 393 column 16 (position 9517)"},{"type":"frame","index":3,"receiver":{"ref":7},"func":{"ref":22},"script":{"ref":15},"constructCall":false,"debuggerFrame":false,"arguments":[{"name":"filename","value":{"ref":9}}],"locals":[],"position":7158,"line":295,"column":9,"sourceLineText":" this._loadScriptSync(filename);","scopes":[{"type":1,"index":0},{"type":3,"index":1},{"type":0,"index":2}],"text":"#03 #<a Module>.loadSync(filename=/Users/scotttaylor/src/git/ndb/spec/node.js) module line 296 column 10 (position 7159)"},{"type":"frame","index":4,"receiver":{"ref":23},"func":{"ref":24},"script":{"ref":15},"constructCall":false,"debuggerFrame":false,"arguments":[],"locals":[{"name":"cwd","value":{"ref":25}}],"position":11105,"line":458,"column":21,"sourceLineText":" process.mainModule.loadSync(process.argv[1]);","scopes":[{"type":1,"index":0},{"type":3,"index":1},{"type":0,"index":2}],"text":"#04 #<an Object>.runMain() module line 459 column 22 (position 11106)"},{"type":"frame","index":5,"receiver":{"ref":26},"func":{"ref":27},"script":{"ref":29},"constructCall":false,"debuggerFrame":false,"arguments":[{"name":"process","value":{"ref":30}}],"locals":[{"name":"removed","value":{"ref":31}},{"name":"process","value":{"ref":30}},{"name":"stdout","value":{"ref":3}},{"name":"stdin","value":{"ref":3}},{"name":"nextTickQueue","value":{"ref":32}},{"name":"addTimerListener","value":{"ref":33}},{"name":"evalcxMsg","value":{"ref":3}},{"name":"isSignal","value":{"ref":34}},{"name":"module","value":{"ref":23}}],"position":4676,"line":167,"column":7,"sourceLineText":"module.runMain();","scopes":[{"type":1,"index":0},{"type":0,"index":1}],"text":"#05 [anonymous](process=#<an EventEmitter>) node.js line 168 column 8 (position 4677)"}]},"refs":[{"handle":1,"type":"object","className":"Object","constructorFunction":{"ref":2},"protoObject":{"ref":4},"prototypeObject":{"ref":3},"properties":[],"text":"#<an Object>"},{"handle":0,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":39},"name":"","inferredName":"","resolved":true,"source":"function (exports, require, module, __filename, __dirname) { require.paths.unshift(\"./lib/\");\n\nrequire(\"./jspec_dot_reporter/jspec_dot_reporter\");\nrequire(\"./espionage/lib/espionage\");\nrequire(\"./underscore/underscore\");\nrequire('./jspec/lib/jspec');\nrequire('./unit/spec.helper');\n\n\nspy = Espionage;\n\nJSpec.include({\n beforeSpec: function() {\n spy.tearDown();\n },\n\n afterSpec: function() {\n spy.tearDown();\n }\n});\n\nJSpec.\n exec(\"spec/unit/node_spec.js\").\n exec('spec/unit/spec.js').\n exec('spec/unit/ndb.js').\n exec('spec/unit/command_center.js').\n exec('spec/unit/event_listener.js').\n exec('spec/unit/event_listeners/break.js').\n exec('spec/unit/event_listeners/source.js').\n exec('spec/unit/commands/raw_write.js').\n exec('spec/unit/commands/help.js').\n exec('spec/unit/commands/list.js').\n exec('spec/unit/commands/continue.js').\n exec('spec/unit/commands/step_in.js').\n exec('spec/unit/commands/setbreakpoint.js').\n exec('spec/unit/commands/quit.js').\n exec('spec/unit/commands/version.js').\n exec('spec/unit/commands/evaluate.js').\n exec('spec/unit/commands/next.js').\n exec('spec/unit/commands/verbose.js').\n exec('spec/unit/commands/backtrace.js').\n exec('spec/unit/commands/scripts.js').\n exec('spec/unit/message_parser.js').\n exec('spec/unit/state.js').\n exec('spec/unit/option_parser/option_parser_spec.js').\n run({ reporter: JSpecDotReporter, fixturePath: 'spec/fixtures' }).\n report();\n\n}","script":{"ref":12},"scriptId":21,"position":10,"line":0,"column":10,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":216},{"name":"length","attributes":7,"propertyType":3,"ref":41},{"name":"name","attributes":7,"propertyType":3,"ref":42},{"name":"prototype","attributes":6,"propertyType":3,"ref":39},{"name":"caller","attributes":7,"propertyType":3,"ref":13}],"text":"function (exports, require, module, __filename, __dirname) { require.paths.unshift(\"./lib/\");\n\nrequire(\"./jspec_dot_reporter/jspec_dot_reporter\");\nrequire(\"./espionage/lib/espionage\");\nrequire(\"./underscore/underscore\");\nrequire('./jspec/lib/jspec');\nrequire('./unit/spec.helper');\n\n\nspy = Espionage;\n\nJSpec.include({\n beforeSpec: function() {\n spy.tearDown();\n },\n\n afterSpec: function() {\n spy.tearDown();\n }\n});\n\nJSpec.\n exec(\"spec/unit/node_spec.js\").\n exec('spec/unit/spec.js').\n exec('spec/unit/ndb.js').\n exec('spec/unit/command_center.js').\n exec('spec/unit/event_listener.js').\n exec('spec/unit/event_listeners/break.js').\n exec('spec/unit/event_listeners/source.js').\n exec('spec/unit/commands/raw_write.js').\n exec('spec/unit/commands/help.js').\n exec('spec/unit/commands/list.js').\n exec('spec/unit/commands/continue.js').\n exec('spec/unit/commands/step_in.js').\n exec('spec/unit/commands/setbreakpoint.js').\n exec('spec/unit/commands/quit.js').\n exec('spec/unit/commands/version.js').\n exec('spec/unit/commands/evaluate.js').\n exec('spec/unit/commands/next.js').\n exec('spec/unit/commands/verbose.js').\n exec('spec/unit/commands/backtrace.js').\n exec('spec/unit/commands/scripts.js').\n exec('spec/unit/message_parser.js').\n exec('spec/unit/state.js').\n exec('spec/unit/option_parser/option_parser_spec.js').\n run({ reporter: JSpecDotReporter, fixturePath: 'spec/fixtures' }).\n report();\n\n}"},{"handle":12,"type":"script","name":"/Users/scotttaylor/src/git/ndb/spec/node.js","id":21,"lineOffset":0,"columnOffset":0,"lineCount":49,"sourceStart":"(function (exports, require, module, __filename, __dirname) { require.paths.unsh","sourceLength":1440,"scriptType":2,"compilationType":0,"context":{"ref":11},"text":"/Users/scotttaylor/src/git/ndb/spec/node.js (lines: 49)"},{"handle":6,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":43},"name":"require","inferredName":"","resolved":true,"source":"function require(path) {\n return loadModule(path, self);\n }","script":{"ref":15},"scriptId":15,"position":8650,"line":362,"column":19,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":5},{"name":"length","attributes":7,"propertyType":3,"ref":44},{"name":"name","attributes":7,"propertyType":3,"ref":45},{"name":"main","propertyType":1,"ref":7},{"name":"paths","propertyType":1,"ref":46},{"name":"prototype","attributes":6,"propertyType":3,"ref":43},{"name":"caller","attributes":7,"propertyType":3,"ref":5},{"name":"registerExtension","propertyType":1,"ref":47},{"name":"async","propertyType":1,"ref":17}],"text":"function require(path) {\n return loadModule(path, self);\n }"},{"handle":7,"type":"object","className":"Object","constructorFunction":{"ref":8},"protoObject":{"ref":20},"prototypeObject":{"ref":3},"properties":[{"name":"filename","propertyType":1,"ref":9},{"name":"children","propertyType":1,"ref":48},{"name":"id","propertyType":1,"ref":49},{"name":"exited","propertyType":1,"ref":50},{"name":"loaded","propertyType":1,"ref":50},{"name":"moduleCache","propertyType":1,"ref":51},{"name":"parent","propertyType":1,"ref":3},{"name":"exports","propertyType":1,"ref":1}],"text":"#<a Module>"},{"handle":9,"type":"string","value":"/Users/scotttaylor/src/git/ndb/spec/node.js","length":43,"text":"/Users/scotttaylor/src/git/ndb/spec/node.js"},{"handle":10,"type":"string","value":"/Users/scotttaylor/src/git/ndb/spec","length":35,"text":"/Users/scotttaylor/src/git/ndb/spec"},{"handle":13,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":52},"name":"","inferredName":"Module._compile","resolved":true,"source":"function (content, filename) {\n var self = this;\n // remove shebang\n content = content.replace(/^\\#\\!.*/, '');\n\n // Compile content if needed\n var ext = path.extname(filename);\n if (extensionCache[ext]) {\n content = extensionCache[ext](content);\n }\n\n function requireAsync (url, cb) {\n loadModule(url, self, cb);\n }\n\n function require (path) {\n return loadModule(path, self);\n }\n\n require.paths = modulePaths;\n require.async = requireAsync;\n require.main = process.mainModule;\n require.registerExtension = registerExtension;\n\n\n if ('string' === typeof content) {\n // create wrapper function\n var wrapper = \"(function (exports, require, module, __filename, __dirname) { \"\n + content\n + \"\\n});\";\n\n var compiledWrapper = process.compile(wrapper, filename);\n var dirName = path.dirname(filename);\n if (filename === process.argv[1]) {\n process.checkBreak();\n }\n compiledWrapper.apply(self.exports, [self.exports, require, self, filename, dirName]);\n } else {\n self.exports = content;\n }\n}","script":{"ref":15},"scriptId":15,"position":8308,"line":347,"column":37,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":217},{"name":"length","attributes":7,"propertyType":3,"ref":54},{"name":"name","attributes":7,"propertyType":3,"ref":42},{"name":"prototype","attributes":6,"propertyType":3,"ref":52},{"name":"caller","attributes":7,"propertyType":3,"ref":21}],"text":"function (content, filename) {\n var self = this;\n // remove shebang\n content = content.replace(/^\\#\\!.*/, '');\n\n // Compile content if needed\n var ext = path.extname(filename);\n if (extensionCache[ext]) {\n content = extensionCache[ext](content);\n }\n\n function requireAsync (url, cb) {\n loadModule(url, self, cb);\n }\n\n function require (path) {\n return loadModule(path, self);\n }\n\n require.paths = modulePaths;\n require.async = requireAsync;\n require.main = process.mainModule;\n require.registerExtension = registerExtension;\n\n\n if ('string' === typeof content) {\n // create wrapper function\n var wrapper = \"(function (exports, require, module, __filename, __dirname) { \"\n + content\n + \"\\n});\";\n\n var compiledWrapper = process.compile(wrapper, filename);\n var dirName = path.dirname(filename);\n if (filename === process.argv[1]) {\n process.checkBreak();\n }\n compiledWrapper.apply(self.exports, [self.exports, require, self, filename, dirName]);\n } else {\n self.exports = content;\n }\n}"},{"handle":15,"type":"script","name":"module","id":15,"lineOffset":0,"columnOffset":0,"lineCount":462,"sourceStart":"(function (exports) {/**********************************************************","sourceLength":11137,"scriptType":2,"compilationType":0,"context":{"ref":14},"text":"module (lines: 462)"},{"handle":16,"type":"string","value":"require.paths.unshift(\"./lib/\");\n\nrequire(\"./jspec_dot_reporter/jspec_dot_report... (length: 1374)","fromIndex":0,"toIndex":80,"length":1374,"text":"require.paths.unshift(\"./lib/\");\n\nrequire(\"./jspec_dot_reporter/jspec_dot_report... (length: 1374)"},{"handle":17,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":55},"name":"requireAsync","inferredName":"","resolved":true,"source":"function requireAsync(url, cb) {\n loadModule(url, self, cb);\n }","script":{"ref":15},"scriptId":15,"position":8583,"line":358,"column":24,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":5},{"name":"length","attributes":7,"propertyType":3,"ref":54},{"name":"name","attributes":7,"propertyType":3,"ref":56},{"name":"prototype","attributes":6,"propertyType":3,"ref":55},{"name":"caller","attributes":7,"propertyType":3,"ref":5}],"text":"function requireAsync(url, cb) {\n loadModule(url, self, cb);\n }"},{"handle":18,"type":"string","value":"(function (exports, require, module, __filename, __dirname) { require.paths.unsh... (length: 1440)","fromIndex":0,"toIndex":80,"length":1440,"text":"(function (exports, require, module, __filename, __dirname) { require.paths.unsh... (length: 1440)"},{"handle":19,"type":"string","value":".js","length":3,"text":".js"},{"handle":21,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":57},"name":"","inferredName":"Module._loadScriptSync","resolved":true,"source":"function (filename) {\n var content = requireNative('fs').readFileSync(filename);\n var e = this._compile(content, filename);\n if (e) {\n throw e;\n } else {\n this.loaded = true;\n }\n}","script":{"ref":15},"scriptId":15,"position":9428,"line":390,"column":44,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":218},{"name":"length","attributes":7,"propertyType":3,"ref":44},{"name":"name","attributes":7,"propertyType":3,"ref":42},{"name":"prototype","attributes":6,"propertyType":3,"ref":57},{"name":"caller","attributes":7,"propertyType":3,"ref":22}],"text":"function (filename) {\n var content = requireNative('fs').readFileSync(filename);\n var e = this._compile(content, filename);\n if (e) {\n throw e;\n } else {\n this.loaded = true;\n }\n}"},{"handle":3,"type":"undefined","text":"undefined"},{"handle":22,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":59},"name":"","inferredName":"Module.loadSync","resolved":true,"source":"function (filename) {\n ;\n\n process.assert(!this.loaded);\n this.filename = filename;\n\n if (filename.match(/\\.node$/)) {\n this._loadObjectSync(filename);\n } else {\n this._loadScriptSync(filename);\n }\n}","script":{"ref":15},"scriptId":15,"position":6988,"line":286,"column":37,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":219},{"name":"length","attributes":7,"propertyType":3,"ref":44},{"name":"name","attributes":7,"propertyType":3,"ref":42},{"name":"prototype","attributes":6,"propertyType":3,"ref":59},{"name":"caller","attributes":7,"propertyType":3,"ref":24}],"text":"function (filename) {\n ;\n\n process.assert(!this.loaded);\n this.filename = filename;\n\n if (filename.match(/\\.node$/)) {\n this._loadObjectSync(filename);\n } else {\n this._loadScriptSync(filename);\n }\n}"},{"handle":23,"type":"object","className":"Object","constructorFunction":{"ref":2},"protoObject":{"ref":4},"prototypeObject":{"ref":3},"properties":[{"name":"runMain","propertyType":1,"ref":24},{"name":"requireNative","propertyType":1,"ref":61}],"text":"#<an Object>"},{"handle":24,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":62},"name":"","inferredName":"exports.runMain","resolved":true,"source":"function () {\n var cwd = process.cwd();\n\n // Make process.argv[0] and process.argv[1] into full paths.\n if (process.argv[0].indexOf('/') > 0) {\n process.argv[0] = path.join(cwd, process.argv[0]);\n }\n\n if (process.argv[1].charAt(0) != \"/\" && !(/^http:\\/\\//).exec(process.argv[1])) {\n process.argv[1] = path.join(cwd, process.argv[1]);\n }\n\n // Load the main module--the command line argument.\n process.mainModule = new Module(\".\");\n process.mainModule.loadSync(process.argv[1]);\n}","script":{"ref":15},"scriptId":15,"position":10649,"line":444,"column":27,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":220},{"name":"length","attributes":7,"propertyType":3,"ref":64},{"name":"name","attributes":7,"propertyType":3,"ref":42},{"name":"prototype","attributes":6,"propertyType":3,"ref":62},{"name":"caller","attributes":7,"propertyType":3,"ref":27}],"text":"function () {\n var cwd = process.cwd();\n\n // Make process.argv[0] and process.argv[1] into full paths.\n if (process.argv[0].indexOf('/') > 0) {\n process.argv[0] = path.join(cwd, process.argv[0]);\n }\n\n if (process.argv[1].charAt(0) != \"/\" && !(/^http:\\/\\//).exec(process.argv[1])) {\n process.argv[1] = path.join(cwd, process.argv[1]);\n }\n\n // Load the main module--the command line argument.\n process.mainModule = new Module(\".\");\n process.mainModule.loadSync(process.argv[1]);\n}"},{"handle":25,"type":"string","value":"/Users/scotttaylor/src/git/ndb","length":30,"text":"/Users/scotttaylor/src/git/ndb"},{"handle":26,"type":"object","className":"global","constructorFunction":{"ref":2},"protoObject":{"ref":35},"prototypeObject":{"ref":3},"properties":[],"text":"#<an Object>"},{"handle":27,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":65},"name":"","inferredName":"","resolved":true,"source":"function (process) {\n\nprocess.global.process = process;\nprocess.global.global = process.global;\nglobal.GLOBAL = global;\n\n/** deprecation errors ************************************************/\n\nfunction removed (reason) {\n return function () {\n throw new Error(reason)\n }\n}\n\nGLOBAL.__module = removed(\"'__module' has been renamed to 'module'\");\nGLOBAL.include = removed(\"include(module) has been removed. Use require(module)\");\nGLOBAL.puts = removed(\"puts() has moved. Use require('sys') to bring it back.\");\nGLOBAL.print = removed(\"print() has moved. Use require('sys') to bring it back.\");\nGLOBAL.p = removed(\"p() has moved. Use require('sys') to bring it back.\");\nprocess.debug = removed(\"process. has moved. Use require('sys') to bring it back.\");\nprocess.error = removed(\"process.error() has moved. Use require('sys') to bring it back.\");\nprocess.watchFile = removed(\"process.watchFile() has moved to fs.watchFile()\");\nprocess.unwatchFile = removed(\"process.unwatchFile() has moved to fs.unwatchFile()\");\nprocess.mixin = removed('process.mixin() has been removed.');\nprocess.createChildProcess = removed(\"childProcess API has changed. See doc/api.txt.\");\nprocess.inherits = removed(\"process.inherits() has moved to sys.inherits.\");\n\nprocess.assert = function (x, msg) {\n if (!x) throw new Error(msg || \"assertion error\");\n};\n\nvar evalcxMsg;\nprocess.evalcx = function () {\n if (!evalcxMsg) {\n process.binding('stdio').writeError(evalcxMsg =\n \"process.evalcx is deprecated. Use Script.runInNewContext instead.\\n\");\n }\n return process.binding('evals').Script\n .runInNewContext.apply(null, arguments);\n};\n\n// nextTick()\n\nvar nextTickQueue = [];\n\nprocess._tickCallback = function () {\n for (var l = nextTickQueue.length; l; l--) {\n nextTickQueue.shift()();\n }\n};\n\nprocess.nextTick = function (callback) {\n nextTickQueue.push(callback);\n process._needTickCallback();\n};\n\n// Module System\nvar module = {}\nprocess.compile(\"(function (exports) {\"\n + process.binding(\"natives\").module\n + \"\\n})\", \"module\")(module);\n\n// TODO: make sure that event module gets loaded here once it's\n// factored out of module.js\n// module.require(\"events\");\n\n// Signal Handlers\n\nfunction isSignal (event) {\n return event.slice(0, 3) === 'SIG' && process.hasOwnProperty(event);\n};\n\nprocess.addListener(\"newListener\", function (event) {\n if (isSignal(event) && process.listeners(event).length === 0) {\n var b = process.binding('signal_watcher');\n var w = new b.SignalWatcher(process[event]);\n w.addListener(\"signal\", function () {\n process.emit(event);\n });\n }\n});\n\n// Timers\nfunction addTimerListener (callback) {\n var timer = this;\n // Special case the no param case to avoid the extra object creation.\n if (arguments.length > 2) {\n var args = Array.prototype.slice.call(arguments, 2);\n timer.callback = function () { callback.apply(timer, args); };\n } else {\n timer.callback = callback;\n }\n}\n\nglobal.setTimeout = function (callback, after) {\n var timer = new process.Timer();\n addTimerListener.apply(timer, arguments);\n timer.start(after, 0);\n return timer;\n};\n\nglobal.setInterval = function (callback, repeat) {\n var timer = new process.Timer();\n addTimerListener.apply(timer, arguments);\n timer.start(repeat, repeat);\n return timer;\n};\n\nglobal.clearTimeout = function (timer) {\n if (timer instanceof process.Timer) {\n timer.stop();\n }\n};\n\nglobal.clearInterval = global.clearTimeout;\n\nvar stdout;\nprocess.__defineGetter__('stdout', function () {\n if (stdout) return stdout;\n\n var binding = process.binding('stdio'),\n net = module.requireNative('net'),\n fs = module.requireNative('fs'),\n fd = binding.stdoutFD;\n\n if (binding.isStdoutBlocking()) {\n stdout = new fs.WriteStream(null, {fd: fd});\n } else {\n stdout = new net.Stream(fd);\n // FIXME Should probably have an option in net.Stream to create a stream from\n // an existing fd which is writable only. But for now we'll just add\n // this hack and set the `readable` member to false.\n // Test: ./node test/fixtures/echo.js < /etc/passwd\n stdout.readable = false;\n }\n\n return stdout;\n});\n\nvar stdin;\nprocess.openStdin = function () {\n if (stdin) return stdin;\n\nvar binding = process.binding('stdio'),\n net = module.requireNative('net'),\n fs = module.requireNative('fs'),\n fd = binding.openStdin();\n\n if (binding.isStdinBlocking()) {\n stdin = new net.Stream(fd);\n stdin.readable = true;\n } else {\n stdin = new fs.ReadStream(null, {fd: fd});\n }\n\n stdin.resume();\n\n return stdin;\n};\n\n\nprocess.exit = function (code) {\n process.emit(\"exit\");\n process.reallyExit(code);\n};\n\n\nmodule.runMain();\n\n\n// All our arguments are loaded. We've evaluated all of the scripts. We\n// might even have created TCP servers. Now we enter the main eventloop. If\n// there are no watchers on the loop (except for the ones that were\n// ev_unref'd) then this function exits. As long as there are active\n// watchers, it blocks.\nprocess.loop();\n\nprocess.emit(\"exit\");\n\n}","script":{"ref":29},"scriptId":14,"position":10,"line":0,"column":10,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":221},{"name":"length","attributes":7,"propertyType":3,"ref":44},{"name":"name","attributes":7,"propertyType":3,"ref":42},{"name":"prototype","attributes":6,"propertyType":3,"ref":65},{"name":"caller","attributes":7,"propertyType":3,"ref":5}],"text":"function (process) {\n\nprocess.global.process = process;\nprocess.global.global = process.global;\nglobal.GLOBAL = global;\n\n/** deprecation errors ************************************************/\n\nfunction removed (reason) {\n return function () {\n throw new Error(reason)\n }\n}\n\nGLOBAL.__module = removed(\"'__module' has been renamed to 'module'\");\nGLOBAL.include = removed(\"include(module) has been removed. Use require(module)\");\nGLOBAL.puts = removed(\"puts() has moved. Use require('sys') to bring it back.\");\nGLOBAL.print = removed(\"print() has moved. Use require('sys') to bring it back.\");\nGLOBAL.p = removed(\"p() has moved. Use require('sys') to bring it back.\");\nprocess.debug = removed(\"process. has moved. Use require('sys') to bring it back.\");\nprocess.error = removed(\"process.error() has moved. Use require('sys') to bring it back.\");\nprocess.watchFile = removed(\"process.watchFile() has moved to fs.watchFile()\");\nprocess.unwatchFile = removed(\"process.unwatchFile() has moved to fs.unwatchFile()\");\nprocess.mixin = removed('process.mixin() has been removed.');\nprocess.createChildProcess = removed(\"childProcess API has changed. See doc/api.txt.\");\nprocess.inherits = removed(\"process.inherits() has moved to sys.inherits.\");\n\nprocess.assert = function (x, msg) {\n if (!x) throw new Error(msg || \"assertion error\");\n};\n\nvar evalcxMsg;\nprocess.evalcx = function () {\n if (!evalcxMsg) {\n process.binding('stdio').writeError(evalcxMsg =\n \"process.evalcx is deprecated. Use Script.runInNewContext instead.\\n\");\n }\n return process.binding('evals').Script\n .runInNewContext.apply(null, arguments);\n};\n\n// nextTick()\n\nvar nextTickQueue = [];\n\nprocess._tickCallback = function () {\n for (var l = nextTickQueue.length; l; l--) {\n nextTickQueue.shift()();\n }\n};\n\nprocess.nextTick = function (callback) {\n nextTickQueue.push(callback);\n process._needTickCallback();\n};\n\n// Module System\nvar module = {}\nprocess.compile(\"(function (exports) {\"\n + process.binding(\"natives\").module\n + \"\\n})\", \"module\")(module);\n\n// TODO: make sure that event module gets loaded here once it's\n// factored out of module.js\n// module.require(\"events\");\n\n// Signal Handlers\n\nfunction isSignal (event) {\n return event.slice(0, 3) === 'SIG' && process.hasOwnProperty(event);\n};\n\nprocess.addListener(\"newListener\", function (event) {\n if (isSignal(event) && process.listeners(event).length === 0) {\n var b = process.binding('signal_watcher');\n var w = new b.SignalWatcher(process[event]);\n w.addListener(\"signal\", function () {\n process.emit(event);\n });\n }\n});\n\n// Timers\nfunction addTimerListener (callback) {\n var timer = this;\n // Special case the no param case to avoid the extra object creation.\n if (arguments.length > 2) {\n var args = Array.prototype.slice.call(arguments, 2);\n timer.callback = function () { callback.apply(timer, args); };\n } else {\n timer.callback = callback;\n }\n}\n\nglobal.setTimeout = function (callback, after) {\n var timer = new process.Timer();\n addTimerListener.apply(timer, arguments);\n timer.start(after, 0);\n return timer;\n};\n\nglobal.setInterval = function (callback, repeat) {\n var timer = new process.Timer();\n addTimerListener.apply(timer, arguments);\n timer.start(repeat, repeat);\n return timer;\n};\n\nglobal.clearTimeout = function (timer) {\n if (timer instanceof process.Timer) {\n timer.stop();\n }\n};\n\nglobal.clearInterval = global.clearTimeout;\n\nvar stdout;\nprocess.__defineGetter__('stdout', function () {\n if (stdout) return stdout;\n\n var binding = process.binding('stdio'),\n net = module.requireNative('net'),\n fs = module.requireNative('fs'),\n fd = binding.stdoutFD;\n\n if (binding.isStdoutBlocking()) {\n stdout = new fs.WriteStream(null, {fd: fd});\n } else {\n stdout = new net.Stream(fd);\n // FIXME Should probably have an option in net.Stream to create a stream from\n // an existing fd which is writable only. But for now we'll just add\n // this hack and set the `readable` member to false.\n // Test: ./node test/fixtures/echo.js < /etc/passwd\n stdout.readable = false;\n }\n\n return stdout;\n});\n\nvar stdin;\nprocess.openStdin = function () {\n if (stdin) return stdin;\n\nvar binding = process.binding('stdio'),\n net = module.requireNative('net'),\n fs = module.requireNative('fs'),\n fd = binding.openStdin();\n\n if (binding.isStdinBlocking()) {\n stdin = new net.Stream(fd);\n stdin.readable = true;\n } else {\n stdin = new fs.ReadStream(null, {fd: fd});\n }\n\n stdin.resume();\n\n return stdin;\n};\n\n\nprocess.exit = function (code) {\n process.emit(\"exit\");\n process.reallyExit(code);\n};\n\n\nmodule.runMain();\n\n\n// All our arguments are loaded. We've evaluated all of the scripts. We\n// might even have created TCP servers. Now we enter the main eventloop. If\n// there are no watchers on the loop (except for the ones that were\n// ev_unref'd) then this function exits. As long as there are active\n// watchers, it blocks.\nprocess.loop();\n\nprocess.emit(\"exit\");\n\n}"},{"handle":29,"type":"script","name":"node.js","id":14,"lineOffset":0,"columnOffset":0,"lineCount":180,"sourceStart":"(function (process) {\n\nprocess.global.process = process;\nprocess.global.global =","sourceLength":5042,"scriptType":2,"compilationType":0,"context":{"ref":28},"text":"node.js (lines: 180)"},{"handle":30,"type":"object","className":"EventEmitter","constructorFunction":{"ref":36},"protoObject":{"ref":67},"prototypeObject":{"ref":3},"properties":[{"name":"ENOMSG","ref":68},{"name":"setuid","ref":69},{"name":"SIGQUIT","ref":70},{"name":"S_IXOTH","ref":44},{"name":"compile","ref":71},{"name":"EISCONN","ref":72},{"name":"EOVERFLOW","ref":73},{"name":"platform","ref":74},{"name":"EIO","ref":41},{"name":"EAFNOSUPPORT","ref":75},{"name":"O_WRONLY","ref":44},{"name":"SIGFPE","ref":76},{"name":"SIGXCPU","ref":77},{"name":"ENODATA","ref":78},{"name":"argv","ref":79},{"name":"EPROTO","ref":80},{"name":"ENAMETOOLONG","ref":81},{"name":"S_IRWXO","ref":82},{"name":"ENOEXEC","ref":76},{"name":"O_EXCL","ref":83},{"name":"dlopen","ref":84},{"name":"_byteLength","ref":85},{"name":"SIGSEGV","ref":86},{"name":"EPROTONOSUPPORT","ref":87},{"name":"cwd","ref":88},{"name":"ENOLCK","ref":89},{"name":"O_SYNC","ref":90},{"name":"ECANCELED","ref":91},{"name":"ECONNABORTED","ref":92},{"name":"SIGINT","ref":54},{"name":"S_IRUSR","ref":93},{"name":"EBADMSG","ref":94},{"name":"error","ref":95},{"name":"O_RDWR","ref":54},{"name":"O_NOFOLLOW","ref":93},{"name":"SIGXFSZ","ref":96},{"name":"EIDRM","ref":97},{"name":"ENOSYS","ref":98},{"name":"S_IFBLK","ref":99},{"name":"SIGIOT","ref":100},{"name":"getuid","ref":101},{"name":"ENV","ref":102},{"name":"S_IWOTH","ref":54},{"name":"SIGUSR2","ref":103},{"name":"nextTick","ref":104},{"name":"SIGURG","ref":105},{"name":"ETIMEDOUT","ref":106},{"name":"ETXTBSY","ref":107},{"name":"S_IFIFO","ref":108},{"name":"EMLINK","ref":103},{"name":"SIGTTIN","ref":109},{"name":"S_IWGRP","ref":105},{"name":"S_IFCHR","ref":110},{"name":"loop","ref":111},{"name":"SIGKILL","ref":112},{"name":"S_IRWXG","ref":72},{"name":"S_IXGRP","ref":76},{"name":"EWOULDBLOCK","ref":113},{"name":"SIGHUP","ref":44},{"name":"reallyExit","ref":114},{"name":"ENOTSOCK","ref":115},{"name":"assert","ref":116},{"name":"SIGPROF","ref":117},{"name":"debug","ref":118},{"name":"EOPNOTSUPP","ref":119},{"name":"EEXIST","ref":120},{"name":"SIGALRM","ref":121},{"name":"ESRCH","ref":70},{"name":"EFAULT","ref":121},{"name":"EPROTOTYPE","ref":122},{"name":"SIGSYS","ref":123},{"name":"checkBreak","ref":124},{"name":"stdout","propertyType":3,"ref":3},{"name":"EDEADLK","ref":86},{"name":"ENOTTY","ref":96},{"name":"_tickCallback","ref":125},{"name":"S_IRGRP","ref":126},{"name":"Timer","ref":127},{"name":"ELOOP","ref":128},{"name":"SIGTRAP","ref":41},{"name":"S_IXUSR","ref":129},{"name":"O_APPEND","ref":76},{"name":"EDOM","ref":130},{"name":"O_TRUNC","ref":131},{"name":"O_DIRECTORY","ref":132},{"name":"Promise","ref":133},{"name":"ENOTCONN","ref":134},{"name":"ESTALE","ref":135},{"name":"memoryUsage","ref":136},{"name":"openStdin","ref":137},{"name":"EBUSY","ref":105},{"name":"EPERM","ref":44},{"name":"installPrefix","ref":138},{"name":"SIGTSTP","ref":139},{"name":"ENOTEMPTY","ref":140},{"name":"unloop","ref":141},{"name":"SIGABRT","ref":100},{"name":"mixin","ref":142},{"name":"unwatchFile","ref":143},{"name":"EFBIG","ref":117},{"name":"ECONNRESET","ref":144},{"name":"version","ref":145},{"name":"setgid","ref":146},{"name":"EINPROGRESS","ref":147},{"name":"EADDRNOTAVAIL","ref":148},{"name":"EINTR","ref":149},{"name":"evalcx","ref":150},{"name":"kill","ref":151},{"name":"pid","ref":152},{"name":"ENETUNREACH","ref":153},{"name":"SIGCHLD","ref":154},{"name":"ESPIPE","ref":155},{"name":"EALREADY","ref":156},{"name":"O_CREAT","ref":157},{"name":"EV_MAXPRI","ref":54},{"name":"global","ref":26},{"name":"mainModule","ref":7},{"name":"EROFS","ref":158},{"name":"SIGILL","ref":149},{"name":"EMULTIHOP","ref":159},{"name":"ETIME","ref":160},{"name":"ENOENT","ref":54},{"name":"S_IWUSR","ref":90},{"name":"env","ref":102},{"name":"EMSGSIZE","ref":161},{"name":"SIGTTOU","ref":162},{"name":"ENOSR","ref":163},{"name":"EMFILE","ref":77},{"name":"SIGWINCH","ref":164},{"name":"SIGUSR1","ref":158},{"name":"ENXIO","ref":100},{"name":"S_IFREG","ref":165},{"name":"SIGTERM","ref":166},{"name":"EventEmitter","ref":36},{"name":"ECHILD","ref":167},{"name":"EHOSTUNREACH","ref":168},{"name":"inherits","ref":169},{"name":"ENOTSUP","ref":170},{"name":"EADDRINUSE","ref":171},{"name":"S_IROTH","ref":149},{"name":"EBADF","ref":112},{"name":"S_IRWXU","ref":172},{"name":"EXDEV","ref":139},{"name":"ECONNREFUSED","ref":173},{"name":"ENOSTR","ref":174},{"name":"SIGVTALRM","ref":107},{"name":"S_IFSOCK","ref":175},{"name":"SIGPIPE","ref":176},{"name":"chdir","ref":177},{"name":"EDESTADDRREQ","ref":178},{"name":"ERANGE","ref":179},{"name":"exit","ref":180},{"name":"EILSEQ","ref":181},{"name":"ENOMEM","ref":123},{"name":"EPIPE","ref":126},{"name":"ARGV","ref":79},{"name":"EISDIR","ref":109},{"name":"SIGBUS","ref":167},{"name":"_needTickCallback","ref":182},{"name":"SIGCONT","ref":183},{"name":"SIGSTOP","ref":120},{"name":"EAGAIN","ref":113},{"name":"ENOPROTOOPT","ref":184},{"name":"ENETDOWN","ref":185},{"name":"ENETRESET","ref":186},{"name":"O_NOCTTY","ref":187},{"name":"createChildProcess","ref":188},{"name":"binding","ref":189},{"name":"ENFILE","ref":190},{"name":"ENOLINK","ref":191},{"name":"ENOTDIR","ref":154},{"name":"EINVAL","ref":162},{"name":"O_RDONLY","ref":64},{"name":"IOWatcher","ref":192},{"name":"EV_MINPRI","ref":193},{"name":"getgid","ref":194},{"name":"ENOSPC","ref":164},{"name":"ENOBUFS","ref":195},{"name":"SIGIO","ref":190},{"name":"EDQUOT","ref":196},{"name":"EACCES","ref":176},{"name":"S_IFDIR","ref":197},{"name":"E2BIG","ref":82},{"name":"_events","ref":198},{"name":"ENODEV","ref":183},{"name":"watchFile","ref":199},{"name":"S_IFLNK","ref":200},{"name":"umask","ref":201}],"text":"#<an EventEmitter>"},{"handle":31,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":202},"name":"removed","inferredName":"","resolved":true,"source":"function removed(reason) {\n return function () {\n throw new Error(reason)\n }\n}","script":{"ref":29},"scriptId":14,"position":213,"line":8,"column":17,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":5},{"name":"length","attributes":7,"propertyType":3,"ref":44},{"name":"name","attributes":7,"propertyType":3,"ref":203},{"name":"prototype","attributes":6,"propertyType":3,"ref":202},{"name":"caller","attributes":7,"propertyType":3,"ref":5}],"text":"function removed(reason) {\n return function () {\n throw new Error(reason)\n }\n}"},{"handle":32,"type":"object","className":"Array","constructorFunction":{"ref":204},"protoObject":{"ref":205},"prototypeObject":{"ref":3},"properties":[{"name":"length","attributes":6,"propertyType":3,"ref":64}],"text":"#<an Array>"},{"handle":33,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":206},"name":"addTimerListener","inferredName":"","resolved":true,"source":"function addTimerListener(callback) {\n var timer = this;\n // Special case the no param case to avoid the extra object creation.\n if (arguments.length > 2) {\n var args = Array.prototype.slice.call(arguments, 2);\n timer.callback = function () { callback.apply(timer, args); };\n } else {\n timer.callback = callback;\n }\n}","script":{"ref":29},"scriptId":14,"position":2652,"line":83,"column":26,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":5},{"name":"length","attributes":7,"propertyType":3,"ref":44},{"name":"name","attributes":7,"propertyType":3,"ref":207},{"name":"prototype","attributes":6,"propertyType":3,"ref":206},{"name":"caller","attributes":7,"propertyType":3,"ref":5}],"text":"function addTimerListener(callback) {\n var timer = this;\n // Special case the no param case to avoid the extra object creation.\n if (arguments.length > 2) {\n var args = Array.prototype.slice.call(arguments, 2);\n timer.callback = function () { callback.apply(timer, args); };\n } else {\n timer.callback = callback;\n }\n}"},{"handle":34,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":208},"name":"isSignal","inferredName":"","resolved":true,"source":"function isSignal(event) {\n return event.slice(0, 3) === 'SIG' && process.hasOwnProperty(event);\n}","script":{"ref":29},"scriptId":14,"position":2229,"line":68,"column":18,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":5},{"name":"length","attributes":7,"propertyType":3,"ref":44},{"name":"name","attributes":7,"propertyType":3,"ref":209},{"name":"prototype","attributes":6,"propertyType":3,"ref":208},{"name":"caller","attributes":7,"propertyType":3,"ref":5}],"text":"function isSignal(event) {\n return event.slice(0, 3) === 'SIG' && process.hasOwnProperty(event);\n}"}],"running":false}
+{"seq":13,"type":"response","command":"backtrace","success":true,"body":{"fromFrame":0,"toFrame":6,"totalFrames":6,"frames":[{"type":"frame","index":0,"receiver":{"ref":1},"func":{"ref":0},"script":{"ref":12},"constructCall":false,"debuggerFrame":false,"arguments":[{"name":"exports","value":{"ref":1}},{"name":"require","value":{"ref":6}},{"name":"module","value":{"ref":7}},{"name":"__filename","value":{"ref":9}},{"name":"__dirname","value":{"ref":10}}],"locals":[],"position":148,"line":3,"column":0,"sourceLineText":"require(\"./espionage/lib/espionage\");","scopes":[{"type":1,"index":0},{"type":0,"index":1}],"text":"#00 #<an Object>.[anonymous](exports=#<an Object>, require=function require(path) {\n return loadModule(path, self);\n }, module=#<a Module>, __filename=/Users/scotttaylor/src/git/ndb/spec/node.js, __dirname=/Users/scotttaylor/src/git/ndb/spec) /Users/scotttaylor/src/git/ndb/spec/node.js line 4 column 1 (position 149)"},{"type":"frame","index":1,"receiver":{"ref":7},"func":{"ref":13},"script":{"ref":15},"constructCall":false,"debuggerFrame":false,"arguments":[{"name":"content","value":{"ref":16}},{"name":"filename","value":{"ref":9}}],"locals":[{"name":"require","value":{"ref":6}},{"name":"dirName","value":{"ref":10}},{"name":"requireAsync","value":{"ref":17}},{"name":"compiledWrapper","value":{"ref":0}},{"name":"wrapper","value":{"ref":18}},{"name":"ext","value":{"ref":19}},{"name":"self","value":{"ref":7}}],"position":9265,"line":383,"column":22,"sourceLineText":" compiledWrapper.apply(self.exports, [self.exports, require, self, filename, dirName]);","scopes":[{"type":1,"index":0},{"type":3,"index":1},{"type":0,"index":2}],"text":"#01 #<a Module>._compile(content=require.paths.unshift(\"./lib/\");\n\nrequire(\"./jspec_dot_reporter/jspec_dot_report... (length: 1374), filename=/Users/scotttaylor/src/git/ndb/spec/node.js) module line 384 column 23 (position 9266)"},{"type":"frame","index":2,"receiver":{"ref":7},"func":{"ref":21},"script":{"ref":15},"constructCall":false,"debuggerFrame":false,"arguments":[{"name":"filename","value":{"ref":9}}],"locals":[{"name":"e","value":{"ref":3}},{"name":"content","value":{"ref":16}}],"position":9516,"line":392,"column":15,"sourceLineText":" var e = this._compile(content, filename);","scopes":[{"type":1,"index":0},{"type":3,"index":1},{"type":0,"index":2}],"text":"#02 #<a Module>._loadScriptSync(filename=/Users/scotttaylor/src/git/ndb/spec/node.js) module line 393 column 16 (position 9517)"},{"type":"frame","index":3,"receiver":{"ref":7},"func":{"ref":22},"script":{"ref":15},"constructCall":false,"debuggerFrame":false,"arguments":[{"name":"filename","value":{"ref":9}}],"locals":[],"position":7158,"line":295,"column":9,"sourceLineText":" this._loadScriptSync(filename);","scopes":[{"type":1,"index":0},{"type":3,"index":1},{"type":0,"index":2}],"text":"#03 #<a Module>.loadSync(filename=/Users/scotttaylor/src/git/ndb/spec/node.js) module line 296 column 10 (position 7159)"},{"type":"frame","index":4,"receiver":{"ref":23},"func":{"ref":24},"script":{"ref":15},"constructCall":false,"debuggerFrame":false,"arguments":[],"locals":[{"name":"cwd","value":{"ref":25}}],"position":11105,"line":458,"column":21,"sourceLineText":" process.mainModule.loadSync(process.argv[1]);","scopes":[{"type":1,"index":0},{"type":3,"index":1},{"type":0,"index":2}],"text":"#04 #<an Object>.runMain() module line 459 column 22 (position 11106)"},{"type":"frame","index":5,"receiver":{"ref":26},"func":{"ref":27},"script":{"ref":29},"constructCall":false,"debuggerFrame":false,"arguments":[{"name":"process","value":{"ref":30}}],"locals":[{"name":"removed","value":{"ref":31}},{"name":"process","value":{"ref":30}},{"name":"stdout","value":{"ref":3}},{"name":"stdin","value":{"ref":3}},{"name":"nextTickQueue","value":{"ref":32}},{"name":"addTimerListener","value":{"ref":33}},{"name":"evalcxMsg","value":{"ref":3}},{"name":"isSignal","value":{"ref":34}},{"name":"module","value":{"ref":23}}],"position":4676,"line":167,"column":7,"sourceLineText":"module.runMain();","scopes":[{"type":1,"index":0},{"type":0,"index":1}],"text":"#05 [anonymous](process=#<an EventEmitter>) node.js line 168 column 8 (position 4677)"}]},"refs":[{"handle":1,"type":"object","className":"Object","constructorFunction":{"ref":2},"protoObject":{"ref":4},"prototypeObject":{"ref":3},"properties":[],"text":"#<an Object>"},{"handle":0,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":39},"name":"","inferredName":"","resolved":true,"source":"function (exports, require, module, __filename, __dirname) { require.paths.unshift(\"./lib/\");\n\nrequire(\"./jspec_dot_reporter/jspec_dot_reporter\");\nrequire(\"./espionage/lib/espionage\");\nrequire(\"./underscore/underscore\");\nrequire('./jspec/lib/jspec');\nrequire('./unit/spec.helper');\n\n\nspy = Espionage;\n\nJSpec.include({\n beforeSpec: function() {\n spy.tearDown();\n },\n\n afterSpec: function() {\n spy.tearDown();\n }\n});\n\nJSpec.\n exec(\"spec/unit/node_spec.js\").\n exec('spec/unit/spec.js').\n exec('spec/unit/ndb.js').\n exec('spec/unit/command_center.js').\n exec('spec/unit/event_listener.js').\n exec('spec/unit/event_listeners/break.js').\n exec('spec/unit/event_listeners/source.js').\n exec('spec/unit/commands/raw_write.js').\n exec('spec/unit/commands/help.js').\n exec('spec/unit/commands/list.js').\n exec('spec/unit/commands/continue.js').\n exec('spec/unit/commands/step_in.js').\n exec('spec/unit/commands/setbreakpoint.js').\n exec('spec/unit/commands/quit.js').\n exec('spec/unit/commands/version.js').\n exec('spec/unit/commands/evaluate.js').\n exec('spec/unit/commands/next.js').\n exec('spec/unit/commands/verbose.js').\n exec('spec/unit/commands/backtrace.js').\n exec('spec/unit/commands/scripts.js').\n exec('spec/unit/message_parser.js').\n exec('spec/unit/state.js').\n exec('spec/unit/option_parser/option_parser_spec.js').\n run({ reporter: JSpecDotReporter, fixturePath: 'spec/fixtures' }).\n report();\n\n}","script":{"ref":12},"scriptId":21,"position":10,"line":0,"column":10,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":216},{"name":"length","attributes":7,"propertyType":3,"ref":41},{"name":"name","attributes":7,"propertyType":3,"ref":42},{"name":"prototype","attributes":6,"propertyType":3,"ref":39},{"name":"caller","attributes":7,"propertyType":3,"ref":13}],"text":"function (exports, require, module, __filename, __dirname) { require.paths.unshift(\"./lib/\");\n\nrequire(\"./jspec_dot_reporter/jspec_dot_reporter\");\nrequire(\"./espionage/lib/espionage\");\nrequire(\"./underscore/underscore\");\nrequire('./jspec/lib/jspec');\nrequire('./unit/spec.helper');\n\n\nspy = Espionage;\n\nJSpec.include({\n beforeSpec: function() {\n spy.tearDown();\n },\n\n afterSpec: function() {\n spy.tearDown();\n }\n});\n\nJSpec.\n exec(\"spec/unit/node_spec.js\").\n exec('spec/unit/spec.js').\n exec('spec/unit/ndb.js').\n exec('spec/unit/command_center.js').\n exec('spec/unit/event_listener.js').\n exec('spec/unit/event_listeners/break.js').\n exec('spec/unit/event_listeners/source.js').\n exec('spec/unit/commands/raw_write.js').\n exec('spec/unit/commands/help.js').\n exec('spec/unit/commands/list.js').\n exec('spec/unit/commands/continue.js').\n exec('spec/unit/commands/step_in.js').\n exec('spec/unit/commands/setbreakpoint.js').\n exec('spec/unit/commands/quit.js').\n exec('spec/unit/commands/version.js').\n exec('spec/unit/commands/evaluate.js').\n exec('spec/unit/commands/next.js').\n exec('spec/unit/commands/verbose.js').\n exec('spec/unit/commands/backtrace.js').\n exec('spec/unit/commands/scripts.js').\n exec('spec/unit/message_parser.js').\n exec('spec/unit/state.js').\n exec('spec/unit/option_parser/option_parser_spec.js').\n run({ reporter: JSpecDotReporter, fixturePath: 'spec/fixtures' }).\n report();\n\n}"},{"handle":12,"type":"script","name":"/Users/scotttaylor/src/git/ndb/spec/node.js","id":21,"lineOffset":0,"columnOffset":0,"lineCount":49,"sourceStart":"(function (exports, require, module, __filename, __dirname) { require.paths.unsh","sourceLength":1440,"scriptType":2,"compilationType":0,"context":{"ref":11},"text":"/Users/scotttaylor/src/git/ndb/spec/node.js (lines: 49)"},{"handle":6,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":43},"name":"require","inferredName":"","resolved":true,"source":"function require(path) {\n return loadModule(path, self);\n }","script":{"ref":15},"scriptId":15,"position":8650,"line":362,"column":19,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":5},{"name":"length","attributes":7,"propertyType":3,"ref":44},{"name":"name","attributes":7,"propertyType":3,"ref":45},{"name":"main","propertyType":1,"ref":7},{"name":"paths","propertyType":1,"ref":46},{"name":"prototype","attributes":6,"propertyType":3,"ref":43},{"name":"caller","attributes":7,"propertyType":3,"ref":5},{"name":"registerExtension","propertyType":1,"ref":47},{"name":"async","propertyType":1,"ref":17}],"text":"function require(path) {\n return loadModule(path, self);\n }"},{"handle":7,"type":"object","className":"Object","constructorFunction":{"ref":8},"protoObject":{"ref":20},"prototypeObject":{"ref":3},"properties":[{"name":"filename","propertyType":1,"ref":9},{"name":"children","propertyType":1,"ref":48},{"name":"id","propertyType":1,"ref":49},{"name":"exited","propertyType":1,"ref":50},{"name":"loaded","propertyType":1,"ref":50},{"name":"moduleCache","propertyType":1,"ref":51},{"name":"parent","propertyType":1,"ref":3},{"name":"exports","propertyType":1,"ref":1}],"text":"#<a Module>"},{"handle":9,"type":"string","value":"/Users/scotttaylor/src/git/ndb/spec/node.js","length":43,"text":"/Users/scotttaylor/src/git/ndb/spec/node.js"},{"handle":10,"type":"string","value":"/Users/scotttaylor/src/git/ndb/spec","length":35,"text":"/Users/scotttaylor/src/git/ndb/spec"},{"handle":13,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":52},"name":"","inferredName":"Module._compile","resolved":true,"source":"function (content, filename) {\n var self = this;\n // remove shebang\n content = content.replace(/^\\#\\!.*/, '');\n\n // Compile content if needed\n var ext = path.extname(filename);\n if (extensionCache[ext]) {\n content = extensionCache[ext](content);\n }\n\n function requireAsync (url, cb) {\n loadModule(url, self, cb);\n }\n\n function require (path) {\n return loadModule(path, self);\n }\n\n require.paths = modulePaths;\n require.async = requireAsync;\n require.main = process.mainModule;\n require.registerExtension = registerExtension;\n\n\n if ('string' === typeof content) {\n // create wrapper function\n var wrapper = \"(function (exports, require, module, __filename, __dirname) { \"\n + content\n + \"\\n});\";\n\n var compiledWrapper = process.compile(wrapper, filename);\n var dirName = path.dirname(filename);\n if (filename === process.argv[1]) {\n process.checkBreak();\n }\n compiledWrapper.apply(self.exports, [self.exports, require, self, filename, dirName]);\n } else {\n self.exports = content;\n }\n}","script":{"ref":15},"scriptId":15,"position":8308,"line":347,"column":37,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":217},{"name":"length","attributes":7,"propertyType":3,"ref":54},{"name":"name","attributes":7,"propertyType":3,"ref":42},{"name":"prototype","attributes":6,"propertyType":3,"ref":52},{"name":"caller","attributes":7,"propertyType":3,"ref":21}],"text":"function (content, filename) {\n var self = this;\n // remove shebang\n content = content.replace(/^\\#\\!.*/, '');\n\n // Compile content if needed\n var ext = path.extname(filename);\n if (extensionCache[ext]) {\n content = extensionCache[ext](content);\n }\n\n function requireAsync (url, cb) {\n loadModule(url, self, cb);\n }\n\n function require (path) {\n return loadModule(path, self);\n }\n\n require.paths = modulePaths;\n require.async = requireAsync;\n require.main = process.mainModule;\n require.registerExtension = registerExtension;\n\n\n if ('string' === typeof content) {\n // create wrapper function\n var wrapper = \"(function (exports, require, module, __filename, __dirname) { \"\n + content\n + \"\\n});\";\n\n var compiledWrapper = process.compile(wrapper, filename);\n var dirName = path.dirname(filename);\n if (filename === process.argv[1]) {\n process.checkBreak();\n }\n compiledWrapper.apply(self.exports, [self.exports, require, self, filename, dirName]);\n } else {\n self.exports = content;\n }\n}"},{"handle":15,"type":"script","name":"module","id":15,"lineOffset":0,"columnOffset":0,"lineCount":462,"sourceStart":"(function (exports) {/**********************************************************","sourceLength":11137,"scriptType":2,"compilationType":0,"context":{"ref":14},"text":"module (lines: 462)"},{"handle":16,"type":"string","value":"require.paths.unshift(\"./lib/\");\n\nrequire(\"./jspec_dot_reporter/jspec_dot_report... (length: 1374)","fromIndex":0,"toIndex":80,"length":1374,"text":"require.paths.unshift(\"./lib/\");\n\nrequire(\"./jspec_dot_reporter/jspec_dot_report... (length: 1374)"},{"handle":17,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":55},"name":"requireAsync","inferredName":"","resolved":true,"source":"function requireAsync(url, cb) {\n loadModule(url, self, cb);\n }","script":{"ref":15},"scriptId":15,"position":8583,"line":358,"column":24,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":5},{"name":"length","attributes":7,"propertyType":3,"ref":54},{"name":"name","attributes":7,"propertyType":3,"ref":56},{"name":"prototype","attributes":6,"propertyType":3,"ref":55},{"name":"caller","attributes":7,"propertyType":3,"ref":5}],"text":"function requireAsync(url, cb) {\n loadModule(url, self, cb);\n }"},{"handle":18,"type":"string","value":"(function (exports, require, module, __filename, __dirname) { require.paths.unsh... (length: 1440)","fromIndex":0,"toIndex":80,"length":1440,"text":"(function (exports, require, module, __filename, __dirname) { require.paths.unsh... (length: 1440)"},{"handle":19,"type":"string","value":".js","length":3,"text":".js"},{"handle":21,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":57},"name":"","inferredName":"Module._loadScriptSync","resolved":true,"source":"function (filename) {\n var content = requireNative('fs').readFileSync(filename);\n var e = this._compile(content, filename);\n if (e) {\n throw e;\n } else {\n this.loaded = true;\n }\n}","script":{"ref":15},"scriptId":15,"position":9428,"line":390,"column":44,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":218},{"name":"length","attributes":7,"propertyType":3,"ref":44},{"name":"name","attributes":7,"propertyType":3,"ref":42},{"name":"prototype","attributes":6,"propertyType":3,"ref":57},{"name":"caller","attributes":7,"propertyType":3,"ref":22}],"text":"function (filename) {\n var content = requireNative('fs').readFileSync(filename);\n var e = this._compile(content, filename);\n if (e) {\n throw e;\n } else {\n this.loaded = true;\n }\n}"},{"handle":3,"type":"undefined","text":"undefined"},{"handle":22,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":59},"name":"","inferredName":"Module.loadSync","resolved":true,"source":"function (filename) {\n ;\n\n process.assert(!this.loaded);\n this.filename = filename;\n\n if (filename.match(/\\.node$/)) {\n this._loadObjectSync(filename);\n } else {\n this._loadScriptSync(filename);\n }\n}","script":{"ref":15},"scriptId":15,"position":6988,"line":286,"column":37,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":219},{"name":"length","attributes":7,"propertyType":3,"ref":44},{"name":"name","attributes":7,"propertyType":3,"ref":42},{"name":"prototype","attributes":6,"propertyType":3,"ref":59},{"name":"caller","attributes":7,"propertyType":3,"ref":24}],"text":"function (filename) {\n ;\n\n process.assert(!this.loaded);\n this.filename = filename;\n\n if (filename.match(/\\.node$/)) {\n this._loadObjectSync(filename);\n } else {\n this._loadScriptSync(filename);\n }\n}"},{"handle":23,"type":"object","className":"Object","constructorFunction":{"ref":2},"protoObject":{"ref":4},"prototypeObject":{"ref":3},"properties":[{"name":"runMain","propertyType":1,"ref":24},{"name":"requireNative","propertyType":1,"ref":61}],"text":"#<an Object>"},{"handle":24,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":62},"name":"","inferredName":"exports.runMain","resolved":true,"source":"function () {\n var cwd = process.cwd();\n\n // Make process.argv[0] and process.argv[1] into full paths.\n if (process.argv[0].indexOf('/') > 0) {\n process.argv[0] = path.join(cwd, process.argv[0]);\n }\n\n if (process.argv[1].charAt(0) != \"/\" && !(/^http:\\/\\//).exec(process.argv[1])) {\n process.argv[1] = path.join(cwd, process.argv[1]);\n }\n\n // Load the main module--the command line argument.\n process.mainModule = new Module(\".\");\n process.mainModule.loadSync(process.argv[1]);\n}","script":{"ref":15},"scriptId":15,"position":10649,"line":444,"column":27,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":220},{"name":"length","attributes":7,"propertyType":3,"ref":64},{"name":"name","attributes":7,"propertyType":3,"ref":42},{"name":"prototype","attributes":6,"propertyType":3,"ref":62},{"name":"caller","attributes":7,"propertyType":3,"ref":27}],"text":"function () {\n var cwd = process.cwd();\n\n // Make process.argv[0] and process.argv[1] into full paths.\n if (process.argv[0].indexOf('/') > 0) {\n process.argv[0] = path.join(cwd, process.argv[0]);\n }\n\n if (process.argv[1].charAt(0) != \"/\" && !(/^http:\\/\\//).exec(process.argv[1])) {\n process.argv[1] = path.join(cwd, process.argv[1]);\n }\n\n // Load the main module--the command line argument.\n process.mainModule = new Module(\".\");\n process.mainModule.loadSync(process.argv[1]);\n}"},{"handle":25,"type":"string","value":"/Users/scotttaylor/src/git/ndb","length":30,"text":"/Users/scotttaylor/src/git/ndb"},{"handle":26,"type":"object","className":"global","constructorFunction":{"ref":2},"protoObject":{"ref":35},"prototypeObject":{"ref":3},"properties":[],"text":"#<an Object>"},{"handle":27,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":65},"name":"","inferredName":"","resolved":true,"source":"function (process) {\n\nprocess.global.process = process;\nprocess.global.global = process.global;\nglobal.GLOBAL = global;\n\n/** deprecation errors ************************************************/\n\nfunction removed (reason) {\n return function () {\n throw new Error(reason)\n }\n}\n\nGLOBAL.__module = removed(\"'__module' has been renamed to 'module'\");\nGLOBAL.include = removed(\"include(module) has been removed. Use require(module)\");\nGLOBAL.puts = removed(\"puts() has moved. Use require('util') to bring it back.\");\nGLOBAL.print = removed(\"print() has moved. Use require('util') to bring it back.\");\nGLOBAL.p = removed(\"p() has moved. Use require('util') to bring it back.\");\nprocess.debug = removed(\"process. has moved. Use require('util') to bring it back.\");\nprocess.error = removed(\"process.error() has moved. Use require('util') to bring it back.\");\nprocess.watchFile = removed(\"process.watchFile() has moved to fs.watchFile()\");\nprocess.unwatchFile = removed(\"process.unwatchFile() has moved to fs.unwatchFile()\");\nprocess.mixin = removed('process.mixin() has been removed.');\nprocess.createChildProcess = removed(\"childProcess API has changed. See doc/api.txt.\");\nprocess.inherits = removed(\"process.inherits() has moved to sys.inherits.\");\n\nprocess.assert = function (x, msg) {\n if (!x) throw new Error(msg || \"assertion error\");\n};\n\nvar evalcxMsg;\nprocess.evalcx = function () {\n if (!evalcxMsg) {\n process.binding('stdio').writeError(evalcxMsg =\n \"process.evalcx is deprecated. Use Script.runInNewContext instead.\\n\");\n }\n return process.binding('evals').Script\n .runInNewContext.apply(null, arguments);\n};\n\n// nextTick()\n\nvar nextTickQueue = [];\n\nprocess._tickCallback = function () {\n for (var l = nextTickQueue.length; l; l--) {\n nextTickQueue.shift()();\n }\n};\n\nprocess.nextTick = function (callback) {\n nextTickQueue.push(callback);\n process._needTickCallback();\n};\n\n// Module System\nvar module = {}\nprocess.compile(\"(function (exports) {\"\n + process.binding(\"natives\").module\n + \"\\n})\", \"module\")(module);\n\n// TODO: make sure that event module gets loaded here once it's\n// factored out of module.js\n// module.require(\"events\");\n\n// Signal Handlers\n\nfunction isSignal (event) {\n return event.slice(0, 3) === 'SIG' && process.hasOwnProperty(event);\n};\n\nprocess.addListener(\"newListener\", function (event) {\n if (isSignal(event) && process.listeners(event).length === 0) {\n var b = process.binding('signal_watcher');\n var w = new b.SignalWatcher(process[event]);\n w.addListener(\"signal\", function () {\n process.emit(event);\n });\n }\n});\n\n// Timers\nfunction addTimerListener (callback) {\n var timer = this;\n // Special case the no param case to avoid the extra object creation.\n if (arguments.length > 2) {\n var args = Array.prototype.slice.call(arguments, 2);\n timer.callback = function () { callback.apply(timer, args); };\n } else {\n timer.callback = callback;\n }\n}\n\nglobal.setTimeout = function (callback, after) {\n var timer = new process.Timer();\n addTimerListener.apply(timer, arguments);\n timer.start(after, 0);\n return timer;\n};\n\nglobal.setInterval = function (callback, repeat) {\n var timer = new process.Timer();\n addTimerListener.apply(timer, arguments);\n timer.start(repeat, repeat);\n return timer;\n};\n\nglobal.clearTimeout = function (timer) {\n if (timer instanceof process.Timer) {\n timer.stop();\n }\n};\n\nglobal.clearInterval = global.clearTimeout;\n\nvar stdout;\nprocess.__defineGetter__('stdout', function () {\n if (stdout) return stdout;\n\n var binding = process.binding('stdio'),\n net = module.requireNative('net'),\n fs = module.requireNative('fs'),\n fd = binding.stdoutFD;\n\n if (binding.isStdoutBlocking()) {\n stdout = new fs.WriteStream(null, {fd: fd});\n } else {\n stdout = new net.Stream(fd);\n // FIXME Should probably have an option in net.Stream to create a stream from\n // an existing fd which is writable only. But for now we'll just add\n // this hack and set the `readable` member to false.\n // Test: ./node test/fixtures/echo.js < /etc/passwd\n stdout.readable = false;\n }\n\n return stdout;\n});\n\nvar stdin;\nprocess.openStdin = function () {\n if (stdin) return stdin;\n\nvar binding = process.binding('stdio'),\n net = module.requireNative('net'),\n fs = module.requireNative('fs'),\n fd = binding.openStdin();\n\n if (binding.isStdinBlocking()) {\n stdin = new net.Stream(fd);\n stdin.readable = true;\n } else {\n stdin = new fs.ReadStream(null, {fd: fd});\n }\n\n stdin.resume();\n\n return stdin;\n};\n\n\nprocess.exit = function (code) {\n process.emit(\"exit\");\n process.reallyExit(code);\n};\n\n\nmodule.runMain();\n\n\n// All our arguments are loaded. We've evaluated all of the scripts. We\n// might even have created TCP servers. Now we enter the main eventloop. If\n// there are no watchers on the loop (except for the ones that were\n// ev_unref'd) then this function exits. As long as there are active\n// watchers, it blocks.\nprocess.loop();\n\nprocess.emit(\"exit\");\n\n}","script":{"ref":29},"scriptId":14,"position":10,"line":0,"column":10,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":221},{"name":"length","attributes":7,"propertyType":3,"ref":44},{"name":"name","attributes":7,"propertyType":3,"ref":42},{"name":"prototype","attributes":6,"propertyType":3,"ref":65},{"name":"caller","attributes":7,"propertyType":3,"ref":5}],"text":"function (process) {\n\nprocess.global.process = process;\nprocess.global.global = process.global;\nglobal.GLOBAL = global;\n\n/** deprecation errors ************************************************/\n\nfunction removed (reason) {\n return function () {\n throw new Error(reason)\n }\n}\n\nGLOBAL.__module = removed(\"'__module' has been renamed to 'module'\");\nGLOBAL.include = removed(\"include(module) has been removed. Use require(module)\");\nGLOBAL.puts = removed(\"puts() has moved. Use require('util') to bring it back.\");\nGLOBAL.print = removed(\"print() has moved. Use require('util') to bring it back.\");\nGLOBAL.p = removed(\"p() has moved. Use require('util') to bring it back.\");\nprocess.debug = removed(\"process. has moved. Use require('util') to bring it back.\");\nprocess.error = removed(\"process.error() has moved. Use require('util') to bring it back.\");\nprocess.watchFile = removed(\"process.watchFile() has moved to fs.watchFile()\");\nprocess.unwatchFile = removed(\"process.unwatchFile() has moved to fs.unwatchFile()\");\nprocess.mixin = removed('process.mixin() has been removed.');\nprocess.createChildProcess = removed(\"childProcess API has changed. See doc/api.txt.\");\nprocess.inherits = removed(\"process.inherits() has moved to sys.inherits.\");\n\nprocess.assert = function (x, msg) {\n if (!x) throw new Error(msg || \"assertion error\");\n};\n\nvar evalcxMsg;\nprocess.evalcx = function () {\n if (!evalcxMsg) {\n process.binding('stdio').writeError(evalcxMsg =\n \"process.evalcx is deprecated. Use Script.runInNewContext instead.\\n\");\n }\n return process.binding('evals').Script\n .runInNewContext.apply(null, arguments);\n};\n\n// nextTick()\n\nvar nextTickQueue = [];\n\nprocess._tickCallback = function () {\n for (var l = nextTickQueue.length; l; l--) {\n nextTickQueue.shift()();\n }\n};\n\nprocess.nextTick = function (callback) {\n nextTickQueue.push(callback);\n process._needTickCallback();\n};\n\n// Module System\nvar module = {}\nprocess.compile(\"(function (exports) {\"\n + process.binding(\"natives\").module\n + \"\\n})\", \"module\")(module);\n\n// TODO: make sure that event module gets loaded here once it's\n// factored out of module.js\n// module.require(\"events\");\n\n// Signal Handlers\n\nfunction isSignal (event) {\n return event.slice(0, 3) === 'SIG' && process.hasOwnProperty(event);\n};\n\nprocess.addListener(\"newListener\", function (event) {\n if (isSignal(event) && process.listeners(event).length === 0) {\n var b = process.binding('signal_watcher');\n var w = new b.SignalWatcher(process[event]);\n w.addListener(\"signal\", function () {\n process.emit(event);\n });\n }\n});\n\n// Timers\nfunction addTimerListener (callback) {\n var timer = this;\n // Special case the no param case to avoid the extra object creation.\n if (arguments.length > 2) {\n var args = Array.prototype.slice.call(arguments, 2);\n timer.callback = function () { callback.apply(timer, args); };\n } else {\n timer.callback = callback;\n }\n}\n\nglobal.setTimeout = function (callback, after) {\n var timer = new process.Timer();\n addTimerListener.apply(timer, arguments);\n timer.start(after, 0);\n return timer;\n};\n\nglobal.setInterval = function (callback, repeat) {\n var timer = new process.Timer();\n addTimerListener.apply(timer, arguments);\n timer.start(repeat, repeat);\n return timer;\n};\n\nglobal.clearTimeout = function (timer) {\n if (timer instanceof process.Timer) {\n timer.stop();\n }\n};\n\nglobal.clearInterval = global.clearTimeout;\n\nvar stdout;\nprocess.__defineGetter__('stdout', function () {\n if (stdout) return stdout;\n\n var binding = process.binding('stdio'),\n net = module.requireNative('net'),\n fs = module.requireNative('fs'),\n fd = binding.stdoutFD;\n\n if (binding.isStdoutBlocking()) {\n stdout = new fs.WriteStream(null, {fd: fd});\n } else {\n stdout = new net.Stream(fd);\n // FIXME Should probably have an option in net.Stream to create a stream from\n // an existing fd which is writable only. But for now we'll just add\n // this hack and set the `readable` member to false.\n // Test: ./node test/fixtures/echo.js < /etc/passwd\n stdout.readable = false;\n }\n\n return stdout;\n});\n\nvar stdin;\nprocess.openStdin = function () {\n if (stdin) return stdin;\n\nvar binding = process.binding('stdio'),\n net = module.requireNative('net'),\n fs = module.requireNative('fs'),\n fd = binding.openStdin();\n\n if (binding.isStdinBlocking()) {\n stdin = new net.Stream(fd);\n stdin.readable = true;\n } else {\n stdin = new fs.ReadStream(null, {fd: fd});\n }\n\n stdin.resume();\n\n return stdin;\n};\n\n\nprocess.exit = function (code) {\n process.emit(\"exit\");\n process.reallyExit(code);\n};\n\n\nmodule.runMain();\n\n\n// All our arguments are loaded. We've evaluated all of the scripts. We\n// might even have created TCP servers. Now we enter the main eventloop. If\n// there are no watchers on the loop (except for the ones that were\n// ev_unref'd) then this function exits. As long as there are active\n// watchers, it blocks.\nprocess.loop();\n\nprocess.emit(\"exit\");\n\n}"},{"handle":29,"type":"script","name":"node.js","id":14,"lineOffset":0,"columnOffset":0,"lineCount":180,"sourceStart":"(function (process) {\n\nprocess.global.process = process;\nprocess.global.global =","sourceLength":5042,"scriptType":2,"compilationType":0,"context":{"ref":28},"text":"node.js (lines: 180)"},{"handle":30,"type":"object","className":"EventEmitter","constructorFunction":{"ref":36},"protoObject":{"ref":67},"prototypeObject":{"ref":3},"properties":[{"name":"ENOMSG","ref":68},{"name":"setuid","ref":69},{"name":"SIGQUIT","ref":70},{"name":"S_IXOTH","ref":44},{"name":"compile","ref":71},{"name":"EISCONN","ref":72},{"name":"EOVERFLOW","ref":73},{"name":"platform","ref":74},{"name":"EIO","ref":41},{"name":"EAFNOSUPPORT","ref":75},{"name":"O_WRONLY","ref":44},{"name":"SIGFPE","ref":76},{"name":"SIGXCPU","ref":77},{"name":"ENODATA","ref":78},{"name":"argv","ref":79},{"name":"EPROTO","ref":80},{"name":"ENAMETOOLONG","ref":81},{"name":"S_IRWXO","ref":82},{"name":"ENOEXEC","ref":76},{"name":"O_EXCL","ref":83},{"name":"dlopen","ref":84},{"name":"_byteLength","ref":85},{"name":"SIGSEGV","ref":86},{"name":"EPROTONOSUPPORT","ref":87},{"name":"cwd","ref":88},{"name":"ENOLCK","ref":89},{"name":"O_SYNC","ref":90},{"name":"ECANCELED","ref":91},{"name":"ECONNABORTED","ref":92},{"name":"SIGINT","ref":54},{"name":"S_IRUSR","ref":93},{"name":"EBADMSG","ref":94},{"name":"error","ref":95},{"name":"O_RDWR","ref":54},{"name":"O_NOFOLLOW","ref":93},{"name":"SIGXFSZ","ref":96},{"name":"EIDRM","ref":97},{"name":"ENOSYS","ref":98},{"name":"S_IFBLK","ref":99},{"name":"SIGIOT","ref":100},{"name":"getuid","ref":101},{"name":"ENV","ref":102},{"name":"S_IWOTH","ref":54},{"name":"SIGUSR2","ref":103},{"name":"nextTick","ref":104},{"name":"SIGURG","ref":105},{"name":"ETIMEDOUT","ref":106},{"name":"ETXTBSY","ref":107},{"name":"S_IFIFO","ref":108},{"name":"EMLINK","ref":103},{"name":"SIGTTIN","ref":109},{"name":"S_IWGRP","ref":105},{"name":"S_IFCHR","ref":110},{"name":"loop","ref":111},{"name":"SIGKILL","ref":112},{"name":"S_IRWXG","ref":72},{"name":"S_IXGRP","ref":76},{"name":"EWOULDBLOCK","ref":113},{"name":"SIGHUP","ref":44},{"name":"reallyExit","ref":114},{"name":"ENOTSOCK","ref":115},{"name":"assert","ref":116},{"name":"SIGPROF","ref":117},{"name":"debug","ref":118},{"name":"EOPNOTSUPP","ref":119},{"name":"EEXIST","ref":120},{"name":"SIGALRM","ref":121},{"name":"ESRCH","ref":70},{"name":"EFAULT","ref":121},{"name":"EPROTOTYPE","ref":122},{"name":"SIGSYS","ref":123},{"name":"checkBreak","ref":124},{"name":"stdout","propertyType":3,"ref":3},{"name":"EDEADLK","ref":86},{"name":"ENOTTY","ref":96},{"name":"_tickCallback","ref":125},{"name":"S_IRGRP","ref":126},{"name":"Timer","ref":127},{"name":"ELOOP","ref":128},{"name":"SIGTRAP","ref":41},{"name":"S_IXUSR","ref":129},{"name":"O_APPEND","ref":76},{"name":"EDOM","ref":130},{"name":"O_TRUNC","ref":131},{"name":"O_DIRECTORY","ref":132},{"name":"Promise","ref":133},{"name":"ENOTCONN","ref":134},{"name":"ESTALE","ref":135},{"name":"memoryUsage","ref":136},{"name":"openStdin","ref":137},{"name":"EBUSY","ref":105},{"name":"EPERM","ref":44},{"name":"installPrefix","ref":138},{"name":"SIGTSTP","ref":139},{"name":"ENOTEMPTY","ref":140},{"name":"unloop","ref":141},{"name":"SIGABRT","ref":100},{"name":"mixin","ref":142},{"name":"unwatchFile","ref":143},{"name":"EFBIG","ref":117},{"name":"ECONNRESET","ref":144},{"name":"version","ref":145},{"name":"setgid","ref":146},{"name":"EINPROGRESS","ref":147},{"name":"EADDRNOTAVAIL","ref":148},{"name":"EINTR","ref":149},{"name":"evalcx","ref":150},{"name":"kill","ref":151},{"name":"pid","ref":152},{"name":"ENETUNREACH","ref":153},{"name":"SIGCHLD","ref":154},{"name":"ESPIPE","ref":155},{"name":"EALREADY","ref":156},{"name":"O_CREAT","ref":157},{"name":"EV_MAXPRI","ref":54},{"name":"global","ref":26},{"name":"mainModule","ref":7},{"name":"EROFS","ref":158},{"name":"SIGILL","ref":149},{"name":"EMULTIHOP","ref":159},{"name":"ETIME","ref":160},{"name":"ENOENT","ref":54},{"name":"S_IWUSR","ref":90},{"name":"env","ref":102},{"name":"EMSGSIZE","ref":161},{"name":"SIGTTOU","ref":162},{"name":"ENOSR","ref":163},{"name":"EMFILE","ref":77},{"name":"SIGWINCH","ref":164},{"name":"SIGUSR1","ref":158},{"name":"ENXIO","ref":100},{"name":"S_IFREG","ref":165},{"name":"SIGTERM","ref":166},{"name":"EventEmitter","ref":36},{"name":"ECHILD","ref":167},{"name":"EHOSTUNREACH","ref":168},{"name":"inherits","ref":169},{"name":"ENOTSUP","ref":170},{"name":"EADDRINUSE","ref":171},{"name":"S_IROTH","ref":149},{"name":"EBADF","ref":112},{"name":"S_IRWXU","ref":172},{"name":"EXDEV","ref":139},{"name":"ECONNREFUSED","ref":173},{"name":"ENOSTR","ref":174},{"name":"SIGVTALRM","ref":107},{"name":"S_IFSOCK","ref":175},{"name":"SIGPIPE","ref":176},{"name":"chdir","ref":177},{"name":"EDESTADDRREQ","ref":178},{"name":"ERANGE","ref":179},{"name":"exit","ref":180},{"name":"EILSEQ","ref":181},{"name":"ENOMEM","ref":123},{"name":"EPIPE","ref":126},{"name":"ARGV","ref":79},{"name":"EISDIR","ref":109},{"name":"SIGBUS","ref":167},{"name":"_needTickCallback","ref":182},{"name":"SIGCONT","ref":183},{"name":"SIGSTOP","ref":120},{"name":"EAGAIN","ref":113},{"name":"ENOPROTOOPT","ref":184},{"name":"ENETDOWN","ref":185},{"name":"ENETRESET","ref":186},{"name":"O_NOCTTY","ref":187},{"name":"createChildProcess","ref":188},{"name":"binding","ref":189},{"name":"ENFILE","ref":190},{"name":"ENOLINK","ref":191},{"name":"ENOTDIR","ref":154},{"name":"EINVAL","ref":162},{"name":"O_RDONLY","ref":64},{"name":"IOWatcher","ref":192},{"name":"EV_MINPRI","ref":193},{"name":"getgid","ref":194},{"name":"ENOSPC","ref":164},{"name":"ENOBUFS","ref":195},{"name":"SIGIO","ref":190},{"name":"EDQUOT","ref":196},{"name":"EACCES","ref":176},{"name":"S_IFDIR","ref":197},{"name":"E2BIG","ref":82},{"name":"_events","ref":198},{"name":"ENODEV","ref":183},{"name":"watchFile","ref":199},{"name":"S_IFLNK","ref":200},{"name":"umask","ref":201}],"text":"#<an EventEmitter>"},{"handle":31,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":202},"name":"removed","inferredName":"","resolved":true,"source":"function removed(reason) {\n return function () {\n throw new Error(reason)\n }\n}","script":{"ref":29},"scriptId":14,"position":213,"line":8,"column":17,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":5},{"name":"length","attributes":7,"propertyType":3,"ref":44},{"name":"name","attributes":7,"propertyType":3,"ref":203},{"name":"prototype","attributes":6,"propertyType":3,"ref":202},{"name":"caller","attributes":7,"propertyType":3,"ref":5}],"text":"function removed(reason) {\n return function () {\n throw new Error(reason)\n }\n}"},{"handle":32,"type":"object","className":"Array","constructorFunction":{"ref":204},"protoObject":{"ref":205},"prototypeObject":{"ref":3},"properties":[{"name":"length","attributes":6,"propertyType":3,"ref":64}],"text":"#<an Array>"},{"handle":33,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":206},"name":"addTimerListener","inferredName":"","resolved":true,"source":"function addTimerListener(callback) {\n var timer = this;\n // Special case the no param case to avoid the extra object creation.\n if (arguments.length > 2) {\n var args = Array.prototype.slice.call(arguments, 2);\n timer.callback = function () { callback.apply(timer, args); };\n } else {\n timer.callback = callback;\n }\n}","script":{"ref":29},"scriptId":14,"position":2652,"line":83,"column":26,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":5},{"name":"length","attributes":7,"propertyType":3,"ref":44},{"name":"name","attributes":7,"propertyType":3,"ref":207},{"name":"prototype","attributes":6,"propertyType":3,"ref":206},{"name":"caller","attributes":7,"propertyType":3,"ref":5}],"text":"function addTimerListener(callback) {\n var timer = this;\n // Special case the no param case to avoid the extra object creation.\n if (arguments.length > 2) {\n var args = Array.prototype.slice.call(arguments, 2);\n timer.callback = function () { callback.apply(timer, args); };\n } else {\n timer.callback = callback;\n }\n}"},{"handle":34,"type":"function","className":"Function","constructorFunction":{"ref":37},"protoObject":{"ref":38},"prototypeObject":{"ref":208},"name":"isSignal","inferredName":"","resolved":true,"source":"function isSignal(event) {\n return event.slice(0, 3) === 'SIG' && process.hasOwnProperty(event);\n}","script":{"ref":29},"scriptId":14,"position":2229,"line":68,"column":18,"properties":[{"name":"arguments","attributes":7,"propertyType":3,"ref":5},{"name":"length","attributes":7,"propertyType":3,"ref":44},{"name":"name","attributes":7,"propertyType":3,"ref":209},{"name":"prototype","attributes":6,"propertyType":3,"ref":208},{"name":"caller","attributes":7,"propertyType":3,"ref":5}],"text":"function isSignal(event) {\n return event.slice(0, 3) === 'SIG' && process.hasOwnProperty(event);\n}"}],"running":false}
2  spec/unit/commands/evaluate.js
View
@@ -99,7 +99,7 @@ describe("NodeDebugger", function() {
// verbose: >>> Content-Length: 132
// verbose: >>>
- // verbose: >>> {"type":"request","command":"evaluate","arguments":{"expression":"try { require('sys').inspect(require); } catch (_) { require }"}}
+ // verbose: >>> {"type":"request","command":"evaluate","arguments":{"expression":"try { require('util').inspect(require); } catch (_) { require }"}}
// verbose: >>>
// verbose: <<< Content-Length: 132
// verbose: <<<
Please sign in to comment.
Something went wrong with that request. Please try again.