V8 Project
v8::internal::NativeGroupRetainedObjectInfo Class Reference
+ Inheritance diagram for v8::internal::NativeGroupRetainedObjectInfo:
+ Collaboration diagram for v8::internal::NativeGroupRetainedObjectInfo:

Public Member Functions

 NativeGroupRetainedObjectInfo (const char *label)
 
virtual ~NativeGroupRetainedObjectInfo ()
 
virtual void Dispose ()
 Called by V8 when it no longer needs an instance. More...
 
virtual bool IsEquivalent (RetainedObjectInfo *other)
 Returns whether two instances are equivalent. More...
 
virtual intptr_t GetHash ()
 Returns hash value for the instance. More...
 
virtual const char * GetLabel ()
 Returns human-readable label. More...
 
- Public Member Functions inherited from v8::RetainedObjectInfo
virtual const char * GetGroupLabel ()
 Returns human-readable group label. More...
 
virtual intptr_t GetElementCount ()
 Returns element count in case if a global handle retains a subgraph by holding one of its nodes. More...
 
virtual intptr_t GetSizeInBytes ()
 Returns embedder's object size in bytes. More...
 

Private Attributes

bool disposed_
 
intptr_t hash_
 
const char * label_
 

Additional Inherited Members

- Protected Member Functions inherited from v8::RetainedObjectInfo
 RetainedObjectInfo ()
 
virtual ~RetainedObjectInfo ()
 

Detailed Description

Definition at line 2432 of file heap-snapshot-generator.cc.

Constructor & Destructor Documentation

◆ NativeGroupRetainedObjectInfo()

v8::internal::NativeGroupRetainedObjectInfo::NativeGroupRetainedObjectInfo ( const char *  label)
inlineexplicit

Definition at line 2434 of file heap-snapshot-generator.cc.

◆ ~NativeGroupRetainedObjectInfo()

virtual v8::internal::NativeGroupRetainedObjectInfo::~NativeGroupRetainedObjectInfo ( )
inlinevirtual

Definition at line 2440 of file heap-snapshot-generator.cc.

2440 {}

Member Function Documentation

◆ Dispose()

virtual void v8::internal::NativeGroupRetainedObjectInfo::Dispose ( )
inlinevirtual

Called by V8 when it no longer needs an instance.

Implements v8::RetainedObjectInfo.

Definition at line 2441 of file heap-snapshot-generator.cc.

2441  {
2442  CHECK(!disposed_);
2443  disposed_ = true;
2444  delete this;
2445  }
#define CHECK(condition)
Definition: logging.h:36

References CHECK, and disposed_.

◆ GetHash()

virtual intptr_t v8::internal::NativeGroupRetainedObjectInfo::GetHash ( )
inlinevirtual

Returns hash value for the instance.

Equivalent instances must have the same hash value.

Implements v8::RetainedObjectInfo.

Definition at line 2449 of file heap-snapshot-generator.cc.

2449 { return hash_; }

References hash_.

◆ GetLabel()

virtual const char* v8::internal::NativeGroupRetainedObjectInfo::GetLabel ( )
inlinevirtual

Returns human-readable label.

It must be a null-terminated UTF-8 encoded string. V8 copies its contents during a call to GetLabel.

Implements v8::RetainedObjectInfo.

Definition at line 2450 of file heap-snapshot-generator.cc.

2450 { return label_; }

References label_.

◆ IsEquivalent()

virtual bool v8::internal::NativeGroupRetainedObjectInfo::IsEquivalent ( RetainedObjectInfo other)
inlinevirtual

Returns whether two instances are equivalent.

Implements v8::RetainedObjectInfo.

Definition at line 2446 of file heap-snapshot-generator.cc.

2446  {
2447  return hash_ == other->GetHash() && !strcmp(label_, other->GetLabel());
2448  }

References v8::RetainedObjectInfo::GetHash(), v8::RetainedObjectInfo::GetLabel(), hash_, and label_.

+ Here is the call graph for this function:

Member Data Documentation

◆ disposed_

bool v8::internal::NativeGroupRetainedObjectInfo::disposed_
private

Definition at line 2453 of file heap-snapshot-generator.cc.

Referenced by Dispose().

◆ hash_

intptr_t v8::internal::NativeGroupRetainedObjectInfo::hash_
private

Definition at line 2454 of file heap-snapshot-generator.cc.

Referenced by GetHash(), and IsEquivalent().

◆ label_

const char* v8::internal::NativeGroupRetainedObjectInfo::label_
private

Definition at line 2455 of file heap-snapshot-generator.cc.

Referenced by GetLabel(), and IsEquivalent().


The documentation for this class was generated from the following file: