Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move JsRuntimeInspector to deno_core #10763

Merged
merged 51 commits into from
May 26, 2021

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented May 25, 2021

This commit moves implementation of "JsRuntimeInspector" to "deno_core" crate.

To achieve that following changes were made:

  • "Worker" and "WebWorker" no longer own instance of "JsRuntimeInspector",
    instead it is now owned by "deno_core::JsRuntime".

  • Consequently polling of inspector is no longer done in "Worker"/"WebWorker",
    instead it's done in "deno_core::JsRuntime::poll_event_loop".

  • "deno_core::JsRuntime::poll_event_loop" and "deno_core::JsRuntime::run_event_loop",
    now accept "wait_for_inspector" boolean that tells if event loop should still be
    "pending" if there are active inspector sessions - this change fixes the problem
    that inspector disconnects from the frontend and process exits once the code has
    stopped executing.

@bartlomieju bartlomieju requested review from bnoordhuis, ry and piscisaureus and removed request for ry, piscisaureus and bnoordhuis May 25, 2021 21:24
@ry
Copy link
Member

ry commented May 26, 2021

I defer to @piscisaureus for review.

Copy link
Member

@piscisaureus piscisaureus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as discussed

core/runtime.rs Show resolved Hide resolved
core/lib.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants