From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles@charleskerr.com>
Date: Thu, 19 Nov 2020 13:12:56 -0600
Subject: chore: disallow copying CppHeapCreateParams
Experimental commit to resolve FTBS https://ci.appveyor.com/project/electron-bot/electron-ljo26/builds/36405680#L25345
which introduces a new struct CppHeapCreateParams that aggregates a
vector of unique_ptrs. Our Windows CI is unhappy that this struct
implicitly deletes its copy ctor, so this commit makes it explicit.
Xref: https://chromium-review.googlesource.com/c/v8/v8/+/2536642
diff --git a/include/v8-cppgc.h b/include/v8-cppgc.h
index 8a0d9cb9a0737e1642d666754926485b06136e98..31cb7545a37911f64597476eb4c4eb40da178c3f 100644
--- a/include/v8-cppgc.h
+++ b/include/v8-cppgc.h
@@ -25,8 +25,13 @@ namespace internal {
class CppHeap;
} // namespace internal
-struct V8_EXPORT CppHeapCreateParams {
+class V8_EXPORT CppHeapCreateParams {
+ public:
std::vector<std::unique_ptr<cppgc::CustomSpaceBase>> custom_spaces;
+
+ private:
+ CppHeapCreateParams (const CppHeapCreateParams&) =delete;
+ CppHeapCreateParams& operator=(const CppHeapCreateParams&) =delete;
};
/**
diff --git a/include/v8.h b/include/v8.h
index d89a5bbed03d8782885b7b9c69d1513c03b1de76..ca9fe11a9b0af970ffd6ad32998c2fc6ac8e73f7 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -49,7 +49,7 @@ class BooleanObject;
class CFunction;
class Context;
-struct CppHeapCreateParams;
+class CppHeapCreateParams;
class Data;
class Date;
class External;