[gjs] coverage: Add sanity check for rollback into negative lines
- From: Sam Spilsbury <samspilsbury src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] coverage: Add sanity check for rollback into negative lines
- Date: Tue, 23 Jun 2015 17:06:13 +0000 (UTC)
commit 6e63501138d905d517df74d318cc1a322dfb4d11
Author: Sam Spilsbury <smspillaz gmail com>
Date: Tue Jun 16 01:23:34 2015 +0800
coverage: Add sanity check for rollback into negative lines
modules/coverage.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/modules/coverage.js b/modules/coverage.js
index ec94adb..9255540 100644
--- a/modules/coverage.js
+++ b/modules/coverage.js
@@ -529,7 +529,7 @@ function _incrementFunctionCounters(functionCounters,
--line;
functionKey = name + ':' + line + ':' + nArgs;
functionCountersForKey = functionCounters[functionKey];
- } while (linesWithKnownFunctions[line] !== true);
+ } while (linesWithKnownFunctions[line] !== true && line > 0);
}
if (functionCountersForKey !== undefined) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]