From: yangguo@chromium.org Date: Fri, 6 Jun 2014 08:15:05 +0000 (+0000) Subject: Fix bug in tools/plot-timer-events X-Git-Tag: upstream/4.7.83~8786 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47e96513afd278f46d97e41e9dd031d0cd7bb665;p=platform%2Fupstream%2Fv8.git Fix bug in tools/plot-timer-events Bug was introduced in r21338. R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/314143004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc index 9f59bcd..69aff08 100644 --- a/src/bootstrapper.cc +++ b/src/bootstrapper.cc @@ -1071,7 +1071,7 @@ void Genesis::InitializeGlobal(Handle inner_global, native_context()->set_json_object(*json_object); } - { // -- A r r a y B u f f e r + { // -- A r r a y B u f f e r Handle array_buffer_fun = InstallFunction( global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE, @@ -1081,7 +1081,7 @@ void Genesis::InitializeGlobal(Handle inner_global, native_context()->set_array_buffer_fun(*array_buffer_fun); } - { // -- T y p e d A r r a y s + { // -- T y p e d A r r a y s #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ { \ Handle fun; \ diff --git a/tools/plot-timer-events b/tools/plot-timer-events index 87ae0a0..15f28ac 100755 --- a/tools/plot-timer-events +++ b/tools/plot-timer-events @@ -15,7 +15,7 @@ if test ! "$D8_PATH"; then if test -x "$d8_public"; then D8_PATH=$(dirname "$d8_public"); fi fi -if test -n "$D8_PATH"; then +if test ! -n "$D8_PATH"; then D8_PATH=$tools_path/.. fi diff --git a/tools/profviz/composer.js b/tools/profviz/composer.js index 0c9437f..f9b3f2e 100644 --- a/tools/profviz/composer.js +++ b/tools/profviz/composer.js @@ -502,7 +502,8 @@ function PlotScriptComposer(kResX, kResY, error_output) { execution_pauses.sort( function(a, b) { return b.duration() - a.duration(); }); - var max_pause_time = execution_pauses[0].duration(); + var max_pause_time = execution_pauses.length > 0 + ? execution_pauses[0].duration() : 0; padding = kPauseLabelPadding * (range_end - range_start) / kResX; var y_scale = kY1Offset / max_pause_time / 2; for (var i = 0; i < execution_pauses.length && i < kNumPauseLabels; i++) {