Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions src/lib/libembind.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ var LibraryEmbind = {
}
#if ASSERTIONS
else if (typeof value != "bigint") {
throw new TypeError(`Cannot convert "${embindRepr(value)}" to ${this.name}`);
throw new TypeError(`Cannot convert "${embindRepr(value)}" to ${name}`);
}
assertIntegerRange(name, value, minRange, maxRange);
#endif
Expand Down Expand Up @@ -404,7 +404,7 @@ var LibraryEmbind = {
toWireType: (destructors, value) => {
#if ASSERTIONS
if (typeof value != "number" && typeof value != "boolean") {
throw new TypeError(`Cannot convert ${embindRepr(value)} to ${this.name}`);
throw new TypeError(`Cannot convert ${embindRepr(value)} to ${name}`);
}
#endif
// The VM will perform JS to Wasm value conversion, according to the spec:
Expand Down
1 change: 0 additions & 1 deletion src/lib/libwasi.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ var WasiLibrary = {
#endif

proc_exit__nothrow: true,
proc_exit__docs: '/** @noreturn */',
proc_exit: (code) => {
#if MINIMAL_RUNTIME
throw `exit(${code})`;
Expand Down
10 changes: 5 additions & 5 deletions src/preamble.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ function postRun() {

/**
* @param {string|number=} what
* @noreturn
*/
function abort(what) {
#if expectToReceiveOnModule('onAbort')
Expand Down Expand Up @@ -302,17 +301,18 @@ function abort(what) {
#if ASSERTIONS && !('$FS' in addedLibraryItems)
// show errors on likely calls to FS when it was not included
var FS = {
/** @return {*} */
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

does @return {undefined} work here?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@return {void} may be the answer

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this part is now reverted.

error() {
abort('Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM');
},
init() { FS.error() },
createDataFile() { FS.error() },
createPreloadedFile() { FS.error() },
createLazyFile() { FS.error() },
open() { FS.error() },
mkdev() { FS.error() },
createLazyFile() { return (/** @type {?} */ (FS.error())); },
open() { return (/** @type {?} */ (FS.error())); },
mkdev() { return (/** @type {?} */ (FS.error())); },
Comment thread
stephenduong1004 marked this conversation as resolved.
Outdated
registerDevice() { FS.error() },
analyzePath() { FS.error() },
analyzePath() { return (/** @type {?} */ (FS.error())); },

ErrnoError() { FS.error() },
};
Expand Down
Loading