-
Leszek Swirski authored
After allocation of an object, we need to initialize it to make it safe for the GC to see it. For complex objects like SharedFunctionInfo, this initialization code is long and requires understanding of the object. So, it makes sense for the initialization to live in the SharedFunctionInfo code itself (as an Init method) rather than in the factory. Aside from being a neat cleanup, this will allow us to share this initialization logic between different allocation methods, as part of the off-thread allocation project: https://docs.google.com/document/d/1-_96kok0AcavkbcdqqZvpqt_2q-_XWAsAJwbRXlfwCo/ Bug: chromium:1011762 Change-Id: Ie276eb711423272f85abfeb3d88df1826a77b984 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1872402 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#64926}
97bda678