Click or drag to resize
CfxV8Value Class

[This is preliminary documentation and is subject to change.]

Structure 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 CfxV8Context.GetTaskRunner() function.
Inheritance Hierarchy
SystemObject
  ChromiumCfxObject
    ChromiumCfxBase
      ChromiumCfxLibraryBase
        ChromiumCfxV8Value

Namespace: Chromium
Assembly: ChromiumFX (in ChromiumFX.dll)
Syntax
public class CfxV8Value : CfxLibraryBase

The CfxV8Value type exposes the following members.

Properties
  NameDescription
Public propertyArrayLength
Returns the number of elements in the array.
Public propertyBoolValue
Return a bool value.
Public propertyDateValue
Return a Date value.
Public propertyDoubleValue
Return a double value.
Public propertyException
Returns the exception resulting from the last function call. This attribute exists only in the scope of the current CEF value object.
Public propertyExternallyAllocatedMemory
Returns the amount of externally allocated memory registered for the object.
Public propertyFunctionHandler
Returns the function handler or NULL if not a CEF-created function.
Public propertyFunctionName
Returns the function name.
Public propertyHasException
Returns true (1) if the last function call resulted in an exception. This attribute exists only in the scope of the current CEF value object.
Public propertyIntValue
Return an int value.
Public propertyIsArray
True if the value type is array.
Public propertyIsBool
True if the value type is bool.
Public propertyIsDate
True if the value type is Date.
Public propertyIsDouble
True if the value type is double.
Public propertyIsFunction
True if the value type is function.
Public propertyIsInt
True if the value type is int.
Public propertyIsNull
True if the value type is null.
Public propertyIsObject
True if the value type is object.
Public propertyIsString
True if the value type is string.
Public propertyIsUint
True if the value type is unsigned int.
Public propertyIsUndefined
True if the value type is undefined.
Public propertyIsUserCreated
Returns true (1) if this is a user created object.
Public propertyIsValid
Returns true (1) if the underlying handle is valid and it can be accessed on the current thread. Do not call any other functions if this function returns false (0).
Public propertyNativePtr
Provides access to the underlying native cef struct. This is a refcounted library struct derived from cef_base_t. Add a ref in order to keep it alive when this managed object go out of scope.
(Inherited from CfxLibraryBase.)
Public propertyStringValue
Return a string value.
Public propertyUintValue
Return an unsigned int value.
Public propertyUserData
Returns the user data, if any, assigned to this object.
Top
Methods
  NameDescription
