Skip to content

Commit c7446d0

Browse files
author
François Baldassari
committed
Add jerry_port_abort API
JerryScript-DCO-1.0-Signed-off-by: François Baldassari [email protected]
1 parent 073ab05 commit c7446d0

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

jerry-core/jerry-port.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,11 @@ int jerry_port_putchar (int c) /**< character to put */
5252
{
5353
return putchar ((unsigned char) c);
5454
} /* jerry_port_putchar */
55+
56+
/**
57+
* Provide abort implementation for the engine
58+
*/
59+
void jerry_port_abort (void)
60+
{
61+
abort ();
62+
} /* jerry_port_abort */

jerry-core/jerry-port.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ int jerry_port_logmsg (FILE *stream, const char *format, ...);
3535
int jerry_port_errormsg (const char *format, ...);
3636
int jerry_port_putchar (int c);
3737

38+
void jerry_port_abort (void);
39+
3840
/**
3941
* @}
4042
*/

jerry-core/jrt/jrt-fatals.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jerry_fatal (jerry_fatal_code_t code) /**< status code */
6969
&& code != ERR_OUT_OF_MEMORY
7070
&& jerry_is_abort_on_fail ())
7171
{
72-
abort ();
72+
jerry_port_abort ();
7373
}
7474
else
7575
{

0 commit comments

Comments
 (0)