Rework external function handlers (#4599)
Instead of a fixed number of arguments, a call info structure is passed to the handlers, which can be extended in the future without breaknig the API. This structure holds new.target value, so its getter function is removed. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -32,7 +32,7 @@ DECLARE_GLOBAL_FUNCTION(setInterval) {
|
||||
|
||||
int id = mbed::js::EventLoop::getInstance().getQueue().call_every(interval, jerry_call_function, args[0], jerry_create_null(), (jerry_value_t*)NULL, 0);
|
||||
|
||||
jerry_value_t result = jerry_set_property_by_index(function_obj_p, id, args[0]);
|
||||
jerry_value_t result = jerry_set_property_by_index(call_info_p->function, id, args[0]);
|
||||
|
||||
if (jerry_value_is_error(result)) {
|
||||
jerry_release_value(result);
|
||||
|
||||
Reference in New Issue
Block a user