• Clemens Hammacher's avatar
    [wasm] Call FatalProcessOutOfMemory on OOM · 468a9303
    Clemens Hammacher authored
    Instead of returning nullptr, just always call FatalProcessOutOfMemory
    when we cannot allocate more memory.
    In a follow-up CL, this should be extended to first try to run a GC and
    see if this freed enough memory.
    This CL is intentionally minimal in order to make it backmergable.
    
    The unittest for WasmCodeManager needs to be refactored into a
    parameterized test, such that each individual (parameterized) test can
    die with OOM without affecting other tests.
    
    R=mstarzinger@chromium.org
    
    Bug: chromium:822266
    Change-Id: I1336aa05ed50124b77ffaa4435ec9bed70e15c18
    Reviewed-on: https://chromium-review.googlesource.com/966501Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#52025}
    468a9303
wasm-code-manager.cc 38.6 KB