Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: tools/codemap.js

Issue 1179173009: Add support for running the profiler output processing scripts with node. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Passed a missing type arg through to CodeEntry Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/SourceMap.js ('k') | tools/consarray.js » ('j') | tools/profile.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/codemap.js
diff --git a/tools/codemap.js b/tools/codemap.js
index fa6c36b50b9a1a1c8e52adab2da993909ef9b795..0f73204a4f5c2e768d3288c08a828fb1a16d47df 100644
--- a/tools/codemap.js
+++ b/tools/codemap.js
@@ -25,6 +25,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Node imports
+if (typeof module !== 'undefined' && module.exports) {
+ SplayTree = require('./splaytree');
+}
/**
* Constructs a mapper that maps addresses into code entries.
@@ -292,3 +296,8 @@ CodeMap.NameGenerator.prototype.getName = function(name) {
var count = ++this.knownNames_[name];
return name + ' {' + count + '}';
};
+
+// Node exports
+if (typeof module !== 'undefined' && module.exports) {
+ module.exports = CodeMap;
+}
« no previous file with comments | « tools/SourceMap.js ('k') | tools/consarray.js » ('j') | tools/profile.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698