diff options
author | Andreu Botella <andreu@andreubotella.com> | 2022-07-11 12:08:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-11 12:08:37 +0200 |
commit | 83c9714fb2f401e82a6c2e784a43130818e8282d (patch) | |
tree | 558bc6b9677e27ed482bffe0cfc5ca35aff7c20e /cli/tools/coverage/mod.rs | |
parent | d70ba324feadcb0c6238dd3f0e04a53bb8448147 (diff) |
chore(core): Deduplicate code related to `op_event_loop_has_more_work` (#15147)
The `op_event_loop_has_more_work` op, introduced in #14830, duplicates
code from `JsRuntime::poll_event_loop`. That PR also added the unused
method `JsRuntime::event_loop_has_work`, which is another duplication
of that same code, and which isn't used anywhere.
This change deduplicates this by renaming
`JsRuntime::event_loop_has_work` to `event_loop_pending_state`, and
making it the single place to determine what in the event loop is
pending. This result is then returned in a struct which is used both
in the event loop and in the `op_event_loop_has_more_work` op.
Diffstat (limited to 'cli/tools/coverage/mod.rs')
0 files changed, 0 insertions, 0 deletions