mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
wasi: rename __wasi_unstable_reactor_start()
Upstream WASI has renamed __wasi_unstable_reactor_start() to _initialize(). This commit updates Node's WASI implementation to reflect that change. PR-URL: https://github.com/nodejs/node/pull/33073 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host>
This commit is contained in:
parent
9037ad3e78
commit
4791ea09bd
@ -78,8 +78,8 @@ added:
|
||||
|
||||
Attempt to begin execution of `instance` by invoking its `_start()` export.
|
||||
If `instance` does not contain a `_start()` export, then `start()` attempts to
|
||||
invoke the `__wasi_unstable_reactor_start()` export. If neither of those exports
|
||||
is present on `instance`, then `start()` does nothing.
|
||||
invoke the `_initialize()` export. If neither of those exports is present on
|
||||
`instance`, then `start()` does nothing.
|
||||
|
||||
`start()` requires that `instance` exports a [`WebAssembly.Memory`][] named
|
||||
`memory`. If `instance` does not have a `memory` export an exception is thrown.
|
||||
|
@ -97,8 +97,8 @@ class WASI {
|
||||
try {
|
||||
if (exports._start)
|
||||
exports._start();
|
||||
else if (exports.__wasi_unstable_reactor_start)
|
||||
exports.__wasi_unstable_reactor_start();
|
||||
else if (exports._initialize)
|
||||
exports._initialize();
|
||||
} catch (err) {
|
||||
if (err !== kExitCode) {
|
||||
throw err;
|
||||
|
@ -83,7 +83,7 @@ const bufferSource = fixtures.readSync('simple.wasm');
|
||||
get() {
|
||||
return {
|
||||
memory: new WebAssembly.Memory({ initial: 1 }),
|
||||
__wasi_unstable_reactor_start: common.mustCall()
|
||||
_initialize: common.mustCall()
|
||||
};
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user