Skip to content

Commit 60da014

Browse files
authored
Use abort function in MINIMAL_RUNTIME (#14908)
The abort runtime function exists in preamble_minimal.js as well as preable.js so there is no reason not to use use (should be a code size saving due to reduced duplication).
1 parent d23597a commit 60da014

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/library.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -446,12 +446,7 @@ LibraryManager.library = {
446446
// and this function _abort(). Remove one of these, importing two functions for the same purpose is wasteful.
447447
abort__sig: 'v',
448448
abort: function() {
449-
#if MINIMAL_RUNTIME
450-
// In MINIMAL_RUNTIME the module object does not exist, so its behavior to abort is to throw directly.
451-
throw 'abort';
452-
#else
453449
abort();
454-
#endif
455450
},
456451

457452
// This object can be modified by the user during startup, which affects

0 commit comments

Comments
 (0)