Skip to content

Commit ab4459c

Browse files
committed
Update document 10.EXT-REFERENCE-HANDLER.md
The handler prototype did not match it's implementation JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo [email protected]
1 parent 43f5026 commit ab4459c

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

docs/10.EXT-REFERENCE-HANDLER.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,13 @@ a backtrace is also printed out.
265265
266266
```c
267267
jerry_value_t
268-
jerryx_handler_assert_fatal (const jerry_value_t func_obj_val, const jerry_value_t this_p,
269-
const jerry_value_t args_p[], const jerry_length_t args_cnt);
268+
jerryx_handler_assert_fatal (const jerry_call_info_t *call_info_p,
269+
const jerry_value_t args_p[],
270+
const jerry_length_t args_cnt);
270271
```
271272

272-
- `func_obj_val` - the function object that was called (unused).
273-
- `this_p` - the `this` value of the call (unused).
273+
- `call_info_p` - pointer to a [jerry_call_info_t](#jerry_call_info_t)
274+
structure which holds call related information (unused).
274275
- `args_p` - the array of function arguments.
275276
- `args_cnt` - the number of function arguments.
276277
- return value - `jerry_value_t` representing boolean true, if only one argument
@@ -292,12 +293,13 @@ Soft assert for scripts. The routine throws an error on assertion failure.
292293

293294
```c
294295
jerry_value_t
295-
jerryx_handler_assert_throw (const jerry_value_t func_obj_val, const jerry_value_t this_p,
296-
const jerry_value_t args_p[], const jerry_length_t args_cnt);
296+
jerryx_handler_assert_throw (const jerry_call_info_t *call_info_p,
297+
const jerry_value_t args_p[],
298+
const jerry_length_t args_cnt);
297299
```
298300
299-
- `func_obj_val` - the function object that was called (unused).
300-
- `this_p` - the `this` value of the call (unused).
301+
- `call_info_p` - pointer to a [jerry_call_info_t](#jerry_call_info_t)
302+
structure which holds call related information (unused).
301303
- `args_p` - the array of function arguments.
302304
- `args_cnt` - the number of function arguments.
303305
- return value - `jerry_value_t` representing boolean true, if only one argument
@@ -331,12 +333,13 @@ gc is performed, which is also the default if no parameters passed.
331333
332334
```c
333335
jerry_value_t
334-
jerryx_handler_gc (const jerry_value_t func_obj_val, const jerry_value_t this_p,
335-
const jerry_value_t args_p[], const jerry_length_t args_cnt);
336+
jerryx_handler_gc (const jerry_call_info_t *call_info_p,
337+
const jerry_value_t args_p[],
338+
const jerry_length_t args_cnt);
336339
```
337340

338-
- `func_obj_val` - the function object that was called (unused).
339-
- `this_p` - the `this` value of the call (unused).
341+
- `call_info_p` - pointer to a [jerry_call_info_t](#jerry_call_info_t)
342+
structure which holds call related information (unused).
340343
- `args_p` - the array of function arguments (unused).
341344
- `args_cnt` - the number of function arguments (unused).
342345
- return value - `jerry_value_t` representing `undefined`.
@@ -365,12 +368,13 @@ ensure that their port implementation also provides
365368

366369
```c
367370
jerry_value_t
368-
jerryx_handler_print (const jerry_value_t func_obj_val, const jerry_value_t this_p,
369-
const jerry_value_t args_p[], const jerry_length_t args_cnt);
371+
jerryx_handler_print (const jerry_call_info_t *call_info_p,
372+
const jerry_value_t args_p[],
373+
const jerry_length_t args_cnt);
370374
```
371375
372-
- `func_obj_val` - the function object that was called (unused).
373-
- `this_p` - the `this` value of the call (unused).
376+
- `call_info_p` - pointer to a [jerry_call_info_t](#jerry_call_info_t)
377+
structure which holds call related information (unused).
374378
- `args_p` - the array of function arguments.
375379
- `args_cnt` - the number of function arguments.
376380
- return value - `jerry_value_t` representing `undefined` if all arguments could
@@ -398,7 +402,7 @@ longer needed.
398402
```c
399403
jerry_value_t
400404
jerryx_register_global (const char *name_p,
401-
jerry_external_handler_t handler_p);
405+
jerry_external_handler_t handler_p);
402406
```
403407

404408
- `name_p` - the name of the function to be registered.

0 commit comments

Comments
 (0)