Template literal arrays should not be marked. (#4352)
Make array object big endian compatible. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -439,7 +439,7 @@ ecma_instantiate_builtin (ecma_builtin_id_t obj_builtin_id) /**< built-in id */
|
||||
ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;
|
||||
|
||||
ext_object_p->u.array.length = 0;
|
||||
ext_object_p->u.array.u.length_prop = ECMA_PROPERTY_FLAG_WRITABLE | ECMA_PROPERTY_TYPE_VIRTUAL;
|
||||
ext_object_p->u.array.length_prop_and_hole_count = ECMA_PROPERTY_FLAG_WRITABLE | ECMA_PROPERTY_TYPE_VIRTUAL;
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */
|
||||
@@ -539,20 +539,6 @@ ecma_finalize_builtins (void)
|
||||
{
|
||||
ecma_object_t *obj_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, JERRY_CONTEXT (ecma_builtin_objects)[id]);
|
||||
ecma_deref_object (obj_p);
|
||||
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
/* Note: In ES2015 a function object may contain tagged template literal collection. Whenever
|
||||
this function is assigned to a builtin function or function routine during the GC it may cause unresolvable
|
||||
circle since one part of the circle is a weak reference (marked by GC) and the other part is hard reference
|
||||
(reference count). In this case when the function which contains the tagged template literal collection
|
||||
is getting GC marked the arrays in the collection are still holding weak references to properties/prototypes
|
||||
which prevents these objects from getting freed. Releasing the property list and the prototype reference
|
||||
manually eliminates the existence of the unresolvable circle described above. */
|
||||
ecma_gc_free_properties (obj_p);
|
||||
obj_p->u1.property_list_cp = JMEM_CP_NULL;
|
||||
obj_p->u2.prototype_cp = JMEM_CP_NULL;
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
|
||||
JERRY_CONTEXT (ecma_builtin_objects)[id] = JMEM_CP_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user