From 01518749b72ea7ae0925867dfd07b025ae4dd4dc Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Mon, 2 Feb 2015 19:28:00 -0800 Subject: [PATCH] make profile-require.js not to require files.js --- tools/profile-require.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/profile-require.js b/tools/profile-require.js index 45e2665035..129c7f4981 100644 --- a/tools/profile-require.js +++ b/tools/profile-require.js @@ -26,9 +26,10 @@ RequireInvocation.prototype.isOurCode = function () { if (! self.name.match(/\//)) return false; // we always require our stuff via a path - var files = require('./files.js'); - var ourSource = files.pathResolve(__dirname); - var required = files.pathResolve(files.pathDirname(self.filename), self.name); + // it is OK to use path here and not files.js as we are just checking the path + var path = require('path'); + var ourSource = path.resolve(__dirname); + var required = path.resolve(path.dirname(self.filename), self.name); if (ourSource.length > required.length) return false; return required.substr(0, ourSource.length) === ourSource;