diff --git a/jerry-core/jerry-port.c b/jerry-core/jerry-port.c index 3a8cb8b3d1..307bf371c7 100644 --- a/jerry-core/jerry-port.c +++ b/jerry-core/jerry-port.c @@ -15,6 +15,7 @@ #include "jerry-port.h" #include +#include /** * Provide log message to filestream implementation for the engine. @@ -52,3 +53,11 @@ int jerry_port_putchar (int c) /**< character to put */ { return putchar ((unsigned char) c); } /* jerry_port_putchar */ + +/** + * Provide abort implementation for the engine + */ +void jerry_port_abort (void) +{ + abort (); +} /* jerry_port_abort */ diff --git a/jerry-core/jerry-port.h b/jerry-core/jerry-port.h index 5de51909b3..e557ca5429 100644 --- a/jerry-core/jerry-port.h +++ b/jerry-core/jerry-port.h @@ -35,6 +35,8 @@ int jerry_port_logmsg (FILE *stream, const char *format, ...); int jerry_port_errormsg (const char *format, ...); int jerry_port_putchar (int c); +void jerry_port_abort (void); + /** * @} */ diff --git a/jerry-core/jrt/jrt-fatals.c b/jerry-core/jrt/jrt-fatals.c index 498df0c47d..4b1f30187d 100644 --- a/jerry-core/jrt/jrt-fatals.c +++ b/jerry-core/jrt/jrt-fatals.c @@ -69,7 +69,7 @@ jerry_fatal (jerry_fatal_code_t code) /**< status code */ && code != ERR_OUT_OF_MEMORY && jerry_is_abort_on_fail ()) { - abort (); + jerry_port_abort (); } else {