bindings: Initialize heap before allocating objects during setup

V8 may trigger incremental garbage collections as setup code is
allocating objects. Since the embedder tracing mechanism was only set up
after initializing the GC cycle, this may lead to memory corruptions
during GC.

Bug: 984936
Change-Id: I36af7bf5675b0b51ee2379ed8804a244f5fe424d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1708076
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678642}
1 file changed