doc: fix order of AtExit callbacks in addons.md · nodejs/node@c0e47e4

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit c0e47e4

danbevMylesBorins

authored and

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: #14048 Reviewed-By: Michaël Zasso <targos@protonmail.com>

1 parent 9d84641 commit c0e47e4

File tree

1 file changed

+

1

-

1

lines changed

1 file changed

+

1

-

1

lines changed

Lines changed: 1 addition & 1 deletion

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)