Add allocate/free callbacks to ArrayBuffers (#4801)

Larger buffer allocations will throw error instead of calling jerry_fatal.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-10-28 13:51:34 +02:00
committed by GitHub
parent d2388e907f
commit a024eb2118
19 changed files with 1365 additions and 716 deletions
@@ -63,6 +63,10 @@ ecma_init (void)
#if JERRY_ESNEXT
JERRY_CONTEXT (current_new_target_p) = NULL;
#endif /* JERRY_ESNEXT */
#if JERRY_BUILTIN_TYPEDARRAY
JERRY_CONTEXT (arraybuffer_compact_allocation_limit) = 256;
#endif /* JERRY_BUILTIN_TYPEDARRAY */
} /* ecma_init */
/**