• Clemens Backes's avatar
    [wasm] Fix types used in Result and Decoder::toResult · e1754372
    Clemens Backes authored
    The type stored in {Result} should not always be the same as derived by
    the compiler for the argument to {Decoder::toResult}. If we pass in a
    temporary, we most often want it to be stored by value, not by
    reference.
    This CL enforces this; if requirements change in the future, we can
    remove the static assertions and think about how to protect against
    accidental UAF when referencing a temporary value.
    
    R=jkummerow@chromium.org
    CC=mliedtke@chromium.org
    
    Change-Id: Ia0449e6ed7342319799479b200af35660fccc6d7
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3792115Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#82115}
    e1754372
wasm-result.h 5.82 KB