Commit 3bb16433 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

cppgc: Fix GCInfo folding

Actually apply the folding on allocation.

Bug: chromium:1056170
Change-Id: Ief25fac49c5caff40579fd44249bba0ae82f9689
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2756536
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73377}
parent 7e7b884f
...@@ -78,7 +78,7 @@ class MakeGarbageCollectedTraitBase ...@@ -78,7 +78,7 @@ class MakeGarbageCollectedTraitBase
static_assert(std::is_base_of<CustomSpaceBase, CustomSpace>::value, static_assert(std::is_base_of<CustomSpaceBase, CustomSpace>::value,
"Custom space must inherit from CustomSpaceBase."); "Custom space must inherit from CustomSpaceBase.");
return internal::MakeGarbageCollectedTraitInternal::Allocate( return internal::MakeGarbageCollectedTraitInternal::Allocate(
handle, size, internal::GCInfoTrait<T>::Index(), handle, size, internal::GCInfoTrait<U>::Index(),
CustomSpace::kSpaceIndex); CustomSpace::kSpaceIndex);
} }
}; };
...@@ -88,7 +88,7 @@ class MakeGarbageCollectedTraitBase ...@@ -88,7 +88,7 @@ class MakeGarbageCollectedTraitBase
static void* Allocate(AllocationHandle& handle, size_t size) { static void* Allocate(AllocationHandle& handle, size_t size) {
// Default space. // Default space.
return internal::MakeGarbageCollectedTraitInternal::Allocate( return internal::MakeGarbageCollectedTraitInternal::Allocate(
handle, size, internal::GCInfoTrait<T>::Index()); handle, size, internal::GCInfoTrait<U>::Index());
} }
}; };
......
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