• Yang Guo's avatar
    [snapshot] clear internal fields that are serialized by callback · 4495cba3
    Yang Guo authored
    This is to ensure the snapshot is deterministic.
    
    Internal fields can contain:
    - reference to heap object
    - embedder-defined aligned pointer
    - a smi
    
    The latter two are not distinguishable by V8, so if the serializer
    callback returns non-zero value, we consider it to be an aligned pointer
    and clear it to ensure that the snapshot does not contain memory
    addresses that may not be deterministic. If the callback returns
    { nullptr, 0 } as result, we consider it to be a smi or some in-place
    data that we then serialize verbatim.
    
    
    R=jgruber@chromium.org
    
    Bug: chromium:870584
    Change-Id: I3cf9abf135ffd28d8138fa32636b12596b076e13
    Reviewed-on: https://chromium-review.googlesource.com/c/1304441
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#57272}
    4495cba3
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...