Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 committed Apr 19, 2024
1 parent fe70ff7 commit b2eb77a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/library.js
Expand Up @@ -399,8 +399,8 @@ addToLibrary({

#if !STANDALONE_WASM
// Use to implement that native `abort` symbol. Note that we use the
// disctive JavaScript `abort` helper in order to implement this function,
// but we use a ditict name here to avoid confusing the two.
// JavaScript `abort` helper in order to implement this function, but we use a
// distinct name here to avoid confusing the two.
_abort_js: () => {
#if ASSERTIONS
abort('native code called abort()');
Expand Down
10 changes: 5 additions & 5 deletions system/lib/libc/musl/src/exit/abort.c
Expand Up @@ -13,11 +13,11 @@
_Noreturn void abort(void)
{
#if __EMSCRIPTEN__
/* In emscripten we call out JS to perform that actual abort where it can
* produce nice error.
* Note that JS library function not called `abort` to avoid conflit with
* the JavaScript abort helper (which takes a JS string and is used to
* implement _abort_js) */
/* In emscripten we call out JS to perform the actual abort where it can
* produce a nice error.
* Note that the JS library function not called `abort` to avoid conflict with
* the JavaScript abort helper (which takes a JS string as an argument and is
* itself used to implement _abort_js) */
_abort_js();
#else
raise(SIGABRT);
Expand Down
1 change: 1 addition & 0 deletions system/lib/standalone/standalone.c
Expand Up @@ -36,6 +36,7 @@

void _abort_js(void) {
__builtin_trap();
/* Beyond this point should be unreachable. */
_Exit(117);
}

Expand Down

0 comments on commit b2eb77a

Please sign in to comment.