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

Side by Side Diff: ports/devenv/devenv.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 unified diff | Download patch
« no previous file with comments | « ports/devenv/bash.js ('k') | ports/devenv/devenvwidget/demo.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The Native Client Authors. All rights reserved. 2 * Copyright 2015 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* globals NaClProcessManager */
8
9 'use strict';
10
7 NaClProcessManager.fsroot = '/devenv'; 11 NaClProcessManager.fsroot = '/devenv';
8 12
9 // TODO(sbc): This should be handled by nacl_io or perhaps by NaClProcessManager 13 // TODO(sbc): This should be handled by nacl_io or perhaps by NaClProcessManager
10 function makeRootDir() { 14 function makeRootDir() {
11 return new Promise(function(accept, reject) { 15 return new Promise(function(accept, reject) {
12 function createDir(rootDirEntry, dirname) { 16 function createDir(rootDirEntry, dirname) {
13 rootDirEntry.getDirectory(dirname, {create: true}, 17 rootDirEntry.getDirectory(dirname, {create: true},
14 function(dirEntry) { 18 function(dirEntry) {
15 accept(); 19 accept();
16 }, 20 },
17 function() { 21 function() {
18 console.log('rootDirEntry.getDirectory failed'); 22 console.log('rootDirEntry.getDirectory failed');
19 reject(); 23 reject();
20 } 24 }
21 ); 25 );
22 } 26 }
23 27
24 window.requestFileSystem = window.requestFileSystem 28 window.requestFileSystem = (window.requestFileSystem ||
25 || window.webkitRequestFileSystem; 29 window.webkitRequestFileSystem);
26 window.requestFileSystem( 30 window.requestFileSystem(
27 PERSISTENT, 31 window.PERSISTENT,
28 0, 32 0,
29 function(fs) { createDir(fs.root, NaClProcessManager.fsroot); }, 33 function(fs) { createDir(fs.root, NaClProcessManager.fsroot); },
30 function() { 34 function() {
31 console.log('requestFileSystem failed!'); 35 console.log('requestFileSystem failed!');
32 reject(); 36 reject();
33 } 37 }
34 ); 38 );
35 }); 39 });
36 } 40 }
OLDNEW
« no previous file with comments | « ports/devenv/bash.js ('k') | ports/devenv/devenvwidget/demo.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698