Skip to content
Open
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
4 changes: 2 additions & 2 deletions test/js-api/wasm-module-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ class WasmModuleBuilder {
section.emit_u8(imp.mutable);
} else if (imp.kind == kExternalMemory) {
var has_max = (typeof imp.maximum) != "undefined";
var is_shared = (typeof imp.shared) != "undefined";
var is_shared = !!imp.shared;
if (is_shared) {
section.emit_u8(has_max ? 3 : 2); // flags
} else {
Expand Down Expand Up @@ -979,7 +979,7 @@ class WasmModuleBuilder {
binary.emit_section(kMemorySectionCode, section => {
section.emit_u8(1); // one memory entry
const has_max = wasm.memory.max !== undefined;
const is_shared = wasm.memory.shared !== undefined;
const is_shared = !!wasm.memory.shared;
// Emit flags (bit 0: reszeable max, bit 1: shared memory)
if (is_shared) {
section.emit_u8(has_max ? kSharedHasMaximumFlag : 2);
Expand Down
Loading