From d9f3774aca7a2b1da5adb77f205a05f7f3e097b5 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 8 Aug 2012 12:36:50 -0700 Subject: 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. --- js/io/system/chromeapi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') 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, { break; } // - blob = new Blob([content], {type: type}); + blob = new Blob([new Uint8Array(content)], {type: type}); // writer.write(blob); // @@ -169,7 +169,7 @@ exports.ChromeApi = Montage.create(Object.prototype, { var reader = new FileReader(); reader.onloadend = function(e) { if (callback) { - callback({content: this.result, data: file, file: f, url: f.toURL()}); + callback({content: new Uint8Array(this.result), data: file, file: f, url: f.toURL()}); } }; reader.readAsArrayBuffer(file); -- cgit v1.2.3