• clemensh's avatar
    [wasm] Fix memory bug · 7461fc6c
    clemensh authored
    In CreateModuleObjectFromBytes, pointers to the raw bytes will be stored
    inside the decoded WasmModule, and still used after allocating V8 stuff
    in WasmModule::CompileFunctions. We thus cannot pass a raw pointer to
    the V8 heap.
    Fix this by copying the bytes before decoding.
    
    R=mtrofin@chromium.org, titzer@chromium.org
    
    Review-Url: https://codereview.chromium.org/2402633002
    Cr-Commit-Position: refs/heads/master@{#40077}
    7461fc6c
api.cc 329 KB