• Yang Guo's avatar
    [serialize] explicitly serialize code content upfront. · bebaffb9
    Yang Guo authored
    The serializer performs two passes over the code. The first pass copies out the
    code content verbatim, the second pass visits references recorded in the reloc
    info.
    
    So far the first pass is implicit and happens as part of the second pass, when
    we encounter a non-HeapObject reference when iterating the code object.  That
    however does not work for internal references. So we hit an assertion if the
    first non-HeapObject reference we see is an internal reference.
    
    This change explicitly triggers the first pass.
    
    R=petermarshall@chromium.org
    
    Bug: v8:6817
    Change-Id: I1ee9949e10b7d9409986da83be22ac6287785f9f
    Reviewed-on: https://chromium-review.googlesource.com/663867Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48010}
    bebaffb9
objects-body-descriptors-inl.h 20.7 KB