|
| 1 | +- add support for workers in NWJS |
| 2 | +- remove global exception handling |
| 3 | +- add node-style module export |
| 4 | +--- |
| 5 | + http/secp256k1.js | 27 ++++++++++++++++----------- |
| 6 | + 1 file changed, 16 insertions(+), 11 deletions(-) |
| 7 | + |
| 8 | +diff --git a/http/secp256k1.js b/http/secp256k1.js |
| 9 | +index d54d1be..1ece7eb 100644 |
| 10 | +--- a/http/secp256k1.js |
| 11 | ++++ b/http/secp256k1.js |
| 12 | +@@ -75,11 +75,11 @@ var nodeFS; |
| 13 | + var nodePath; |
| 14 | + |
| 15 | + if (ENVIRONMENT_IS_NODE) { |
| 16 | +- if (ENVIRONMENT_IS_WORKER) { |
| 17 | +- scriptDirectory = require('path').dirname(scriptDirectory) + '/'; |
| 18 | +- } else { |
| 19 | ++ //if (ENVIRONMENT_IS_WORKER) { |
| 20 | ++ // scriptDirectory = require('path').dirname(scriptDirectory) + '/'; |
| 21 | ++ //} else { |
| 22 | + scriptDirectory = __dirname + '/'; |
| 23 | +- } |
| 24 | ++ //} |
| 25 | + |
| 26 | + // include: node_shell_read.js |
| 27 | + |
| 28 | +@@ -111,14 +111,15 @@ readBinary = function readBinary(filename) { |
| 29 | + module['exports'] = Module; |
| 30 | + } |
| 31 | + |
| 32 | +- process['on']('uncaughtException', function(ex) { |
| 33 | +- // suppress ExitStatus exceptions from showing an error |
| 34 | +- if (!(ex instanceof ExitStatus)) { |
| 35 | +- throw ex; |
| 36 | +- } |
| 37 | +- }); |
| 38 | ++ |
| 39 | ++ // process['on']('uncaughtException', function(ex) { |
| 40 | ++ // // suppress ExitStatus exceptions from showing an error |
| 41 | ++ // if (!(ex instanceof ExitStatus)) { |
| 42 | ++ // throw ex; |
| 43 | ++ // } |
| 44 | ++ // }); |
| 45 | ++ // process['on']('unhandledRejection', abort); |
| 46 | + |
| 47 | +- process['on']('unhandledRejection', abort); |
| 48 | + |
| 49 | + quit_ = function(status) { |
| 50 | + process['exit'](status); |
| 51 | +@@ -3238,6 +3239,10 @@ noExitRuntime = true; |
| 52 | + |
| 53 | + run(); |
| 54 | + |
| 55 | ++if (typeof module !== 'undefined') { |
| 56 | ++ module['exports'] = Module; |
| 57 | ++} |
| 58 | ++ |
| 59 | + |
0 commit comments