[gjs] coverage: Fix jshint errors
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] coverage: Fix jshint errors
- Date: Sun, 18 Jan 2015 21:40:18 +0000 (UTC)
commit 923e3a86a0ca747e99f282eee08dc667a0a6d2c0
Author: Sam Spilsbury <smspillaz gmail com>
Date: Fri Jan 16 21:04:30 2015 +0800
coverage: Fix jshint errors
Fixes missing semicolons, undefined variables, unused variables
which should have been used over global variables, etc.
https://bugzilla.gnome.org/show_bug.cgi?id=742797
modules/coverage.js | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/modules/coverage.js b/modules/coverage.js
index 54e3d2c..8bd12ac 100644
--- a/modules/coverage.js
+++ b/modules/coverage.js
@@ -543,7 +543,7 @@ function _incrementFunctionCounters(functionCounters,
--line;
functionKey = name + ':' + line + ':' + nArgs;
functionCountersForKey = functionCounters[functionKey];
- } while(linesWithKnownFunctions[line] !== true)
+ } while (linesWithKnownFunctions[line] !== true);
}
if (functionCountersForKey !== undefined) {
@@ -633,7 +633,7 @@ function _convertFunctionCountersToArray(functionCounters) {
/* functionCounters is an object so convert it to
* an array-of-object using the key as a property
* of that object */
- for (let key in functionCounters) {
+ for (let key of Object.getOwnPropertyNames(functionCounters)) {
let func = functionCounters[key];
/* The name of the function contains its line, after the first
* colon. Split the name and retrieve it here */
@@ -748,7 +748,7 @@ function CoverageStatistics(files) {
return undefined;
}
- function _logExceptionAndReset(exception, callee, line) {
+ function _logExceptionAndReset(e, callee, line) {
warning(e.fileName + ":" + e.lineNumber + " (processing " +
frame.script.url + ":" + callee + ":" + line + ") - " +
e.message);
@@ -794,7 +794,7 @@ function CoverageStatistics(files) {
warning("executed " +
frame.script.url +
":" +
- offsetLine +
+ line +
" which we thought" +
" wasn't executable");
});
@@ -802,7 +802,7 @@ function CoverageStatistics(files) {
} catch (e) {
/* Something bad happened. Log the exception and delete
* statistics for this file */
- _logExceptionAndReset(e, name, line);
+ _logExceptionAndReset(e, name, offsetLine);
}
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]