V8 Project
|
An ExternalOneByteStringResource is a wrapper around an one-byte string buffer that resides outside V8's heap. More...
#include <v8.h>
Public Member Functions | |
virtual | ~ExternalOneByteStringResource () |
Override the destructor to manage the life cycle of the underlying buffer. More... | |
virtual const char * | data () const =0 |
The string data from the underlying buffer. More... | |
virtual size_t | length () const =0 |
The number of Latin-1 characters in the string. More... | |
![]() | |
virtual | ~ExternalStringResourceBase () |
Protected Member Functions | |
ExternalOneByteStringResource () | |
![]() | |
ExternalStringResourceBase () | |
virtual void | Dispose () |
Internally V8 will call this Dispose method when the external string resource is no longer needed. More... | |
An ExternalOneByteStringResource is a wrapper around an one-byte string buffer that resides outside V8's heap.
Implement an ExternalOneByteStringResource to manage the life cycle of the underlying buffer. Note that the string data must be immutable and that the data must be Latin-1 and not UTF-8, which would require special treatment internally in the engine and do not allow efficient indexing. Use String::New or convert to 16 bit data for non-Latin1.
|
inlinevirtual |
|
inlineprotected |
|
pure virtual |
The string data from the underlying buffer.
Implemented in v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::BinaryResource, and v8::ExternalOneByteStringResourceImpl.
Referenced by v8::String::MakeExternal(), v8::internal::String::MakeExternal(), and v8::String::NewExternal().
|
pure virtual |
The number of Latin-1 characters in the string.
Implemented in v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::BinaryResource, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, and v8::ExternalOneByteStringResourceImpl.
Referenced by v8::internal::String::MakeExternal().