Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions jerry-core/jerry-port.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include "jerry-port.h"
#include <stdarg.h>
#include <stdlib.h>

/**
* Provide log message to filestream implementation for the engine.
Expand Down Expand Up @@ -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 */
2 changes: 2 additions & 0 deletions jerry-core/jerry-port.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/**
* @}
*/
Expand Down
2 changes: 1 addition & 1 deletion jerry-core/jrt/jrt-fatals.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down