Public methodAdjustExternallyAllocatedMemory
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 CfxV8Value tracks the amount of external memory associated with it and automatically decreases the global total by the appropriate amount on its destruction. |changeInBytes| specifies the number of bytes to adjust by. This function returns the number of bytes associated with the object after the adjustment. This function can only be called on user created objects.
Public methodClearException
Clears the last exception and returns true (1) on success.
Public methodStatic memberCreateArray
Create a new CfxV8Value object of type array with the specified |length|. If |length| is negative the returned array will have length 0. This function should only be called from within the scope of a CfxRenderProcessHandler, CfxV8Handler or CfxV8Accessor callback, or in combination with calling enter() and exit() on a stored CfxV8Context reference.
Public methodStatic memberCreateBool
Create a new CfxV8Value object of type bool.
Public methodStatic memberCreateDate
Create a new CfxV8Value object of type Date. This function should only be called from within the scope of a CfxRenderProcessHandler, CfxV8Handler or CfxV8Accessor callback, or in combination with calling enter() and exit() on a stored CfxV8Context reference.
Public methodStatic memberCreateDouble
Create a new CfxV8Value object of type double.
Public methodStatic memberCreateFunction
Create a new CfxV8Value object of type function. This function should only be called from within the scope of a CfxRenderProcessHandler, CfxV8Handler or CfxV8Accessor callback, or in combination with calling enter() and exit() on a stored CfxV8Context reference.
Public methodStatic memberCreateInt
Create a new CfxV8Value object of type int.
Public methodStatic memberCreateNull
Create a new CfxV8Value object of type null.
Public methodStatic memberCreateObject(CfxV8Accessor)
Create a new CfxV8Value object of type object with accessor. This function should only be called from within the scope of a CfxRenderProcessHandler, CfxV8Handler or CfxV8Accessor callback, or in combination with calling enter() and exit() on a stored CfxV8Context reference.
Public methodStatic memberCreateObject(CfxV8Interceptor)
Create a new CfxV8Value object of type object with interceptor. This function should only be called from within the scope of a CfxRenderProcessHandler, CfxV8Handler or CfxV8Accessor callback, or in combination with calling enter() and exit() on a stored CfxV8Context reference.
Public methodStatic memberCreateObject(CfxV8Accessor, CfxV8Interceptor)
Create a new CfxV8Value object of type object with optional accessor and/or interceptor. This function should only be called from within the scope of a CfxRenderProcessHandler, CfxV8Handler or CfxV8Accessor callback, or in combination with calling enter() and exit() on a stored CfxV8Context reference.
Public methodStatic memberCreateString
Create a new CfxV8Value object of type string.
Public methodStatic memberCreateUint
Create a new CfxV8Value object of type unsigned int.
Public methodStatic memberCreateUndefined
Create a new CfxV8Value object of type undefined.
Public methodDeleteValue(Int32)
Deletes the value with the specified identifier and returns true (1) on success. Returns false (0) if this function is called incorrectly, deletion fails or an exception is thrown. For read-only and don't-delete values this function will return true (1) even though deletion failed.
Public methodDeleteValue(String)
Deletes the value with the specified identifier and returns true (1) on success. Returns false (0) if this function is called incorrectly or an exception is thrown. For read-only and don't-delete values this function will return true (1) even though deletion failed.
Public methodExecuteFunction
Execute the function using the current V8 context. This function should only be called from within the scope of a CfxV8Handler or CfxV8Accessor callback, or in combination with calling enter() and exit() on a stored CfxV8Context reference. |object| is the receiver ('this' object) of the function. If |object| is NULL 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 function is called incorrectly or an exception is thrown.
Public methodExecuteFunctionWithContext
Execute the function using the specified V8 context. |object| is the receiver ('this' object) of the function. If |object| is NULL 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 function is called incorrectly or an exception is thrown.
Public methodGetKeys
Read the keys for the object's values into the specified vector. Integer- based keys will also be returned as strings.
Public methodGetValue(Int32)
Returns the value with the specified identifier on success. Returns NULL if this function is called incorrectly or an exception is thrown.
Public methodGetValue(String)
Returns the value with the specified identifier on success. Returns NULL if this function is called incorrectly or an exception is thrown.
Public methodHasValue(Int32)
Returns true (1) if the object has a value with the specified identifier.
Public methodHasValue(String)
Returns true (1) if the object has a value with the specified identifier.
Public methodIsSame
Returns true (1) if this object is pointing to the same handle as |that| object.
Public methodSetRethrowExceptions
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 (1) on success. This attribute exists only in the scope of the current CEF value object.
Public methodSetUserData
Sets the user data for this object and returns true (1) on success. Returns false (0) if this function is called incorrectly. This function can only be called on user created objects.
Public methodSetValue(Int32, CfxV8Value)
Associates a value with the specified identifier and returns true (1) on success. Returns false (0) if this function is called incorrectly or an exception is thrown. For read-only values this function will return true (1) even though assignment failed.
Public methodSetValue(String, CfxV8AccessControl, CfxV8PropertyAttribute)
Registers an identifier and returns true (1) on success. Access to the identifier will be forwarded to the CfxV8Accessor instance passed to CfxV8Value.CfxV8ValueCreateObject(). Returns false (0) if this function is called incorrectly or an exception is thrown. For read-only values this function will return true (1) even though assignment failed.
Public methodSetValue(String, CfxV8Value, CfxV8PropertyAttribute)
Associates a value with the specified identifier and returns true (1) on success. Returns false (0) if this function is called incorrectly or an exception is thrown. For read-only values this function will return true (1) even though assignment failed.
Public methodWillRethrowExceptions
Returns true (1) if this object will re-throw future exceptions. This attribute exists only in the scope of the current CEF value object.
Top
Remarks
See also the original CEF documentation in cef/include/capi/cef_v8_capi.h.
See Also