This patch fixes #4888. The implementation is based on PR #4898, only resolved the conflicts and applied requested changes. Co-authored-by: Robert Fancsik robert.fancsik@h-lab.eu JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu