Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 80.1.4+g8927396+chromium-80.0.3987.149
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

(default)
Class CefV8Value

CefBaseRefCounted
   |
   +--CefV8Value

   in cef_v8.h

class CefV8Value
extends CefBaseRefCounted

Class representing a V8 value handle. V8 handles can only be accessed from the thread on which they are created. Valid threads for creating a V8 handle include the render process main thread (TID_RENDERER) and WebWorker threads. A task runner for posting tasks on the associated thread can be retrieved via the CefV8Context::GetTaskRunner() method.


Inner Classes, Typedefs, and Enums
typedef CefV8Value::AccessControl
          
typedef CefV8Value::PropertyAttribute
          
 
Method Summary
 virtual int AdjustExternallyAllocatedMemory( int change_in_bytes )= 0
          Adjusts the amount of registered external memory for the object.
 virtual bool ClearException()= 0
          Clears the last exception and returns true on success.
 static CefRefPtr< CefV8Value > CreateArray( int length )
          Create a new CefV8Value object of type array with the specified |length|.
 static CefRefPtr< CefV8Value > CreateArrayBuffer( void* buffer, size_t length, CefRefPtr< CefV8ArrayBufferReleaseCallback > release_callback )
          Create a new CefV8Value object of type ArrayBuffer which wraps the provided |buffer| of size |length| bytes.
 static CefRefPtr< CefV8Value > CreateBool( bool value )
          Create a new CefV8Value object of type bool.
 static CefRefPtr< CefV8Value > CreateDate( const CefTime& date )
          Create a new CefV8Value object of type Date.
 static CefRefPtr< CefV8Value > CreateDouble( double value )
          Create a new CefV8Value object of type double.
 static CefRefPtr< CefV8Value > CreateFunction( const CefString& name, CefRefPtr< CefV8Handler > handler )
          Create a new CefV8Value object of type function.
 static CefRefPtr< CefV8Value > CreateInt( int32 value )
          Create a new CefV8Value object of type int.
 static CefRefPtr< CefV8Value > CreateNull()
          Create a new CefV8Value object of type null.
 static CefRefPtr< CefV8Value > CreateObject( CefRefPtr< CefV8Accessor > accessor, CefRefPtr< CefV8Interceptor > interceptor )
          Create a new CefV8Value object of type object with optional accessor and/or interceptor.
 static CefRefPtr< CefV8Value > CreateString( const CefString& value )
          Create a new CefV8Value object of type string.
 static CefRefPtr< CefV8Value > CreateUInt( uint32 value )
          Create a new CefV8Value object of type unsigned int.
 static CefRefPtr< CefV8Value > CreateUndefined()
          Create a new CefV8Value object of type undefined.
 virtual bool DeleteValue( int index )= 0
          Deletes the value with the specified identifier and returns true on success.
 virtual bool DeleteValue( const CefString& key )= 0
          Deletes the value with the specified identifier and returns true on success.
 virtual CefRefPtr< CefV8Value > ExecuteFunction( CefRefPtr< CefV8Value > object, const CefV8ValueList& arguments )= 0
          Execute the function using the current V8 context.
 virtual CefRefPtr< CefV8Value > ExecuteFunctionWithContext( CefRefPtr< CefV8Context > context, CefRefPtr< CefV8Value > object, const CefV8ValueList& arguments )= 0
          Execute the function using the specified V8 context.
 virtual CefRefPtr< CefV8ArrayBufferReleaseCallback > GetArrayBufferReleaseCallback()= 0
          Returns the ReleaseCallback object associated with the ArrayBuffer or NULL if the ArrayBuffer was not created with CreateArrayBuffer.
 virtual int GetArrayLength()= 0
          Returns the number of elements in the array.
 virtual bool GetBoolValue()= 0
          Return a bool value.
 virtual CefTime GetDateValue()= 0
          Return a Date value.
 virtual double GetDoubleValue()= 0
          Return a double value.
 virtual CefRefPtr< CefV8Exception > GetException()= 0
          Returns the exception resulting from the last method call.
 virtual int GetExternallyAllocatedMemory()= 0
          Returns the amount of externally allocated memory registered for the object.
 virtual CefRefPtr< CefV8Handler > GetFunctionHandler()= 0
          Returns the function handler or NULL if not a CEF-created function.
 virtual CefString GetFunctionName()= 0
          Returns the function name.
 virtual int32 GetIntValue()= 0
          Return an int value.
 virtual bool GetKeys( std::vector< CefString >& keys )= 0
          Read the keys for the object's values into the specified vector.
 virtual CefString GetStringValue()= 0
          Return a string value.
 virtual uint32 GetUIntValue()= 0
          Return an unsigned int value.
 virtual CefRefPtr< CefBaseRefCounted > GetUserData()= 0
          Returns the user data, if any, assigned to this object.
 virtual CefRefPtr< CefV8Value > GetValue( int index )= 0
          Returns the value with the specified identifier on success.
 virtual CefRefPtr< CefV8Value > GetValue( const CefString& key )= 0
          Returns the value with the specified identifier on success.
 virtual bool HasException()= 0
          Returns true if the last method call resulted in an exception.
 virtual bool HasValue( const CefString& key )= 0
          Returns true if the object has a value with the specified identifier.
 virtual bool HasValue( int index )= 0
          Returns true if the object has a value with the specified identifier.
 virtual bool IsArray()= 0
          True if the value type is array.
 virtual bool IsArrayBuffer()= 0
          True if the value type is an ArrayBuffer.
 virtual bool IsBool()= 0
          True if the value type is bool.
 virtual bool IsDate()= 0
          True if the value type is Date.
 virtual bool IsDouble()= 0
          True if the value type is double.
 virtual bool IsFunction()= 0
          True if the value type is function.
 virtual bool IsInt()= 0
          True if the value type is int.
 virtual bool IsNull()= 0
          True if the value type is null.
 virtual bool IsObject()= 0
          True if the value type is object.
 virtual bool IsSame( CefRefPtr< CefV8Value > that )= 0
          Returns true if this object is pointing to the same handle as |that| object.
 virtual bool IsString()= 0
          True if the value type is string.
 virtual bool IsUInt()= 0
          True if the value type is unsigned int.
 virtual bool IsUndefined()= 0
          True if the value type is undefined.
 virtual bool IsUserCreated()= 0
          Returns true if this is a user created object.
 virtual bool IsValid()= 0
          Returns true if the underlying handle is valid and it can be accessed on the current thread.
 virtual bool NeuterArrayBuffer()= 0
          Prevent the ArrayBuffer from using it's memory block by setting the length to zero.
 virtual bool SetRethrowExceptions( bool rethrow )= 0
          Set whether this object will re-throw future exceptions.
 virtual bool SetUserData( CefRefPtr< CefBaseRefCounted > user_data )= 0
          Sets the user data for this object and returns true on success.
 virtual bool SetValue( const CefString& key, CefRefPtr< CefV8Value > value, CefV8Value::PropertyAttribute attribute )= 0
          Associates a value with the specified identifier and returns true on success.
 virtual bool SetValue( int index, CefRefPtr< CefV8Value > value )= 0
          Associates a value with the specified identifier and returns true on success.
 virtual bool SetValue( const CefString& key, CefV8Value::AccessControl settings, CefV8Value::PropertyAttribute attribute )= 0
          Registers an identifier and returns true on success.
 virtual bool WillRethrowExceptions()= 0
          Returns true if this object will re-throw future exceptions.
   
Methods inherited from class CefBaseRefCounted
AddRef, Release, HasOneRef, HasAtLeastOneRef
 

Method Detail

AdjustExternallyAllocatedMemory

public virtual int AdjustExternallyAllocatedMemory( int change_in_bytes )= 0;
Adjusts the amount of registered external memory for the object. Used to give V8 an indication of the amount of externally allocated memory that is kept alive by JavaScript objects. V8 uses this information to decide when to perform global garbage collection. Each CefV8Value tracks the amount of external memory associated with it and automatically decreases the global total by the appropriate amount on its destruction. |change_in_bytes| specifies the number of bytes to adjust by. This method returns the number of bytes associated with the object after the adjustment. This method can only be called on user created objects.

ClearException

public virtual bool ClearException()= 0;
Clears the last exception and returns true on success.

CreateArray

public static CefRefPtr< CefV8Value > CreateArray( int length );
Create a new CefV8Value object of type array with the specified |length|. If |length| is negative the returned array will have length 0. This method should only be called from within the scope of a CefRenderProcessHandler, CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference.

CreateArrayBuffer

public static CefRefPtr< CefV8Value > CreateArrayBuffer( void* buffer, size_t length, CefRefPtr< CefV8ArrayBufferReleaseCallback > release_callback );
Create a new CefV8Value object of type ArrayBuffer which wraps the provided |buffer| of size |length| bytes. The ArrayBuffer is externalized, meaning that it does not own |buffer|. The caller is responsible for freeing |buffer| when requested via a call to CefV8ArrayBufferReleaseCallback:: ReleaseBuffer. This method should only be called from within the scope of a CefRenderProcessHandler, CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference.

CreateBool

public static CefRefPtr< CefV8Value > CreateBool( bool value );
Create a new CefV8Value object of type bool.

CreateDate

public static CefRefPtr< CefV8Value > CreateDate( const CefTime& date );
Create a new CefV8Value object of type Date. This method should only be called from within the scope of a CefRenderProcessHandler, CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference.

CreateDouble

public static CefRefPtr< CefV8Value > CreateDouble( double value );
Create a new CefV8Value object of type double.

CreateFunction

public static CefRefPtr< CefV8Value > CreateFunction( const CefString& name, CefRefPtr< CefV8Handler > handler );
Create a new CefV8Value object of type function. This method should only be called from within the scope of a CefRenderProcessHandler, CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference.

CreateInt

public static CefRefPtr< CefV8Value > CreateInt( int32 value );
Create a new CefV8Value object of type int.

CreateNull

public static CefRefPtr< CefV8Value > CreateNull();
Create a new CefV8Value object of type null.

CreateObject

public static CefRefPtr< CefV8Value > CreateObject( CefRefPtr< CefV8Accessor > accessor, CefRefPtr< CefV8Interceptor > interceptor );
Create a new CefV8Value object of type object with optional accessor and/or interceptor. This method should only be called from within the scope of a CefRenderProcessHandler, CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference.

CreateString

public static CefRefPtr< CefV8Value > CreateString( const CefString& value );
Create a new CefV8Value object of type string.

CreateUInt

public static CefRefPtr< CefV8Value > CreateUInt( uint32 value );
Create a new CefV8Value object of type unsigned int.

CreateUndefined

public static CefRefPtr< CefV8Value > CreateUndefined();
Create a new CefV8Value object of type undefined.

DeleteValue

public virtual bool DeleteValue( int index )= 0;
Deletes the value with the specified identifier and returns true on success. Returns false if this method is called incorrectly, deletion fails or an exception is thrown. For read-only and don't-delete values this method will return true even though deletion failed.

DeleteValue

public virtual bool DeleteValue( const CefString& key )= 0;
Deletes the value with the specified identifier and returns true on success. Returns false if this method is called incorrectly or an exception is thrown. For read-only and don't-delete values this method will return true even though deletion failed.

ExecuteFunction

public virtual CefRefPtr< CefV8Value > ExecuteFunction( CefRefPtr< CefV8Value > object, const CefV8ValueList& arguments )= 0;
Execute the function using the current V8 context. This method should only be called from within the scope of a CefV8Handler or CefV8Accessor callback, or in combination with calling Enter() and Exit() on a stored CefV8Context reference. |object| is the receiver ('this' object) of the function. If |object| is empty the current context's global object will be used. |arguments| is the list of arguments that will be passed to the function. Returns the function return value on success. Returns NULL if this method is called incorrectly or an exception is thrown.

ExecuteFunctionWithContext

public virtual CefRefPtr< CefV8Value > ExecuteFunctionWithContext( CefRefPtr< CefV8Context > context, CefRefPtr< CefV8Value > object, const CefV8ValueList& arguments )= 0;
Execute the function using the specified V8 context. |object| is the receiver ('this' object) of the function. If |object| is empty the specified context's global object will be used. |arguments| is the list of arguments that will be passed to the function. Returns the function return value on success. Returns NULL if this method is called incorrectly or an exception is thrown.

GetArrayBufferReleaseCallback

public virtual CefRefPtr< CefV8ArrayBufferReleaseCallback > GetArrayBufferReleaseCallback()= 0;
Returns the ReleaseCallback object associated with the ArrayBuffer or NULL if the ArrayBuffer was not created with CreateArrayBuffer.

GetArrayLength

public virtual int GetArrayLength()= 0;
Returns the number of elements in the array.

GetBoolValue

public virtual bool GetBoolValue()= 0;
Return a bool value.

GetDateValue

public virtual CefTime GetDateValue()= 0;
Return a Date value.

GetDoubleValue

public virtual double GetDoubleValue()= 0;
Return a double value.

GetException

public virtual CefRefPtr< CefV8Exception > GetException()= 0;
Returns the exception resulting from the last method call. This attribute exists only in the scope of the current CEF value object.

GetExternallyAllocatedMemory

public virtual int GetExternallyAllocatedMemory()= 0;
Returns the amount of externally allocated memory registered for the object.

GetFunctionHandler

public virtual CefRefPtr< CefV8Handler > GetFunctionHandler()= 0;
Returns the function handler or NULL if not a CEF-created function.

GetFunctionName

public virtual CefString GetFunctionName()= 0;
Returns the function name.

GetIntValue

public virtual int32 GetIntValue()= 0;
Return an int value.

GetKeys

public virtual bool GetKeys( std::vector< CefString >& keys )= 0;
Read the keys for the object's values into the specified vector. Integer- based keys will also be returned as strings.

GetStringValue

