Skip to content

Commit 98968fd

Browse files
committed
fix: export the V8 internals that public headers inline
Inline code in V8's public headers calls out-of-line helpers that live in v8::internal:: and cppgc::internal::, which the version script hid: a plugin compiled against those headers failed to link on, among others, v8::internal::Internals::GetCurrentIsolate(), reached from v8::Object::GetInternalField(). Lists the referenced names individually rather than re-admitting the private namespaces wholesale. Adds 58 symbols to the arm64 dynamic symbol table (1683 -> 1741) and 16 KiB to libNativeScript.so.
1 parent 0ffff1b commit 98968fd

1 file changed

Lines changed: 46 additions & 1 deletion

File tree

‎test-app/runtime/exported-symbols.map‎

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,23 @@
55
* matched by both a global: and a local: pattern in favour of global:, so the
66
* internals cannot be carved back out with a "local: v8::internal::*" entry.
77
*
8+
* The case rule alone is not enough, because inline code in the public headers
9+
* calls out-of-line helpers that live in the private namespaces:
10+
* v8::Object::GetInternalField() reaches
11+
* v8::internal::Internals::GetCurrentIsolate(), every cppgc::Member<T> store
12+
* reaches cppgc::internal::WriteBarrier, MakeGarbageCollected reaches the
13+
* allocation trait. A plugin compiled against the public headers cannot link
14+
* without them, so they are listed one by one below rather than re-admitted as
15+
* v8::internal::* / cppgc::internal::*, which would put tens of thousands of
16+
* symbols back. A name belongs in that group only if an inline body under
17+
* include/ references it -- static data members included, since the barrier and
18+
* pointer-compression fast paths read them directly. Match the whole class, or
19+
* the bare function name followed by *, so an entry survives a signature change
20+
* across a V8 bump.
21+
*
822
* Patterns must stay unquoted -- a quoted string is matched literally, not as a
9-
* wildcard.
23+
* wildcard. An unquoted pattern cannot contain a parenthesis either, so an
24+
* overload set can only be narrowed down to its name, never to one signature.
1025
*/
1126
{
1227
global:
@@ -20,6 +35,36 @@
2035
v8::api_internal::*;
2136
v8::platform::*;
2237
cppgc::[A-Z]*;
38+
39+
v8::internal::CopyTracedReference*;
40+
v8::internal::DisposeTracedReference*;
41+
v8::internal::GlobalizeTracedReference*;
42+
v8::internal::Internals::CheckInitializedImpl*;
43+
v8::internal::Internals::GetCurrentIsolate*;
44+
v8::internal::MoveTracedReference*;
45+
v8::internal::ShouldThrowOnError*;
46+
v8::internal::StrongRootAllocatorBase::*;
47+
v8::internal::VerifyHandleIsNonEmpty*;
48+
cppgc::internal::BaseObjectSizeTrait::*;
49+
cppgc::internal::CageBaseGlobal::*;
50+
cppgc::internal::CagedHeapBase::*;
51+
cppgc::internal::DCheckImpl*;
52+
cppgc::internal::EnsureGCInfoIndexTrait::*;
53+
cppgc::internal::ExplicitManagementImpl::*;
54+
cppgc::internal::Fatal*;
55+
cppgc::internal::MakeGarbageCollectedTraitInternal::*;
56+
cppgc::internal::NameTraitBase::*;
57+
cppgc::internal::PersistentRegion::*;
58+
cppgc::internal::PersistentRegionBase::*;
59+
cppgc::internal::PersistentRegionLock::*;
60+
cppgc::internal::PrefinalizerRegistration::*;
61+
cppgc::internal::SameThreadEnabledCheckingPolicyBase::*;
62+
cppgc::internal::StrongCrossThreadPersistentPolicy::*;
63+
cppgc::internal::StrongPersistentPolicy::*;
64+
cppgc::internal::TraceTraitFromInnerAddressImpl::*;
65+
cppgc::internal::WeakCrossThreadPersistentPolicy::*;
66+
cppgc::internal::WeakPersistentPolicy::*;
67+
cppgc::internal::WriteBarrier::*;
2368
};
2469
local:
2570
*;

0 commit comments

Comments
 (0)