V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
v8::String::ExternalStringResourceBase Class Reference
Inheritance diagram for v8::String::ExternalStringResourceBase:
v8::String::ExternalOneByteStringResource v8::String::ExternalStringResource v8::ExternalOwningOneByteStringResource v8::internal::NativesExternalStringResource

Public Member Functions

 V8_DEPRECATED ("Use IsCacheable().", virtual bool IsCompressible() const)
 
virtual bool IsCacheable () const
 

Protected Member Functions

virtual void Dispose ()
 
virtual void Lock () const
 
virtual void Unlock () const
 
 ExternalStringResourceBase (const ExternalStringResourceBase &)=delete
 
void operator= (const ExternalStringResourceBase &)=delete
 

Friends

class internal::Heap
 
class v8::String
 
class internal::ScopedExternalStringLock
 

Detailed Description

Definition at line 2635 of file v8.h.

Member Function Documentation

◆ Dispose()

virtual void v8::String::ExternalStringResourceBase::Dispose ( )
inlineprotectedvirtual

Internally V8 will call this Dispose method when the external string resource is no longer needed. The default implementation will use the delete operator. This method can be overridden in subclasses to control how allocated external string resources are disposed.

Definition at line 2659 of file v8.h.

◆ IsCacheable()

virtual bool v8::String::ExternalStringResourceBase::IsCacheable ( ) const
inlinevirtual

If a string is cacheable, the value returned by ExternalStringResource::data() may be cached, otherwise it is not expected to be stable beyond the current top-level task.

Definition at line 2648 of file v8.h.

◆ Lock()

virtual void v8::String::ExternalStringResourceBase::Lock ( ) const
inlineprotectedvirtual

For a non-cacheable string, the value returned by |ExternalStringResource::data()| has to be stable between |Lock()| and |Unlock()|, that is the string must behave as is |IsCacheable()| returned true.

These two functions must be thread-safe, and can be called from anywhere. They also must handle lock depth, in the sense that each can be called several times, from different threads, and unlocking should only happen when the balance of Lock() and Unlock() calls is 0.

Definition at line 2672 of file v8.h.

◆ Unlock()

virtual void v8::String::ExternalStringResourceBase::Unlock ( ) const
inlineprotectedvirtual

Unlocks the string.

Definition at line 2677 of file v8.h.


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