[wasm] Fix memory management for Result types
Make ModuleResult and FunctionResult return Result<std::unique_ptr<X>>. This makes memory ownership and transfer of ownership more clear and avoids a lot of manual releases of the referenced native heap object. R=ahaas@chromium.org Change-Id: I7a3f5bd7761b6ae1ebdc7d17ff1b96a8df599871 Reviewed-on: https://chromium-review.googlesource.com/498352Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#45160}
Showing
Please
register
or
sign in
to comment