diff --git a/Gruntfile.js b/Gruntfile.js index 47aae103..3be3c0d8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -21,7 +21,7 @@ module.exports = function(grunt) { 'src/keyring/**/*.js', 'src/packet/**/*.jss', 'src/type/**/*.js', - 'src/worker/async_proxy.js', + 'src/worker/**/*.js', 'src/*.js', ]; // add more over time ... goal should be 100% coverage diff --git a/src/worker/worker.js b/src/worker/worker.js index 525cf43f..742d6432 100644 --- a/src/worker/worker.js +++ b/src/worker/worker.js @@ -15,7 +15,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -window = {}; // to make UMD bundles work +this.window = {}; // to make UMD bundles work // Mozilla bind polyfill because phantomjs is stupid if (!Function.prototype.bind) { @@ -46,7 +46,7 @@ var MAX_SIZE_RANDOM_BUFFER = 60000; window.openpgp.crypto.random.randomBuffer.init(MAX_SIZE_RANDOM_BUFFER); -self.onmessage = function (event) { +this.onmessage = function (event) { var data = null, err = null, msg = event.data,