public virtual CefString GetStringValue()= 0;
Return a string value.

GetUIntValue

public virtual uint32 GetUIntValue()= 0;
Return an unsigned int value.

GetUserData

public virtual CefRefPtr< CefBaseRefCounted > GetUserData()= 0;
Returns the user data, if any, assigned to this object.

GetValue

public virtual CefRefPtr< CefV8Value > GetValue( int index )= 0;
Returns the value with the specified identifier on success. Returns NULL if this method is called incorrectly or an exception is thrown.

GetValue

public virtual CefRefPtr< CefV8Value > GetValue( const CefString& key )= 0;
Returns the value with the specified identifier on success. Returns NULL if this method is called incorrectly or an exception is thrown.

HasException

public virtual bool HasException()= 0;
Returns true if the last method call resulted in an exception. This attribute exists only in the scope of the current CEF value object.

HasValue

public virtual bool HasValue( const CefString& key )= 0;
Returns true if the object has a value with the specified identifier.

HasValue

public virtual bool HasValue( int index )= 0;
Returns true if the object has a value with the specified identifier.

IsArray

public virtual bool IsArray()= 0;
True if the value type is array.

IsArrayBuffer

public virtual bool IsArrayBuffer()= 0;
True if the value type is an ArrayBuffer.

IsBool

public virtual bool IsBool()= 0;
True if the value type is bool.

IsDate

public virtual bool IsDate()= 0;
True if the value type is Date.

IsDouble

public virtual bool IsDouble()= 0;
True if the value type is double.

IsFunction

public virtual bool IsFunction()= 0;
True if the value type is function.

IsInt

public virtual bool IsInt()= 0;
True if the value type is int.

IsNull

public virtual bool IsNull()= 0;
True if the value type is null.

IsObject

public virtual bool IsObject()= 0;
True if the value type is object.

IsSame

public virtual bool IsSame( CefRefPtr< CefV8Value > that )= 0;
Returns true if this object is pointing to the same handle as |that| object.

IsString

public virtual bool IsString()= 0;
True if the value type is string.

IsUInt

public virtual bool IsUInt()= 0;
True if the value type is unsigned int.

IsUndefined

public virtual bool IsUndefined()= 0;
True if the value type is undefined.

IsUserCreated

public virtual bool IsUserCreated()= 0;
Returns true if this is a user created object.

IsValid

public virtual bool IsValid()= 0;
Returns true if the underlying handle is valid and it can be accessed on the current thread. Do not call any other methods if this method returns false.

NeuterArrayBuffer

public virtual bool NeuterArrayBuffer()= 0;
Prevent the ArrayBuffer from using it's memory block by setting the length to zero. This operation cannot be undone. If the ArrayBuffer was created with CreateArrayBuffer then CefV8ArrayBufferReleaseCallback::ReleaseBuffer will be called to release the underlying buffer.

SetRethrowExceptions

public virtual bool SetRethrowExceptions( bool rethrow )= 0;
Set whether this object will re-throw future exceptions. By default exceptions are not re-thrown. If a exception is re-thrown the current context should not be accessed again until after the exception has been caught and not re-thrown. Returns true on success. This attribute exists only in the scope of the current CEF value object.

SetUserData

public virtual bool SetUserData( CefRefPtr< CefBaseRefCounted > user_data )= 0;
Sets the user data for this object and returns true on success. Returns false if this method is called incorrectly. This method can only be called on user created objects.

SetValue

public virtual bool SetValue( const CefString& key, CefRefPtr< CefV8Value > value, CefV8Value::PropertyAttribute attribute )= 0;
Associates a value with the specified identifier and returns true on success. Returns false if this method is called incorrectly or an exception is thrown. For read-only values this method will return true even though assignment failed.

SetValue

public virtual bool SetValue( int index, CefRefPtr< CefV8Value > value )= 0;
Associates a value with the specified identifier and returns true on success. Returns false if this method is called incorrectly or an exception is thrown. For read-only values this method will return true even though assignment failed.

SetValue

public virtual bool SetValue( const CefString& key, CefV8Value::AccessControl settings, CefV8Value::PropertyAttribute attribute )= 0;
Registers an identifier and returns true on success. Access to the identifier will be forwarded to the CefV8Accessor instance passed to CefV8Value::CreateObject(). Returns false if this method is called incorrectly or an exception is thrown. For read-only values this method will return true even though assignment failed.

WillRethrowExceptions

public virtual bool WillRethrowExceptions()= 0;
Returns true if this object will re-throw future exceptions. This attribute exists only in the scope of the current CEF value object.

 Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 80.1.4+g8927396+chromium-80.0.3987.149
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

Chromium Embedded Framework (CEF) Copyright © 2016 Marshall A. Greenblatt