Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/jsifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function ${name}(${args}) {
// the number specifies the number of arguments. In Emscripten, route all
// these to a single function '__cxa_find_matching_catch' that variadically
// processes all of these functions using JS 'arguments' object.
if (symbol.startsWith('__cxa_find_matching_catch_')) {
if (!WASM_EXCEPTIONS && symbol.startsWith('__cxa_find_matching_catch_')) {
if (DISABLE_EXCEPTION_THROWING) {
error('DISABLE_EXCEPTION_THROWING was set (likely due to -fno-exceptions), which means no C++ exception throwing support code is linked in, but exception catching code appears. Either do not set DISABLE_EXCEPTION_THROWING (if you do want exception throwing) or compile all source files with -fno-except (so that no exceptions support code is required); also make sure DISABLE_EXCEPTION_CATCHING is set to the right value - if you want exceptions, it should be off, and vice versa.');
return;
Expand Down
3 changes: 2 additions & 1 deletion src/library_exceptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ var LibraryExceptions = {
// functionality boils down to picking a suitable 'catch' block.
// We'll do that here, instead, to keep things simpler.
__cxa_find_matching_catch__deps: ['$exceptionLast', '$ExceptionInfo', '__resumeException', '__cxa_can_catch', 'setTempRet0'],
//__cxa_find_matching_catch__sig: 'p',
__cxa_find_matching_catch: function() {
var thrown =
#if EXCEPTION_STACK_TRACES
Expand Down Expand Up @@ -408,6 +407,7 @@ var LibraryExceptions = {
#endif
};

#if !WASM_EXCEPTIONS
// In LLVM, exceptions generate a set of functions of form
// __cxa_find_matching_catch_1(), __cxa_find_matching_catch_2(), etc. where the
// number specifies the number of arguments. In Emscripten, route all these to
Expand All @@ -416,5 +416,6 @@ var LibraryExceptions = {
addCxaCatch = function(n) {
LibraryManager.library['__cxa_find_matching_catch_' + n] = '__cxa_find_matching_catch';
};
#endif

mergeInto(LibraryManager.library, LibraryExceptions);