Skip to content

Commit c0e47e4

Browse files
danbevMylesBorins
authored andcommitted
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: #14048 Reviewed-By: Michaël Zasso <[email protected]>
1 parent 9d84641 commit c0e47e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/addons.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1090,10 +1090,10 @@ static void sanity_check(void*) {
10901090
}
10911091

10921092
void init(Local<Object> exports) {
1093-
AtExit(sanity_check);
10941093
AtExit(at_exit_cb2, cookie);
10951094
AtExit(at_exit_cb2, cookie);
10961095
AtExit(at_exit_cb1, exports->GetIsolate());
1096+
AtExit(sanity_check);
10971097
}
10981098

10991099
NODE_MODULE(addon, init)

0 commit comments

Comments
 (0)