Skip to content

Commit 02371c7

Browse files
committed
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: nodejs#14048 Reviewed-By: Michaël Zasso <[email protected]>
1 parent 06ed0e8 commit 02371c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/addons.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,10 +1109,10 @@ static void sanity_check(void*) {
11091109
}
11101110

11111111
void init(Local<Object> exports) {
1112-
AtExit(sanity_check);
11131112
AtExit(at_exit_cb2, cookie);
11141113
AtExit(at_exit_cb2, cookie);
11151114
AtExit(at_exit_cb1, exports->GetIsolate());
1115+
AtExit(sanity_check);
11161116
}
11171117

11181118
NODE_MODULE(addon, init)

0 commit comments

Comments
 (0)