Skip to content
Merged
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
13 changes: 12 additions & 1 deletion src/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -4052,8 +4052,19 @@ LibraryManager.library = {
return 0; // we cannot succeed
},

_Unwind_RaiseException__deps: ['__cxa_find_matching_catch', '$EXCEPTIONS'],
_Unwind_RaiseException: function(ex) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this just call cxa_throw?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably yes, but cxa_throw takes three parameters and I'm not familiar enough with emscripten to know how to extract the relevant values from ex.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like you can call cxa_throw(ex, null, null).

abort('Unwind_RaiseException');
// TODO
Module.printErr('Warning: _Unwind_RaiseException is not correctly implemented');
EXCEPTIONS.infos[ex] = {
ptr: ex,
adjusted: ex,
type: null,
destructor: null,
refcount: 0
};
EXCEPTIONS.last = ex;
{{{ makeThrow('ex') }}}
},

_Unwind_DeleteException: function(ex) {
Expand Down