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

Unified Diff: ports/snes9x/snes9x.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/scummvm/packaged_app/background.js ('k') | ports/thttpd/nacl.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/snes9x/snes9x.js
diff --git a/ports/snes9x/snes9x.js b/ports/snes9x/snes9x.js
index 627c3482ae38b0798c4af66963e194afe04033f3..242e1b54045aae609a78bb99522a94c984c25af0 100644
--- a/ports/snes9x/snes9x.js
+++ b/ports/snes9x/snes9x.js
@@ -4,6 +4,8 @@
* found in the LICENSE file.
*/
+'use strict';
+
function domContentLoaded() {
document.getElementById('romfile').addEventListener(
'change', handleFileSelect, false);
@@ -15,16 +17,14 @@ function handleFileSelect(evt) {
var result = null;
console.log('reader.readAsArrayBuffer');
- reader.onloadend = onReadSuccess;
+ reader.onloadend = onLoadEnd;
reader.onerror = errorHandler;
reader.readAsArrayBuffer(file);
- function onReadSuccess() {
- result = this.result;
-
+ function onLoadEnd(evt) {
console.log('window.webkitRequestFileSystem');
window.webkitRequestFileSystem(
- window.TEMPORARY, result.size, onRequestQuotaSuccess, errorHandler);
+ window.TEMPORARY, evt.result.size, onRequestQuotaSuccess, errorHandler);
}
function onRequestQuotaSuccess(fs) {
« no previous file with comments | « ports/scummvm/packaged_app/background.js ('k') | ports/thttpd/nacl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698