Allow API usage in native_free_callbacks (#3515)
This patch allows the use of API functions in native_free_callbacks for native pointers once again. JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
committed by
Dániel Bátyai
parent
71d4e12105
commit
f46d061d19
@@ -29,6 +29,11 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Maximum number of GC loops on cleanup.
|
||||
*/
|
||||
#define JERRY_GC_LOOP_LIMIT 100
|
||||
|
||||
/**
|
||||
* Initialize ECMA components
|
||||
*/
|
||||
@@ -73,8 +78,17 @@ ecma_finalize (void)
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
ecma_finalize_global_lex_env ();
|
||||
ecma_finalize_builtins ();
|
||||
ecma_gc_run ();
|
||||
uint8_t runs = 0;
|
||||
do
|
||||
{
|
||||
ecma_finalize_builtins ();
|
||||
ecma_gc_run ();
|
||||
if (++runs >= JERRY_GC_LOOP_LIMIT)
|
||||
{
|
||||
jerry_fatal (ERR_UNTERMINATED_GC_LOOPS);
|
||||
}
|
||||
}
|
||||
while (JERRY_CONTEXT (ecma_gc_new_objects) != 0);
|
||||
ecma_finalize_lit_storage ();
|
||||
} /* ecma_finalize */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user