• Clemens Hammacher's avatar
    [wasm][test] Fix WasmModule::num_declared_functions · 7e4e5d0f
    Clemens Hammacher authored
    Our tests currently don't set {WasmModule::num_declared_functions}
    correctly. This CL fixes that.
    This enables the use of {WasmModule::num_declared_functions} instead of
    {NativeModule::num_functions_ - NativeModule::num_imported_functions_}.
    
    Drive-by: Fix {std::vector} reservation to reserve enough space for all
    functions during decoding.
    
    R=titzer@chromium.org
    
    Change-Id: I6d7783aed1c0de3275fc72787dec17c38ff8c73b
    Reviewed-on: https://chromium-review.googlesource.com/1106166
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53857}
    7e4e5d0f
wasm-module.h 10.9 KB