Constructor

WPEJavaScriptCoreValuenew_object

Declaration [src]

JSCValue*
jsc_value_new_object (
  JSCContext* context,
  gpointer instance,
  JSCClass* jsc_class
)

Description [src]

Create a new JSCValue from instance. If instance is NULL a new empty object is created. When instance is provided, jsc_class must be provided too. jsc_class takes ownership of instance that will be freed by the GDestroyNotify passed to jsc_context_register_class().

Parameters

context JSCContext
 

A JSCContext.

 The data is owned by the caller of the function.
instance gpointer
 

An object instance or NULL.

 The argument can be NULL.
 The called function takes ownership of the data, and is responsible for freeing it.
jsc_class JSCClass
 

The JSCClass of instance.

 The argument can be NULL.
 The data is owned by the caller of the function.

Return value

Returns: JSCValue
 

A JSCValue.

 The caller of the function takes ownership of the data, and is responsible for freeing it.