Skip to content

Commit 2a70893

Browse files
committed
deps: V8: cherry-pick bb9f0c2b2fe9
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 <[email protected]> Commit-Queue: Toon Verwaest <[email protected]> Cr-Commit-Position: refs/heads/master@{#67111} Refs: v8/v8@bb9f0c2
1 parent 4d8456c commit 2a70893

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

deps/v8/include/v8.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9720,6 +9720,11 @@ class V8_EXPORT V8 {
97209720

97219721
/**
97229722
* Helper class to create a snapshot data blob.
9723+
*
9724+
* The Isolate used by a SnapshotCreator is owned by it, and will be entered
9725+
* and exited by the constructor and destructor, respectively; The destructor
9726+
* will also destroy the Isolate. Experimental language features, including
9727+
* those available by default, are not available while creating a snapshot.
97239728
*/
97249729
class V8_EXPORT SnapshotCreator {
97259730
public:
@@ -9748,6 +9753,10 @@ class V8_EXPORT SnapshotCreator {
97489753
SnapshotCreator(const intptr_t* external_references = nullptr,
97499754
StartupData* existing_blob = nullptr);
97509755

9756+
/**
9757+
* Destroy the snapshot creator, and exit and dispose of the Isolate
9758+
* associated with it.
9759+
*/
97519760
~SnapshotCreator();
97529761

97539762
/**

deps/v8/src/snapshot/serializer-common.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ ExternalReferenceEncoder::Value ExternalReferenceEncoder::Encode(
7676
if (maybe_index.IsNothing()) {
7777
void* addr = reinterpret_cast<void*>(address);
7878
v8::base::OS::PrintError("Unknown external reference %p.\n", addr);
79-
v8::base::OS::PrintError("%s", ExternalReferenceTable::ResolveSymbol(addr));
79+
v8::base::OS::PrintError("%s\n",
80+
ExternalReferenceTable::ResolveSymbol(addr));
8081
v8::base::OS::Abort();
8182
}
8283
Value result(maybe_index.FromJust());

deps/v8/src/snapshot/startup-serializer.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ void SerializedHandleChecker::VisitRootPointers(Root root,
183183
PrintF("%s handle not serialized: ",
184184
root == Root::kGlobalHandles ? "global" : "eternal");
185185
(*p).Print();
186+
PrintF("\n");
186187
ok_ = false;
187188
}
188189
}

0 commit comments

Comments
 (0)