Skip to content

Commit 1246d3b

Browse files
joyeecheungv8-scoped@luci-project-accounts.iam.gserviceaccount.com
authored andcommitted
[api] avoid applying IsGarbageCollectedType<void>
The updated version of http://crrev.com/c/8379082 was not enough to remove the resolution of IsGarbageCollectedType<void> which would hit the static_assert(sizeof(T)) assertion. This patch explicitly rejects void again before checking the trait. Change-Id: Ieef4126bcba04e1e3c2bd62e89b7410a47cd2b29 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8411047 Reviewed-by: Leszek Swirski <[email protected]> Commit-Queue: Joyee Cheung <[email protected]> Cr-Commit-Position: refs/heads/main@{#109868}
1 parent 9ecd741 commit 1246d3b

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎include/v8-context.h‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77

88
#include <stdint.h>
99

10+
#include <type_traits>
1011
#include <vector>
1112

1213
#include "cppgc/type-traits.h" // NOLINT(build/include_directory)
13-
#include "v8-data.h" // NOLINT(build/include_directory)
14-
#include "v8-local-handle.h" // NOLINT(build/include_directory)
15-
#include "v8-maybe.h" // NOLINT(build/include_directory)
16-
#include "v8-snapshot.h" // NOLINT(build/include_directory)
17-
#include "v8config.h" // NOLINT(build/include_directory)
14+
#include "v8-data.h" // NOLINT(build/include_directory)
15+
#include "v8-local-handle.h" // NOLINT(build/include_directory)
16+
#include "v8-maybe.h" // NOLINT(build/include_directory)
17+
#include "v8-snapshot.h" // NOLINT(build/include_directory)
18+
#include "v8config.h" // NOLINT(build/include_directory)
1819

1920
namespace v8 {
2021

@@ -328,7 +329,7 @@ class V8_EXPORT Context : public Data {
328329
EmbedderDataTypeTag tag);
329330

330331
template <typename T>
331-
requires cppgc::IsGarbageCollectedTypeV<T>
332+
requires(!std::is_void_v<T>) && cppgc::IsGarbageCollectedTypeV<T>
332333
void SetAlignedPointerInEmbedderData(int index, T* value,
333334
CppHeapPointerTag tag) {
334335
SetAlignedPointerInEmbedderDataInternal(index, static_cast<void*>(value),

0 commit comments

Comments
 (0)