• mtrofin's avatar
    [wasm] Fix serialization after instantiation · f2531acb
    mtrofin authored
    The regression comes from attempting to serialize a module with memory
    requirements after instantiation - which is what happens in common emscripten
    scenarios, where the module is obtained from WebAssembly.instantiate(buffer). We then try and serialize the JSArrayBuffer
    representing the instance memory. That operation fails.
    
    Added regression test and also extended the test to cover the other 2
    instance-specific values - globals and tables.
    
    Added a discussion on WasmCompiledModule (comments) explaining design decisions.
    
    BUG=chromium:705562
    
    Review-Url: https://codereview.chromium.org/2784453002
    Cr-Commit-Position: refs/heads/master@{#44250}
    f2531acb
compiled-module-serialization.js 7.9 KB