Browse Source

doc: fix order of AtExit callbacks in addons.md

The sanity_check AtExit callback needs to come last to verify that the
other callbacks have been completed. This was not noticed before as this
code was not been executed.

PR-URL: https://github.com/nodejs/node/pull/14048
Reviewed-By: Michaël Zasso <targos@protonmail.com>
v6
Daniel Bevenius 7 years ago
parent
commit
02371c7a8c
  1. 2
      doc/api/addons.md

2
doc/api/addons.md

@ -1109,10 +1109,10 @@ static void sanity_check(void*) {
}
void init(Local<Object> exports) {
AtExit(sanity_check);
AtExit(at_exit_cb2, cookie);
AtExit(at_exit_cb2, cookie);
AtExit(at_exit_cb1, exports->GetIsolate());
AtExit(sanity_check);
}
NODE_MODULE(addon, init)

Loading…
Cancel
Save