1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

[ecmascript] check_in_map_timer -> found_in_map_timer

This commit is contained in:
Witold Filipczyk 2021-12-02 17:02:00 +01:00
parent 98d970d606
commit ef1f8d10b7
4 changed files with 6 additions and 6 deletions

View File

@ -594,7 +594,7 @@ ecmascript_set_timeout(struct ecmascript_interpreter *interpreter, char *code, i
init_string(&interpreter->code); init_string(&interpreter->code);
add_to_string(&interpreter->code, code); add_to_string(&interpreter->code, code);
mem_free(code); mem_free(code);
if (check_in_map_timer(interpreter->vs->doc_view->document->timeout)) { if (found_in_map_timer(interpreter->vs->doc_view->document->timeout)) {
kill_timer(&interpreter->vs->doc_view->document->timeout); kill_timer(&interpreter->vs->doc_view->document->timeout);
} }
install_timer(&interpreter->vs->doc_view->document->timeout, timeout, ecmascript_timeout_handler, interpreter); install_timer(&interpreter->vs->doc_view->document->timeout, timeout, ecmascript_timeout_handler, interpreter);
@ -609,7 +609,7 @@ ecmascript_set_timeout2(struct ecmascript_interpreter *interpreter, JS::HandleVa
assert(interpreter && interpreter->vs->doc_view->document); assert(interpreter && interpreter->vs->doc_view->document);
done_string(&interpreter->code); done_string(&interpreter->code);
init_string(&interpreter->code); init_string(&interpreter->code);
if (check_in_map_timer(interpreter->vs->doc_view->document->timeout)) { if (found_in_map_timer(interpreter->vs->doc_view->document->timeout)) {
kill_timer(&interpreter->vs->doc_view->document->timeout); kill_timer(&interpreter->vs->doc_view->document->timeout);
} }
JS::RootedValue fun((JSContext *)interpreter->backend_data, f); JS::RootedValue fun((JSContext *)interpreter->backend_data, f);
@ -627,7 +627,7 @@ ecmascript_set_timeout2q(struct ecmascript_interpreter *interpreter, JSValueCons
assert(interpreter && interpreter->vs->doc_view->document); assert(interpreter && interpreter->vs->doc_view->document);
done_string(&interpreter->code); done_string(&interpreter->code);
init_string(&interpreter->code); init_string(&interpreter->code);
if (check_in_map_timer(interpreter->vs->doc_view->document->timeout)) { if (found_in_map_timer(interpreter->vs->doc_view->document->timeout)) {
kill_timer(&interpreter->vs->doc_view->document->timeout); kill_timer(&interpreter->vs->doc_view->document->timeout);
} }
interpreter->fun = fun; interpreter->fun = fun;

View File

@ -240,7 +240,7 @@ js_window_clearTimeout(JSContext *ctx, JSValueConst this_val, int argc, JSValueC
timer_id_T id = reinterpret_cast<timer_id_T>(number); timer_id_T id = reinterpret_cast<timer_id_T>(number);
if (check_in_map_timer(id)) { if (found_in_map_timer(id)) {
kill_timer(&id); kill_timer(&id);
} }

View File

@ -483,7 +483,7 @@ window_clearTimeout(JSContext *ctx, unsigned int argc, JS::Value *rval)
int64_t number = JS::ToBigInt64(bi); int64_t number = JS::ToBigInt64(bi);
timer_id_T id = reinterpret_cast<timer_id_T>(number); timer_id_T id = reinterpret_cast<timer_id_T>(number);
if (check_in_map_timer(id)) { if (found_in_map_timer(id)) {
kill_timer(&id); kill_timer(&id);
} }
return true; return true;

View File

@ -20,7 +20,7 @@ del_from_map_timer(struct timer *timer)
} }
inline bool inline bool
check_in_map_timer(struct timer *timer) found_in_map_timer(struct timer *timer)
{ {
return map_timer.find(timer) != map_timer.end(); return map_timer.find(timer) != map_timer.end();
} }