Commit 8c2c22fa authored by Michael Lippautz's avatar Michael Lippautz Committed by V8 LUCI CQ

cppgc: NameProvider:GetName() -> NameProvider::GetHumanReadableName()

GetName() is very generic and arleady exists as virtual method in Blink.

Bug: chromium:1056170
Change-Id: I7aa6e869a06c048e7baea45939894717c872d89e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2947404
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75024}
parent 4cf7a03a
......@@ -73,7 +73,7 @@ class NameTrait final : public NameTraitBase {
private:
static HeapObjectName GetNameFor(const NameProvider* name_provider) {
return {name_provider->GetName(), false};
return {name_provider->GetHumanReadableName(), false};
}
static HeapObjectName GetNameFor(...) {
......
......@@ -57,7 +57,7 @@ class V8_EXPORT NameProvider {
*
* @returns a human readable name for the object.
*/
virtual const char* GetName() const = 0;
virtual const char* GetHumanReadableName() const = 0;
};
} // namespace cppgc
......
......@@ -28,7 +28,7 @@ class ClassWithName final : public GarbageCollected<ClassWithName>,
public:
explicit ClassWithName(const char* name) : name_(name) {}
virtual void Trace(Visitor*) const {}
const char* GetName() const final { return name_; }
const char* GetHumanReadableName() const final { return name_; }
private:
const char* name_;
......
......@@ -108,7 +108,7 @@ class GCed final : public BaseWithoutName, public cppgc::NameProvider {
static constexpr const char kExpectedName[] = "GCed";
void Trace(cppgc::Visitor* v) const final { BaseWithoutName::Trace(v); }
const char* GetName() const final { return "GCed"; }
const char* GetHumanReadableName() const final { return "GCed"; }
};
// static
constexpr const char GCed::kExpectedName[];
......
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