Commit b7f4fb23 authored by Bill Ticehurst's avatar Bill Ticehurst Committed by Commit Bot

Fix EXPORT macros

The change at https://chromium-review.googlesource.com/c/v8/v8/+/1993971
introduced some new exports, but it appears the wrong macro was used for
the component being built (V8_BASE_EXPORT rather than V8_EXPORT_PRIVATE)

This breaks DLL builds (at least on MSVC, which I just fixed via
https://chromium-review.googlesource.com/c/v8/v8/+/1996157).

Adding Leszek who made the change, and Ulan and Toon as area OWNERS.

Bug: v8:8791
Change-Id: I916553992f7d42cba0f4d8ae46b014df6c5ef633
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2005528
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65833}
parent a128e38f
......@@ -178,9 +178,10 @@ void AstConsString::Internalize(Factory* factory) {
set_string(tmp);
}
template EXPORT_TEMPLATE_DEFINE(
V8_BASE_EXPORT) void AstConsString::Internalize<Factory>(Factory* factory);
template EXPORT_TEMPLATE_DEFINE(V8_BASE_EXPORT) void AstConsString::Internalize<
OffThreadFactory>(OffThreadFactory* factory);
V8_EXPORT_PRIVATE) void AstConsString::Internalize<Factory>(Factory*
factory);
template EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) void AstConsString::
Internalize<OffThreadFactory>(OffThreadFactory* factory);
std::forward_list<const AstRawString*> AstConsString::ToRawStrings() const {
std::forward_list<const AstRawString*> result;
......@@ -301,9 +302,9 @@ void AstValueFactory::Internalize(Factory* factory) {
ResetStrings();
}
template EXPORT_TEMPLATE_DEFINE(
V8_BASE_EXPORT) void AstValueFactory::Internalize<Factory>(Factory*
V8_EXPORT_PRIVATE) void AstValueFactory::Internalize<Factory>(Factory*
factory);
template EXPORT_TEMPLATE_DEFINE(V8_BASE_EXPORT) void AstValueFactory::
template EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) void AstValueFactory::
Internalize<OffThreadFactory>(OffThreadFactory* factory);
AstRawString* AstValueFactory::GetString(uint32_t hash_field, bool is_one_byte,
......
......@@ -330,7 +330,7 @@ class AstValueFactory {
const AstRawString* str2);
template <typename Factory>
V8_EXPORT_PRIVATE void Internalize(Factory* factory);
void Internalize(Factory* factory);
#define F(name, str) \
const AstRawString* name##_string() const { \
......@@ -385,6 +385,15 @@ class AstValueFactory {
uint64_t hash_seed_;
};
extern template EXPORT_TEMPLATE_DECLARE(
V8_EXPORT_PRIVATE) void AstValueFactory::Internalize<Factory>(Factory*
factory);
extern template EXPORT_TEMPLATE_DECLARE(
V8_EXPORT_PRIVATE) void AstValueFactory::
Internalize<OffThreadFactory>(OffThreadFactory* factory);
} // namespace internal
} // namespace v8
......
......@@ -239,8 +239,8 @@ HeapObject FactoryBase<Impl>::AllocateRaw(int size, AllocationType allocation,
}
// Instantiate FactoryBase for the two variants we want.
template class EXPORT_TEMPLATE_DEFINE(V8_BASE_EXPORT) FactoryBase<Factory>;
template class EXPORT_TEMPLATE_DEFINE(V8_BASE_EXPORT)
template class EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) FactoryBase<Factory>;
template class EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE)
FactoryBase<OffThreadFactory>;
} // namespace internal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment