Skip to content

Commit

Permalink
Remove Module['quit'] handling (emscripten-core#22371)
Browse files Browse the repository at this point in the history
This could be used to overide the internal method for shutting down the
program, but it was neither documented nor tested. Programs that want to
intercept the shutting down of a program can use `Module['onExit']`.
  • Loading branch information
sbc100 authored Aug 14, 2024
1 parent 51f0346 commit c93788f
Show file tree
Hide file tree
Showing 64 changed files with 66 additions and 63 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ See docs/process.md for more on how version tagging works.

3.1.65 (in development)
-----------------------
- Remove `Module['quit']` handling. This could be used to override the internal
method for shutting down the program, but it was neither documented nor
tested. Programs that want to intercept the shutting down of a program can
use `Module['onExit']`. (#22371)
- The `NODEJS_CATCH_EXIT` setting is now disabled by default. This setting
is only useful under very specific circumstances, and has some downsides, so
disabling it by default makes sense. (#22257)
Expand Down
2 changes: 1 addition & 1 deletion src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ var INCOMING_MODULE_JS_API = [
'onRealloc', 'onRuntimeInitialized', 'postMainLoop', 'postRun', 'preInit',
'preMainLoop', 'preRun',
'preinitializedWebGLContext', 'preloadPlugins',
'print', 'printErr', 'quit', 'setStatus', 'statusMessage', 'stderr',
'print', 'printErr', 'setStatus', 'statusMessage', 'stderr',
'stdin', 'stdout', 'thisProgram', 'wasm', 'wasmBinary', 'websocket'
];

Expand Down
1 change: 0 additions & 1 deletion src/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,6 @@ checkIncomingModuleAPI();
// minified.
{{{ makeModuleReceive('arguments_', 'arguments') }}}
{{{ makeModuleReceive('thisProgram') }}}
{{{ makeModuleReceive('quit_', 'quit') }}}

// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message
#if ASSERTIONS
Expand Down
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_ctors1.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8540
8527
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_ctors1.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20901
20881
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_ctors2.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8524
8511
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_ctors2.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20869
20849
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_except.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9581
9571
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_except.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24807
24787
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_except_wasm.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8492
8484
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_except_wasm.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20794
20774
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8492
8484
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20794
20774
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_mangle.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9584
9574
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_mangle.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24808
24787
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_noexcept.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8540
8527
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_noexcept.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20901
20881
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_wasmfs.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3894
3885
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_cxx_wasmfs.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8700
8681
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_files_js_fs.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7656
7648
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_files_js_fs.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18802
18783
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_files_wasmfs.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2980
2969
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_files_wasmfs.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6336
6317
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_O0.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7971
7952
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_O0.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21339
21295
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_O1.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2800
2787
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_O1.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7014
6990
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_O2.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2478
2467
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_O2.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5027
5008
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_O3.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2391
2381
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_O3.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4873
4854
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_Os.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2391
2381
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_Os.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4873
4854
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_Oz.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2371
2362
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_Oz.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4840
4821
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_dylink.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6304
6293
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_dylink.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
13873
13854
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_wasmfs.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2391
2381
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_hello_wasmfs.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4873
4854
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1955
1946
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4110
4091
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1988
1980
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4157
4138
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_mem_O3.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2415
2406
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_mem_O3.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5025
5005
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_mem_O3_grow.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2556
2547
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_mem_O3_grow.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5304
5285
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2261
2250
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4713
4694
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_mem_O3_standalone.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2225
2216
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_mem_O3_standalone.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4643
4624
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1975
1967
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4161
4142
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1988
1980
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4157
4138
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1988
1980
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4157
4138
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_minimal_O0.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6550
6537
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_minimal_O0.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
17547
17516
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_minimal_pthreads.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5114
5102
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_minimal_pthreads.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11050
11031
2 changes: 1 addition & 1 deletion test/other/test_unoptimized_code_size.js.size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
54741
54662
2 changes: 1 addition & 1 deletion test/other/test_unoptimized_code_size_no_asserts.js.size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
30651
30606
2 changes: 1 addition & 1 deletion test/other/test_unoptimized_code_size_strict.js.size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
53677
53613

0 comments on commit c93788f

Please sign in to comment.