Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: ports/gdb/background.js

Issue 1436283002: Add support for jslint and cleanup core JavaScript files (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « package.json ('k') | ports/libgit2-demo/libgit2.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/gdb/background.js
diff --git a/ports/gdb/background.js b/ports/gdb/background.js
index 0764d2308dad512ddf6c8c335f67d05480cee0bc..600df1d1f111bc5e8ce86624bcf0d594605673fe 100644
--- a/ports/gdb/background.js
+++ b/ports/gdb/background.js
@@ -23,7 +23,8 @@
*/
function rspChecksum_(cmd) {
var checksum = 0;
- for (var i = 0; i < cmd.length; i++) {
+ var i;
+ for (i = 0; i < cmd.length; i++) {
checksum = (checksum + cmd.charCodeAt(i)) & 0xff;
}
var checksumStr = '0' + checksum.toString(16);
@@ -39,7 +40,8 @@ function rspChecksum_(cmd) {
function stringToArrayBuffer_(str) {
var buf = new ArrayBuffer(str.length);
var view = new Uint8Array(buf);
- for (var i = 0; i < str.length; i++) {
+ var i;
+ for (i = 0; i < str.length; i++) {
view[i] = str.charCodeAt(i);
}
return buf;
@@ -71,7 +73,8 @@ function rspMessage_(cmd) {
function rspDecode_(msg) {
var view = new Uint8Array(msg);
var result = '';
- for (var i = 0; i < msg.byteLength; i++) {
+ var i;
+ for (i = 0; i < msg.byteLength; i++) {
result += String.fromCharCode(view[i]);
}
return result;
« no previous file with comments | « package.json ('k') | ports/libgit2-demo/libgit2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698