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

Unified Diff: ports/lua/lua.js

Issue 1415743013: Run jshint over all JavaScript files (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@repo_conf
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 | « ports/libgit2-demo/libgit2.js ('k') | ports/mongoose/mongoose.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/lua/lua.js
diff --git a/ports/lua/lua.js b/ports/lua/lua.js
index 8d1f5105ce8547005bcce01d34cca5017fec09c1..f7aa4479736a9aad7a969eefaaf7784b13590656 100644
--- a/ports/lua/lua.js
+++ b/ports/lua/lua.js
@@ -4,8 +4,12 @@
* found in the LICENSE file.
*/
-NaClTerm.nmf = 'lua.nmf'
-NaClTerm.env = ['NACL_DATA_MOUNT_FLAGS=manifest=/manifest.txt']
+/* globals NaClTerm, lib */
+
+'use strict';
+
+NaClTerm.nmf = 'lua.nmf';
+NaClTerm.env = ['NACL_DATA_MOUNT_FLAGS=manifest=/manifest.txt'];
function log(message) {
document.getElementById('log').textContent = message;
@@ -16,7 +20,7 @@ function fsErrorHandler(error) {
}
function uploadFile(file) {
- fs.root.getFile(file.name, {create: true, exclusive: true},
+ window.fs.root.getFile(file.name, {create: true, exclusive: true},
function(fileEntry) {
fileEntry.createWriter(function(fileWriter) {
// Note: write() can take a File or Blob object.
@@ -27,9 +31,9 @@ function uploadFile(file) {
}
function uploadFiles(evt) {
- var files = this.files;
- for (var i = 0, file; file = files[i]; ++i) {
- uploadFile(file)
+ var files = evt.srcElement.files;
+ for (var i = 0; i < files.length; i++) {
+ uploadFile(files[i]);
}
}
@@ -37,7 +41,7 @@ function onInitFS(fs) {
var upload = document.getElementById('upload');
if (upload !== null) {
upload.addEventListener('change', uploadFiles, false);
- window.fs = fs
+ window.fs = fs;
}
NaClTerm.init();
}
@@ -45,7 +49,7 @@ function onInitFS(fs) {
function onInit() {
navigator.webkitPersistentStorage.requestQuota(1024 * 1024,
function(bytes) {
- window.webkitRequestFileSystem(window.PERSISTENT, bytes, onInitFS)
+ window.webkitRequestFileSystem(window.PERSISTENT, bytes, onInitFS);
},
function() {
log("Failed to allocate space!\n");
« no previous file with comments | « ports/libgit2-demo/libgit2.js ('k') | ports/mongoose/mongoose.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698