google/trace-viewer — pull request #637 by xunjieli (2014-10-17 15:16:59+00:00)
Title: Fix slice error problem in parsing nestable async events

@dj2 I didn't know that javascript can reuse variables. The bug is that when I populate sliceError variable, it does not get cleared in the following iterations of the for loop. To see the bug in action, go to http://localhost:8003/examples/trace_viewer.html#nestable_async.json, you will see REQUEST_FOO's children all have slice error, while only the first one is supposed to. I changed the code so that we explicitly declare the variables as undefined in each iteration.