diff options
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/binaryen.js-post.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index d5943176e..3d732c1fc 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -2768,6 +2768,12 @@ Module['emitText'] = function(expr) { }; // Parses a binary to a module + +// If building with Emscripten ASSERTIONS, there is a property added to +// Module to guard against users mistakening using the removed readBinary() +// API. We must defuse that carefully. +Object.defineProperty(Module, 'readBinary', { writable: true }); + Module['readBinary'] = function(data) { var buffer = allocate(data, 'i8', ALLOC_NORMAL); var ptr = Module['_BinaryenModuleRead'](buffer, data.length); |