5 Commits

Author SHA1 Message Date
Robert Fancsik
525c35f148 Introduce jerry_get_resource_name API function (#3236)
This new API function adds possibility to query the resource name of the currently executed script (including modules) or a function object.
This patch closes #2170.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-11-06 15:05:49 +01:00
Péter Gál
c64ee882da Introduce new jerry-ext methods to ease property registration (#2715)
New methods
* jerryx_set_properties: Allows multiple property registration for via a single call
* jerryx_set_property_str: Allows property registration without the need to
    create the property name JS value. The property name can be directly passed
    as a `const char*` value and must be zero terminated.
* jerryx_get_property_str: Allows getting a property value on a given object.
    The property name can be directly passed as a `const char*` value.
* jerryx_has_property_str: Allows checking if a property exists on a given object.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-07-25 20:37:44 +02:00
Péter Gál
162ba8c116 Make jerryx_port_handler_print_char truly a port function (#2789)
In the previous approach `jerryx_port_handler_print_char` was implemented
in by the jerry-default-port. This implementation however required the
jerry-ext handler header file which created a requirement in the
jerry-default-port for the jerry-ext headers.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2019-03-13 10:19:30 +01:00
Akos Kiss
cfa7cfc08c
Add soft assert handler to jerry-ext (#2516)
Allow developers to choose whether they want a hard or a soft
implementation behind `assert`, i.e., whether they want to kill
the whole engine in case of an assertion failure in the executed
script or just throw a JS error.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-09-18 14:42:28 +02:00
Akos Kiss
a8f2d31bca Implement common external function handlers in jerry-ext (#1787)
Added `handler` module to `jerry-ext` to contain implementation of
commonly used external function handlers: `assert`, `gc`, and
`print`.

Also adapted jerry-main to use jerry-ext/handler

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2017-05-09 10:16:56 +02:00