Skip to content

Commit

Permalink
Bug 1733836 - Fix build issue with wasm::TagType. r=rhunt
Browse files Browse the repository at this point in the history
  • Loading branch information
takikawa committed Oct 3, 2021
1 parent 504ad34 commit 25002b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions js/src/wasm/WasmModuleTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ size_t GlobalDesc::sizeOfExcludingThis(MallocSizeOf mallocSizeOf) const {
return initial_.sizeOfExcludingThis(mallocSizeOf);
}

#ifdef ENABLE_WASM_EXCEPTIONS
bool TagType::computeLayout() {
StructLayout layout;
int32_t refCount = 0;
Expand Down Expand Up @@ -216,7 +215,6 @@ bool TagType::computeLayout() {

return true;
}
#endif

size_t ElemSegment::serializedSize() const {
return sizeof(kind) + sizeof(tableIndex) + sizeof(elemType) +
Expand Down
4 changes: 3 additions & 1 deletion js/src/wasm/WasmModuleTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,14 @@ using GlobalDescVector = Vector<GlobalDesc, 0, SystemAllocPolicy>;
// A TagDesc represents fresh per-instance tags that are used for the
// exception handling proposal and potentially other future proposals.

#ifdef ENABLE_WASM_EXCEPTIONS
// The TagOffsetVector represents the offsets in the layout of the
// data stored in a Wasm exception. For non-reference values, it is
// an offset in the ArrayBuffer and for reference values it is the
// offset in the elements of the exception's ArrayObject.
using TagOffsetVector = Vector<int32_t, 0, SystemAllocPolicy>;

// Not guarded by #ifdef like TagDesc as this is required for Wasm JS
// API classes in WasmJS.h.
struct TagType {
ValTypeVector argTypes;
TagOffsetVector argOffsets;
Expand Down Expand Up @@ -314,6 +315,7 @@ struct TagType {
}
};

#ifdef ENABLE_WASM_EXCEPTIONS
struct TagDesc {
TagKind kind;
TagType type;
Expand Down

0 comments on commit 25002b5

Please sign in to comment.