Skip to content

Commit fdbd73c

Browse files
Fix multiple jscompiler errors (#26632)
Fix the following errors after #26424: ``` - ERROR - [JSC_BAD_JSDOC_ANNOTATION] Parse error. illegal use of unknown JSDoc tag "noreturn"; ignoring it. Place another character before the @ to stop JSCompiler from parsing it as an annotation. - ERROR - [JSC_USED_GLOBAL_THIS] dangerous use of the global this object. ```
1 parent c22a176 commit fdbd73c

6 files changed

Lines changed: 11 additions & 15 deletions

File tree

src/lib/libembind.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ var LibraryEmbind = {
375375
}
376376
#if ASSERTIONS
377377
else if (typeof value != "bigint") {
378-
throw new TypeError(`Cannot convert "${embindRepr(value)}" to ${this.name}`);
378+
throw new TypeError(`Cannot convert "${embindRepr(value)}" to ${name}`);
379379
}
380380
assertIntegerRange(name, value, minRange, maxRange);
381381
#endif
@@ -404,7 +404,7 @@ var LibraryEmbind = {
404404
toWireType: (destructors, value) => {
405405
#if ASSERTIONS
406406
if (typeof value != "number" && typeof value != "boolean") {
407-
throw new TypeError(`Cannot convert ${embindRepr(value)} to ${this.name}`);
407+
throw new TypeError(`Cannot convert ${embindRepr(value)} to ${name}`);
408408
}
409409
#endif
410410
// The VM will perform JS to Wasm value conversion, according to the spec:

src/lib/libwasi.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ var WasiLibrary = {
1717
#endif
1818

1919
proc_exit__nothrow: true,
20-
proc_exit__docs: '/** @noreturn */',
2120
proc_exit: (code) => {
2221
#if MINIMAL_RUNTIME
2322
throw `exit(${code})`;

src/preamble.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ function postRun() {
237237

238238
/**
239239
* @param {string|number=} what
240-
* @noreturn
241240
*/
242241
function abort(what) {
243242
#if expectToReceiveOnModule('onAbort')

test/codesize/test_codesize_file_preload.expected.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ function postRun() {}
363363

364364
/**
365365
* @param {string|number=} what
366-
* @noreturn
367366
*/ function abort(what) {
368367
what = `Aborted(${what})`;
369368
// TODO(sbc): Should we remove printing and leave it up to whoever
@@ -3082,7 +3081,7 @@ function _fd_write(fd, iov, iovcnt, pnum) {
30823081

30833082
var keepRuntimeAlive = () => true;
30843083

3085-
/** @noreturn */ var _proc_exit = code => {
3084+
var _proc_exit = code => {
30863085
EXITSTATUS = code;
30873086
if (!keepRuntimeAlive()) {
30883087
ABORT = true;

test/codesize/test_codesize_minimal_O0.expected.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,6 @@ function postRun() {
510510

511511
/**
512512
* @param {string|number=} what
513-
* @noreturn
514513
*/
515514
function abort(what) {
516515

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
"hello_world.js": 57030,
3-
"hello_world.js.gz": 17755,
2+
"hello_world.js": 56998,
3+
"hello_world.js.gz": 17743,
44
"hello_world.wasm": 14850,
55
"hello_world.wasm.gz": 7311,
6-
"no_asserts.js": 26654,
7-
"no_asserts.js.gz": 8901,
6+
"no_asserts.js": 26622,
7+
"no_asserts.js.gz": 8888,
88
"no_asserts.wasm": 12010,
99
"no_asserts.wasm.gz": 5880,
10-
"strict.js": 54848,
11-
"strict.js.gz": 17063,
10+
"strict.js": 54816,
11+
"strict.js.gz": 17052,
1212
"strict.wasm": 14850,
1313
"strict.wasm.gz": 7311,
14-
"total": 180242,
15-
"total_gz": 64221
14+
"total": 180146,
15+
"total_gz": 64185
1616
}

0 commit comments

Comments
 (0)