Skip to content

Commit 010d061

Browse files
Revert "avoid using public class fields in js"
This reverts commit c6be531.
1 parent c6be531 commit 010d061

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/library.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,10 +2282,8 @@ addToLibrary({
22822282
},
22832283

22842284
$HandleAllocator: class {
2285-
constructor() {
2286-
this.allocated = [undefined];
2287-
this.freelist = [];
2288-
}
2285+
allocated = [undefined];
2286+
freelist = [];
22892287
get(id) {
22902288
#if ASSERTIONS
22912289
assert(this.allocated[id] !== undefined, `invalid handle: ${id}`);

src/library_bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ addToLibrary({
1616
$callRuntimeCallbacks: () => {},
1717

1818
$ExitStatus: class {
19+
name = 'ExitStatus';
1920
constructor(status) {
20-
this.name = 'ExitStatus';
2121
this.message = `Program terminated with exit(${status})`;
2222
this.status = status;
2323
}

src/library_wasi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
var WasiLibrary = {
88
#if !MINIMAL_RUNTIME
99
$ExitStatus: class {
10+
name = 'ExitStatus';
1011
constructor(status) {
11-
this.name = 'ExitStatus';
1212
this.message = `Program terminated with exit(${status})`;
1313
this.status = status;
1414
}

0 commit comments

Comments
 (0)