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

Unified Diff: tools/profile_view.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
Index: tools/profile_view.js
diff --git a/tools/profile_view.js b/tools/profile_view.js
index d1545acd99699adc8672afad809a969105ab0f74..43f5db10c60785f9642fc83a4c7ac222e61c5c3a 100644
--- a/tools/profile_view.js
+++ b/tools/profile_view.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) {
+ ConsArray = require('./consarray');
+}
/**
* Creates a Profile View builder object.
@@ -199,3 +203,9 @@ ProfileView.Node.prototype.sortChildren = function(
sortFunc) {
this.children.sort(sortFunc);
};
+
+// Node exports
+if (typeof module !== 'undefined' && module.exports) {
+ module.exports.ProfileView = ProfileView;
+ module.exports.ViewBuilder = ViewBuilder;
+}

Powered by Google App Engine
This is Rietveld 408576698