aboutsummaryrefslogtreecommitdiff
path: root/js/io
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-08-08 12:36:50 -0700
committerJose Antonio Marquez2012-08-08 12:36:50 -0700
commitd9f3774aca7a2b1da5adb77f205a05f7f3e097b5 (patch)
tree9195c904347a4188062906a12f3eda028ea96be6 /js/io
parentc00ba985a16ca0a229089243c6e04280cbff758c (diff)
downloadninja-d9f3774aca7a2b1da5adb77f205a05f7f3e097b5.tar.gz
Fix: Using array buffer views for deprecated APIs
This addresses issues with Chrome Canary warnings related to library file copying. Please test fully before merging.
Diffstat (limited to 'js/io')
-rw-r--r--js/io/system/chromeapi.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/io/system/chromeapi.js b/js/io/system/chromeapi.js
index e33406ee..63bf2093 100644
--- a/js/io/system/chromeapi.js
+++ b/js/io/system/chromeapi.js
@@ -137,7 +137,7 @@ exports.ChromeApi = Montage.create(Object.prototype, {
137 break; 137 break;
138 } 138 }
139 // 139 //
140 blob = new Blob([content], {type: type}); 140 blob = new Blob([new Uint8Array(content)], {type: type});
141 // 141 //
142 writer.write(blob); 142 writer.write(blob);
143 // 143 //
@@ -169,7 +169,7 @@ exports.ChromeApi = Montage.create(Object.prototype, {
169 var reader = new FileReader(); 169 var reader = new FileReader();
170 reader.onloadend = function(e) { 170 reader.onloadend = function(e) {
171 if (callback) { 171 if (callback) {
172 callback({content: this.result, data: file, file: f, url: f.toURL()}); 172 callback({content: new Uint8Array(this.result), data: file, file: f, url: f.toURL()});
173 } 173 }
174 }; 174 };
175 reader.readAsArrayBuffer(file); 175 reader.readAsArrayBuffer(file);