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

Side by Side Diff: native_client_sdk/src/examples/demo/nacl_io_demo/example.js

Issue 1062463004: [NaCl SDK] nacl_io: Fix use-after-free bug in html5fs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use const std::string& Created 5 years, 8 months 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 | « no previous file | native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function moduleDidLoad() { 5 function moduleDidLoad() {
6 common.hideModule(); 6 common.hideModule();
7 } 7 }
8 8
9 function $(id) { 9 function $(id) {
10 return document.getElementById(id); 10 return document.getElementById(id);
11 } 11 }
12 12
13 // Called by the common.js module. 13 // Called by the common.js module.
14 function domContentLoaded(name, tc, config, width, height) { 14 function domContentLoaded(name, tc, config, width, height) {
15 navigator.webkitPersistentStorage.requestQuota(1024 * 1024, 15 navigator.webkitPersistentStorage.requestQuota(5 * 1024 * 1024,
16 function(bytes) { 16 function(bytes) {
17 common.updateStatus( 17 common.updateStatus(
18 'Allocated ' + bytes + ' bytes of persistant storage.'); 18 'Allocated ' + bytes + ' bytes of persistant storage.');
19 common.attachDefaultListeners(); 19 common.attachDefaultListeners();
20 common.createNaClModule(name, tc, config, width, height); 20 common.createNaClModule(name, tc, config, width, height);
21 }, 21 },
22 function(e) { alert('Failed to allocate space') }); 22 function(e) { alert('Failed to allocate space') });
23 } 23 }
24 24
25 // Called by the common.js module. 25 // Called by the common.js module.
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 340 }
341 341
342 delete funcToCallback[funcName]; 342 delete funcToCallback[funcName];
343 callback.apply(null, params); 343 callback.apply(null, params);
344 } 344 }
345 } else { 345 } else {
346 common.logMessage('Error: Unknow message `' + data + 346 common.logMessage('Error: Unknow message `' + data +
347 '` received from NaCl module.'); 347 '` received from NaCl module.');
348 } 348 }
349 } 349 }
OLDNEW
« no previous file with comments | « no previous file | native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698