Skip to content

Commit aefd381

Browse files
authored
Rename 'this' to 'this_arg' in function arguments (#4476)
'this' is a restricted keyword in C++ so it's a good practice to avoid it's usage as an identifier. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
1 parent 91baa17 commit aefd381

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

jerry-core/ecma/operations/ecma-promise-object.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,11 @@ ecma_fulfill_promise (ecma_value_t promise, /**< promise */
279279
*/
280280
ecma_value_t
281281
ecma_promise_reject_handler (const ecma_value_t function, /**< the function itself */
282-
const ecma_value_t this, /**< this_arg of the function */
282+
const ecma_value_t this_arg, /**< this_arg of the function */
283283
const ecma_value_t argv[], /**< argument list */
284284
const uint32_t argc) /**< argument number */
285285
{
286-
JERRY_UNUSED (this);
286+
JERRY_UNUSED (this_arg);
287287
ecma_promise_resolver_t *function_p = (ecma_promise_resolver_t *) ecma_get_object_from_value (function);
288288

289289
/* 1. */
@@ -313,11 +313,11 @@ ecma_promise_reject_handler (const ecma_value_t function, /**< the function itse
313313
*/
314314
ecma_value_t
315315
ecma_promise_resolve_handler (const ecma_value_t function, /**< the function itself */
316-
const ecma_value_t this, /**< this_arg of the function */
316+
const ecma_value_t this_arg, /**< this_arg of the function */
317317
const ecma_value_t argv[], /**< argument list */
318318
const uint32_t argc) /**< argument number */
319319
{
320-
JERRY_UNUSED (this);
320+
JERRY_UNUSED (this_arg);
321321
ecma_promise_resolver_t *function_p = (ecma_promise_resolver_t *) ecma_get_object_from_value (function);
322322

323323
/* 1. */

jerry-core/ecma/operations/ecma-promise-object.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ ecma_value_t ecma_promise_catch_finally_cb (const ecma_value_t function_obj,
129129
const uint32_t args_count);
130130
ecma_value_t
131131
ecma_promise_reject_handler (const ecma_value_t function,
132-
const ecma_value_t this,
132+
const ecma_value_t this_arg,
133133
const ecma_value_t argv[],
134134
const uint32_t argc);
135135
ecma_value_t
136136
ecma_promise_resolve_handler (const ecma_value_t function,
137-
const ecma_value_t this,
137+
const ecma_value_t this_arg,
138138
const ecma_value_t argv[],
139139
const uint32_t argc);
140140

0 commit comments

Comments
 (0)