[wasm] Fix several gc issues
The pattern "handle->foo(factory->NewXX())" is unsafe, because the evaluation order of the receiver (dereferencing the handle) and the argument (allocating something on the heap) is undefined. If the receiver is evaluated first, then the allocation in the evaluation of the argument might invalidate the receiver. In general, gcmole should catch these errors, but sadly, if the method "foo" receives a Handle, it seems to not catch them. We should generally refactor our getters and setters to receive and return raw pointers instead of handles, just like most other code in our code base. R=mtrofin@chromium.org, ahaas@chromium.org Bug: v8:7224 Change-Id: If9e84e4ca7efe02c40b97a8c5c549c222947d6bb Reviewed-on: https://chromium-review.googlesource.com/832268Reviewed-by: Mircea Trofin <mtrofin@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#50165}
Showing
Please
register
or
sign in
to comment