Commit 47e96513 authored by yangguo@chromium.org's avatar yangguo@chromium.org

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
parent 3086f373
......@@ -1071,7 +1071,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> 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<JSFunction> array_buffer_fun =
InstallFunction(
global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE,
......@@ -1081,7 +1081,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> 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<JSFunction> fun; \
......
......@@ -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
......
......@@ -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++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment