Skip to content

Improve the names for devtools-related channels in workers. #6924

Closed

Description

@Ms2ger

WorkerGlobalScope has fields

    devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,

    /// Optional `IpcSender` for sending the `DevtoolScriptControlMsg`
    /// to the server from within the worker
    devtools_sender: Option<IpcSender<DevtoolScriptControlMsg>>,

    /// This `Receiver` will be ignored later if the corresponding
    /// `IpcSender` doesn't exist
    devtools_receiver: Receiver<DevtoolScriptControlMsg>,

This is confusing because chan and sender are usually used interchangeably.

DedicatedWorkerGlobalScope::run_worker_scope has arguments

                            devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
                            devtools_ipc_chan: Option<IpcSender<DevtoolScriptControlMsg>>,
                            devtools_ipc_port: IpcReceiver<DevtoolScriptControlMsg>,

which is no less confusing, as the two senders are IpcSenders.

To fix this issue, figure out the distinction between these channels, and invent names for them that explain the distinction. None of those names should use the outdated terms "chan" or "port".

Activity

  1. added
    A-content/dom
    I-refactor
    E-more-complex
    on Aug 3, 2015
  2. added a commit that references this issue on Aug 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/domA-devtoolsE-more-complexI-refactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions