cppgc: Fix official build

Bug: chromium:1322318
Change-Id: Id3899a493eb1519e2f7498dcad1e607cc2b6a5db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3627509
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80353}
This commit is contained in:
Michael Lippautz 2022-05-04 09:40:23 +02:00 committed by V8 LUCI CQ
parent c4f14db838
commit e9244f379c
2 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ struct HeapStatistics final {
/** Amount of memory actually used on the page. */ /** Amount of memory actually used on the page. */
size_t used_size_bytes = 0; size_t used_size_bytes = 0;
/** Statistics for object allocated on the page. Filled only when /** Statistics for object allocated on the page. Filled only when
* NameProvider::HideInternalNames() is false. */ * NameProvider::SupportsCppClassNamesAsObjectNames() is true. */
std::vector<ObjectStatsEntry> object_statistics; std::vector<ObjectStatsEntry> object_statistics;
}; };

View File

@ -45,7 +45,7 @@ TEST(NameTraitTest, InternalNamesHiddenInOfficialBuild) {
// (b) avoid exposing internal types until it has been clarified whether // (b) avoid exposing internal types until it has been clarified whether
// exposing internals in DevTools is fine. // exposing internals in DevTools is fine.
#if defined(OFFICIAL_BUILD) #if defined(OFFICIAL_BUILD)
EXPECT_TRUE(NameProvider::HideInternalNames()); EXPECT_FALSE(NameProvider::SupportsCppClassNamesAsObjectNames());
#endif #endif
} }
@ -64,8 +64,8 @@ TEST(NameTraitTest, DefaultName) {
NameTrait<OtherNoName>::GetName( NameTrait<OtherNoName>::GetName(
nullptr, HeapObjectNameForUnnamedObject::kUseClassNameIfSupported) nullptr, HeapObjectNameForUnnamedObject::kUseClassNameIfSupported)
.value); .value);
// The following ignores `NameProvider::HideInternalNames()` and just always // The following ignores `NameProvider::SupportsCppClassNamesAsObjectNames()`
// returns the hidden name, independent of the build support. // and just always returns the hidden name, independent of the build support.
EXPECT_STREQ("InternalNode", EXPECT_STREQ("InternalNode",
NameTrait<NoName>::GetName( NameTrait<NoName>::GetName(
nullptr, HeapObjectNameForUnnamedObject::kUseHiddenName) nullptr, HeapObjectNameForUnnamedObject::kUseHiddenName)