diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2015-03-27 12:04:12 +0100 |
---|---|---|
committer | Chris Dickinson <christopher.s.dickinson@gmail.com> | 2015-04-28 14:38:16 -0700 |
commit | 36cd5fb9d27b830320e57213f5b8829ffbb93324 (patch) | |
tree | bbab4215d26f8597019135206426fccf27a3089e /deps/v8/tools/logreader.js | |
parent | b57cc51d8d3f4ad279591ae8fa6584ee22773b97 (diff) | |
download | android-node-v8-36cd5fb9d27b830320e57213f5b8829ffbb93324.tar.gz android-node-v8-36cd5fb9d27b830320e57213f5b8829ffbb93324.tar.bz2 android-node-v8-36cd5fb9d27b830320e57213f5b8829ffbb93324.zip |
deps: upgrade v8 to 4.2.77.13
This commit applies some secondary changes in order to make `make test`
pass cleanly:
* disable broken postmortem debugging in common.gypi
* drop obsolete strict mode test in parallel/test-repl
* drop obsolete test parallel/test-v8-features
PR-URL: https://github.com/iojs/io.js/pull/1232
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'deps/v8/tools/logreader.js')
-rw-r--r-- | deps/v8/tools/logreader.js | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/deps/v8/tools/logreader.js b/deps/v8/tools/logreader.js index 5f0ec7f6c7..ceac2b8268 100644 --- a/deps/v8/tools/logreader.js +++ b/deps/v8/tools/logreader.js @@ -35,15 +35,21 @@ * * @param {Array.<Object>} dispatchTable A table used for parsing and processing * log records. + * @param {boolean} timedRange Ignore ticks outside timed range. * @constructor */ -function LogReader(dispatchTable) { +function LogReader(dispatchTable, timedRange) { /** * @type {Array.<Object>} */ this.dispatchTable_ = dispatchTable; /** + * @type {boolean} + */ + this.timedRange_ = timedRange; + + /** * Current line. * @type {number} */ @@ -54,6 +60,18 @@ function LogReader(dispatchTable) { * @type {CsvParser} */ this.csvParser_ = new CsvParser(); + + /** + * Keeps track of whether we've seen a "current-time" tick yet. + * @type {boolean} + */ + this.hasSeenTimerMarker_ = false; + + /** + * List of log lines seen since last "current-time" tick. + * @type {Array.<String>} + */ + this.logLinesSinceLastTimerMarker_ = []; }; @@ -83,7 +101,24 @@ LogReader.prototype.processLogChunk = function(chunk) { * @param {string} line A line of log. */ LogReader.prototype.processLogLine = function(line) { - this.processLog_([line]); + if (!this.timedRange_) { + this.processLog_([line]); + return; + } + if (line.startsWith("current-time")) { + if (this.hasSeenTimerMarker_) { + this.processLog_(this.logLinesSinceLastTimerMarker_); + this.logLinesSinceLastTimerMarker_ = []; + } else { + this.hasSeenTimerMarker_ = true; + } + } else { + if (this.hasSeenTimerMarker_) { + this.logLinesSinceLastTimerMarker_.push(line); + } else if (!line.startsWith("tick")) { + this.processLog_([line]); + } + } }; |