From 86346d6ebe417c7dc82bf275796a25e123a796d8 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Thu, 8 Aug 2019 19:10:46 -0700 Subject: [PATCH] Thread the feature support through to wasmparser. --- lib/runtime-core/src/codegen.rs | 2 +- lib/runtime-core/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/runtime-core/src/codegen.rs b/lib/runtime-core/src/codegen.rs index 422e46302..e69b9637c 100644 --- a/lib/runtime-core/src/codegen.rs +++ b/lib/runtime-core/src/codegen.rs @@ -140,7 +140,7 @@ impl< pub fn validating_parser_config(features: &Features) -> wasmparser::ValidatingParserConfig { wasmparser::ValidatingParserConfig { operator_config: wasmparser::OperatorValidatorConfig { - enable_threads: false, + enable_threads: features.threads, enable_reference_types: false, enable_simd: features.simd, enable_bulk_memory: false, diff --git a/lib/runtime-core/src/lib.rs b/lib/runtime-core/src/lib.rs index c12db47d9..c286cd67e 100644 --- a/lib/runtime-core/src/lib.rs +++ b/lib/runtime-core/src/lib.rs @@ -140,7 +140,7 @@ pub fn validate_and_report_errors_with_features( enable_bulk_memory: false, enable_multi_value: false, enable_reference_types: false, - enable_threads: false, + enable_threads: features.threads, }, mutable_global_imports: true, };