WPEJavaScriptCore.Value.array_buffer_get_data

### Method

# WPEJavaScriptCore Valuearray_buffer_get_data

since: 2.38

#### Declaration [src]

    gpointer
    jsc_value_array_buffer_get_data (
      JSCValue* value,
      gsize* size
    )

#### Description [src]

Gets a pointer to memory that contains the array buffer data.

Obtains a pointer to the memory region that holds the contents of the %ArrayBuffer; modifications done to the data will be visible to JavaScript code. If `size` is not `NULL`, the size in bytes of the memory region will also be stored in the pointed location.

Note that the pointer returned by this function is not guaranteed to remain the same after calls to other JSC API functions. If you plan to access the data of the %ArrayBuffer later, you can keep a reference to the `value` and obtain the data pointer at a later point. Keep in mind that if JavaScript code has a chance to run, for example due to main loop events that result in JSC being called, the contents of the memory region might be modified in the meantime. Consider taking a copy of the data and using the copy instead in asynchronous code.

Available since: 2.38

#### Parameters

`size`

  Type: `gsize*`

  Location where to store the size of the memory region.

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

#### Return value

Type: `gpointer`

Pointer to memory.

The returned data is owned by the instance.
The return value can be `NULL`.