We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f617301 commit 714162eCopy full SHA for 714162e
wrapper.js
@@ -34,16 +34,21 @@ function setupMethods (soljson) {
34
};
35
36
}
37
- var cb = soljson.Runtime.addFunction(wrapCallback(readCallback));
+
38
+ // This is to support multiple versions of Emscripten.
39
+ var addFunction = soljson.addFunction || soljson.Runtime.addFunction;
40
+ var removeFunction = soljson.removeFunction || soljson.Runtime.removeFunction;
41
42
+ var cb = addFunction(wrapCallback(readCallback));
43
var output;
44
try {
45
args.push(cb);
46
output = compile.apply(undefined, args);
47
} catch (e) {
- soljson.Runtime.removeFunction(cb);
48
+ removeFunction(cb);
49
throw e;
50
51
52
return output;
53
54
0 commit comments