From fecfa92d71633f8bb28bb97a60adc9b54998456f Mon Sep 17 00:00:00 2001 From: Max Graey Date: Fri, 28 Aug 2020 16:23:32 +0300 Subject: Add Binaryen(Get|Set)AllowHeavyweight to binaryen-c.h (#3082) These declarations were previously missing causing the respective APIs to be not exposed. Also makes sure that a Boolean is returned by the JS API and adds a test to verify that it is working now. --- src/js/binaryen.js-post.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/js/binaryen.js-post.js') diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index f8a0b8590..057252f78 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -3032,7 +3032,7 @@ Module['setOneCallerInlineMaxSize'] = function(size) { // Gets the value which allow inline functions that are not "lightweight". Module['getAllowHeavyweight'] = function() { - return Module['_BinaryenGetAllowHeavyweight'](); + return Boolean(Module['_BinaryenGetAllowHeavyweight']()); }; // Sets the value which allow inline functions that are not "lightweight". -- cgit v1.2.3