mirror of
https://github.com/denoland/deno.git
synced 2025-01-01 03:54:06 -05:00
e9edd7e14d
This commit refactors implementation of inspector. The intention is to be able to move inspector implementation to "deno_core". Following things were done to make that possible: * "runtime/inspector.rs" was split into "runtime/inspector/mod.rs" and "runtime/inspector/server.rs", separating inspector implementation from Websocket server implementation. * "DenoInspector" was renamed to "JsRuntimeInspector" and reference to "server" was removed from the structure, making it independent of Websocket server used to connect to Chrome Devtools. * "WebsocketSession" was renamed to "InspectorSession" and rewritten in such a way that it's not tied to Websockets anymore; instead it accepts a pair of "proxy" channel ends that allow to integrate the session with different "transports". * "InspectorSession" was renamed to "LocalInspectorSession" to better indicate that it's an "in-memory" session and doesn't require Websocket server. It was also rewritten in such a way that it uses "InspectorSession" from previous point instead of reimplementing "v8::inspector::ChannelImpl" trait; this is done by using the "proxy" channels to communicate with the V8 session. Consequently "LocalInspectorSession" is now a frontend to "InspectorSession". This introduces a small inconvenience that awaiting responses for "LocalInspectorSession" requires to concurrently poll worker's event loop. This arises from the fact that "InspectorSession" is now owned by "JsRuntimeInspector", which in turn is owned by "Worker" or "WebWorker". To ease this situation "Worker::with_event_loop" helper method was added, that takes a future and concurrently polls it along with the event loop (using "tokio::select!" macro inside a loop). |
||
---|---|---|
.. | ||
bench | ||
dts | ||
lsp | ||
ops | ||
tests | ||
tools | ||
tsc | ||
ast.rs | ||
auth_tokens.rs | ||
build.rs | ||
Cargo.toml | ||
checksum.rs | ||
colors.rs | ||
config_file.rs | ||
deno.ico | ||
deno_dir.rs | ||
diagnostics.rs | ||
diff.rs | ||
disk_cache.rs | ||
errors.rs | ||
file_fetcher.rs | ||
file_watcher.rs | ||
flags.rs | ||
flags_allow_net.rs | ||
fmt_errors.rs | ||
fs_util.rs | ||
http_cache.rs | ||
http_util.rs | ||
import_map.rs | ||
info.rs | ||
lockfile.rs | ||
logger.rs | ||
main.rs | ||
media_type.rs | ||
module_graph.rs | ||
module_loader.rs | ||
program_state.rs | ||
README.md | ||
source_maps.rs | ||
specifier_handler.rs | ||
standalone.rs | ||
text_encoding.rs | ||
tokio_util.rs | ||
tsc.rs | ||
unix_util.rs | ||
version.rs |