summaryrefslogtreecommitdiff
path: root/deps/v8/include
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2019-05-02 22:51:34 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2019-06-12 01:31:06 +0800
commitd2634be56258e2b957c1061c5f4d86792975bfa9 (patch)
treea5c5924813d7d8cbda446183474e20af1953cf4d /deps/v8/include
parent58fc168807458df7fd6991a0712836a997c734fe (diff)
downloadandroid-node-v8-d2634be56258e2b957c1061c5f4d86792975bfa9.tar.gz
android-node-v8-d2634be56258e2b957c1061c5f4d86792975bfa9.tar.bz2
android-node-v8-d2634be56258e2b957c1061c5f4d86792975bfa9.zip
deps: V8: cherry-pick e0a109c
Original commit message: [api] Implement StartupData::CanBeRehashed() for the snapshot blob This enables the embedder to check if the snapshot generated from SnapshotCreator::CreateBlob() can be rehashed and the seed can be recomputed during deserialization. The lack of this functionality resulted in a temporary vunerability in Node.js: https://github.com/nodejs/node/pull/27365 Change-Id: I88d52337217c40f79c26438be3c87d2db874d980 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1578661 Commit-Queue: Joyee Cheung <joyee@igalia.com> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#61175} Refs: https://github.com/v8/v8/commit/e0a109c05821fa36ec20e1f25895c23baa8d64c3 PR-URL: https://github.com/nodejs/node/pull/27533 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'deps/v8/include')
-rw-r--r--deps/v8/include/v8.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h
index 1edcf81189..d8141d3b41 100644
--- a/deps/v8/include/v8.h
+++ b/deps/v8/include/v8.h
@@ -8609,6 +8609,13 @@ class V8_EXPORT Isolate {
class V8_EXPORT StartupData {
public:
+ /**
+ * Whether the data created can be rehashed and and the hash seed can be
+ * recomputed when deserialized.
+ * Only valid for StartupData returned by SnapshotCreator::CreateBlob().
+ */
+ bool CanBeRehashed() const;
+
const char* data;
int raw_size;
};