Skip to content

Commit b2fc14d

Browse files
committed
fixup! Mark OpaqueWrappable specializations as final
1 parent 2fb8553 commit b2fc14d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/workerd/jsg/promise.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ namespace workerd::jsg {
2525
template <typename T, bool = isGcVisitable<T>()>
2626
struct OpaqueWrappable;
2727

28-
struct OpaqueWrappableBase: public Wrappable {
28+
#define DEFAULT_VISIBILITY __attribute__((visibility("default")))
29+
30+
struct DEFAULT_VISIBILITY OpaqueWrappableBase: public Wrappable {
2931
kj::StringPtr jsgGetMemoryName() const override final {
3032
return "OpaqueWrappable"_kjc;
3133
}
@@ -40,7 +42,7 @@ struct OpaqueWrappableBase: public Wrappable {
4042
// values.
4143

4244
template <typename T>
43-
struct OpaqueWrappable<T, false> final: public OpaqueWrappableBase {
45+
struct DEFAULT_VISIBILITY OpaqueWrappable<T, false> final: public OpaqueWrappableBase {
4446
// Used to implement wrapOpaque().
4547

4648
OpaqueWrappable(T&& value): value(kj::mv(value)) {}
@@ -54,7 +56,7 @@ struct OpaqueWrappable<T, false> final: public OpaqueWrappableBase {
5456
};
5557

5658
template <typename T>
57-
struct OpaqueWrappable<T, true> final: public OpaqueWrappableBase {
59+
struct DEFAULT_VISIBILITY OpaqueWrappable<T, true> final: public OpaqueWrappableBase {
5860
// When T is GC-visitable, make sure to implement visitation.
5961

6062
OpaqueWrappable(T&& value): value(kj::mv(value)) {}

0 commit comments

Comments
 (0)