Skip to content

Commit

Permalink
Merge branch 'narwhal-lib' of ../narwhal
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed May 23, 2010
2 parents cba1094 + 1f27b5a commit f182f2f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions lib/narwhal/sandbox.js
Expand Up @@ -29,9 +29,6 @@ exports.Sandbox = function (options) {
if (!options) if (!options)
options = {}; options = {};


if (sandbox.debug)
SYSTEM.print("REQUIRE: id["+id+"] baseId["+baseId+"] pkg["+pkg+"] basePkg["+basePkg+"]");

if (loader.resolvePkg) { if (loader.resolvePkg) {
var resolveInfo = loader.resolvePkg(id, baseId, pkg, basePkg); var resolveInfo = loader.resolvePkg(id, baseId, pkg, basePkg);
id = resolveInfo[0]; id = resolveInfo[0];
Expand All @@ -40,14 +37,11 @@ exports.Sandbox = function (options) {
id = loader.resolve(id, baseId); id = loader.resolve(id, baseId);
} }


if (sandbox.debug)
SYSTEM.print("USING: id["+id+"] pkg["+pkg+"]");

/* populate memo with module instance */ /* populate memo with module instance */
if (!Object.prototype.hasOwnProperty.call(exportsMemo, id) || options.force || options.once) { if (!Object.prototype.hasOwnProperty.call(exportsMemo, id) || options.force || options.once) {


if (sandbox.debug) if (sandbox.debug)
SYSTEM.print(new Array(++debugDepth + 1).join("\\") + " " + id, 'module'); SYSTEM.print(new Array(++debugDepth + 1).join("\\") + " " + id);


var globals = {}; var globals = {};
if (sandbox.debug) { if (sandbox.debug) {
Expand Down Expand Up @@ -121,6 +115,9 @@ exports.Sandbox = function (options) {
} }
} }


if (sandbox.debug)
SYSTEM.print(factory.path);

if (sandbox.debug) { if (sandbox.debug) {
// check for new globals // check for new globals
for (var name in global) for (var name in global)
Expand All @@ -129,7 +126,7 @@ exports.Sandbox = function (options) {
} }


if (sandbox.debug) if (sandbox.debug)
SYSTEM.print(new Array(debugDepth-- + 1).join("/") + " " + id, 'module'); SYSTEM.print(new Array(debugDepth-- + 1).join("/") + " " + id);


// set fn.displayName on exported functions for better debugging // set fn.displayName on exported functions for better debugging
if (setDisplayName) { if (setDisplayName) {
Expand Down

0 comments on commit f182f2f

Please sign in to comment.