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>
This commit is contained in:
parent
06ed0e8187
commit
02371c7a8c
@ -1109,10 +1109,10 @@ static void sanity_check(void*) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void init(Local<Object> exports) {
|
void init(Local<Object> exports) {
|
||||||
AtExit(sanity_check);
|
|
||||||
AtExit(at_exit_cb2, cookie);
|
AtExit(at_exit_cb2, cookie);
|
||||||
AtExit(at_exit_cb2, cookie);
|
AtExit(at_exit_cb2, cookie);
|
||||||
AtExit(at_exit_cb1, exports->GetIsolate());
|
AtExit(at_exit_cb1, exports->GetIsolate());
|
||||||
|
AtExit(sanity_check);
|
||||||
}
|
}
|
||||||
|
|
||||||
NODE_MODULE(addon, init)
|
NODE_MODULE(addon, init)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user