diff options
author | Michaël Zasso <targos@protonmail.com> | 2022-01-29 10:35:31 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2022-02-02 19:24:51 +0300 |
commit | 48708be57b5fb9e08df242e273aeb80a82bc48fc (patch) | |
tree | c0aec6a083263108e7bfe03271598ab1fb92bf2a /deps | |
parent | ae5edcf2d80ad7b05a4369aaea938695ae560c00 (diff) |
deps: V8: cherry-pick 79a9d2eb3477
Original commit message:
Fix destructor for EmbedderStateScope
EmbedderState is forward declared in public header for
EmbedderStateScope. Default std::unique_ptr's destructor needs a fully
defined class. Defining default destructor in implementation file fixes
this.
Bug: chromium:1263871
Change-Id: I8ccc58f56a758927dc5d7a39387188185e7d3827
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3338697
Auto-Submit: Corentin Pescheloche <cpescheloche@fb.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78363}
Refs: https://github.com/v8/v8/commit/79a9d2eb34774163c5b2596418bf50196dc5df4a
PR-URL: https://github.com/nodejs/node/pull/41610
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps')
-rw-r--r-- | deps/v8/include/v8-embedder-state-scope.h | 2 | ||||
-rw-r--r-- | deps/v8/src/api/api.cc | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/deps/v8/include/v8-embedder-state-scope.h b/deps/v8/include/v8-embedder-state-scope.h index 6ae9b3b4779..37e1f2bacb7 100644 --- a/deps/v8/include/v8-embedder-state-scope.h +++ b/deps/v8/include/v8-embedder-state-scope.h @@ -32,6 +32,8 @@ class V8_EXPORT EmbedderStateScope { EmbedderStateScope(Isolate* isolate, Local<v8::Context> context, EmbedderStateTag tag); + ~EmbedderStateScope(); + private: // Declaring operator new and delete as deleted is not spec compliant. // Therefore declare them private instead to disable dynamic alloc diff --git a/deps/v8/src/api/api.cc b/deps/v8/src/api/api.cc index 7e9c504f8e7..a71dd1670ce 100644 --- a/deps/v8/src/api/api.cc +++ b/deps/v8/src/api/api.cc @@ -10361,6 +10361,11 @@ EmbedderStateScope::EmbedderStateScope(Isolate* isolate, EmbedderStateTag tag) : embedder_state_(new internal::EmbedderState(isolate, context, tag)) {} +// std::unique_ptr's destructor is not compatible with Forward declared +// EmbedderState class. +// Default destructor must be defined in implementation file. +EmbedderStateScope::~EmbedderStateScope() = default; + void TracedReferenceBase::CheckValue() const { #ifdef V8_HOST_ARCH_64_BIT if (!val_) return; |