diff options
Diffstat (limited to 'src/binary-reader.cc')
-rw-r--r-- | src/binary-reader.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/binary-reader.cc b/src/binary-reader.cc index c3f70e12..6d309172 100644 --- a/src/binary-reader.cc +++ b/src/binary-reader.cc @@ -1722,9 +1722,6 @@ Result BinaryReader::ReadCustomSection(Offset section_size) { CHECK_RESULT(ReadRelocSection(section_size)); } else if (section_name == WABT_BINARY_SECTION_LINKING) { CHECK_RESULT(ReadLinkingSection(section_size)); - } else if (options_.features.exceptions_enabled() && - section_name == WABT_BINARY_SECTION_EXCEPTION) { - CHECK_RESULT(ReadExceptionSection(section_size)); } else { // This is an unknown custom section, skip it. state_.offset = read_end_; @@ -2196,6 +2193,12 @@ Result BinaryReader::ReadSections() { section_result = ReadDataSection(section_size); result |= section_result; break; + case BinarySection::Event: + ERROR_UNLESS(options_.features.exceptions_enabled(), + "invalid section code: %u", section); + section_result = ReadExceptionSection(section_size); + result |= section_result; + break; case BinarySection::DataCount: ERROR_UNLESS(options_.features.bulk_memory_enabled(), "invalid section code: %u", section); |