Skip to content

Commit

Permalink
deps: V8: backport bb9f0c2b2fe9
Browse files Browse the repository at this point in the history
Original commit message:

    [snapshot] Improve snapshot docs and error printing

    - Minor improvements to the documentation for snapshotting.
    - Add newlines to printed errors where necessary.

    Change-Id: I822e7e850adb67eae73b51c23cf34e40ba3106f0
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144954
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#67111}

Refs: v8/v8@bb9f0c2

PR-URL: #33300
Refs: v8/v8@ea0719b
Refs: v8/v8@22014de
Refs: #17058
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
joyeecheung authored and codebytere committed Jun 30, 2020
1 parent d07e7b8 commit 37f25fa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.18',
'v8_embedder_string': '-node.19',

##### V8 defaults for Node.js #####

Expand Down
9 changes: 9 additions & 0 deletions deps/v8/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -9804,6 +9804,11 @@ class V8_EXPORT V8 {

/**
* Helper class to create a snapshot data blob.
*
* The Isolate used by a SnapshotCreator is owned by it, and will be entered
* and exited by the constructor and destructor, respectively; The destructor
* will also destroy the Isolate. Experimental language features, including
* those available by default, are not available while creating a snapshot.
*/
class V8_EXPORT SnapshotCreator {
public:
Expand Down Expand Up @@ -9832,6 +9837,10 @@ class V8_EXPORT SnapshotCreator {
SnapshotCreator(const intptr_t* external_references = nullptr,
StartupData* existing_blob = nullptr);

/**
* Destroy the snapshot creator, and exit and dispose of the Isolate
* associated with it.
*/
~SnapshotCreator();

/**
Expand Down
3 changes: 2 additions & 1 deletion deps/v8/src/snapshot/serializer-common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ ExternalReferenceEncoder::Value ExternalReferenceEncoder::Encode(
if (maybe_index.IsNothing()) {
void* addr = reinterpret_cast<void*>(address);
v8::base::OS::PrintError("Unknown external reference %p.\n", addr);
v8::base::OS::PrintError("%s", ExternalReferenceTable::ResolveSymbol(addr));
v8::base::OS::PrintError("%s\n",
ExternalReferenceTable::ResolveSymbol(addr));
v8::base::OS::Abort();
}
Value result(maybe_index.FromJust());
Expand Down
1 change: 1 addition & 0 deletions deps/v8/src/snapshot/startup-serializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ void SerializedHandleChecker::VisitRootPointers(Root root,
PrintF("%s handle not serialized: ",
root == Root::kGlobalHandles ? "global" : "eternal");
(*p).Print();
PrintF("\n");
ok_ = false;
}
}
Expand Down

0 comments on commit 37f25fa

Please sign in to comment.