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

console: split console.js into constructor.js, global.js and inspector.js for clarity #24709

Closed
wants to merge 3 commits into from

Commits on Nov 28, 2018

  1. lib: move lib/console.js to lib/internal/console/constructor.js

    This is a broken commit: it's here so that git interpret this
    as a file move and preserve most of the history of the Console
    constructor.
    joyeecheung committed Nov 28, 2018
    Configuration menu
    Copy the full SHA
    f517b03 View commit details
    Browse the repository at this point in the history
  2. console: split console into global.js and constructor.js

    Since we do not actually use the Console constructor to
    instantiate the global console, move the two piece of
    code into two different JS files for clarity, and make
    console.js a mere re-export of the global console.
    The hope is to make the global console, a namespace, more
    web-compatible while keeping the Console constructor
    available for backwards compatibility.
    joyeecheung committed Nov 28, 2018
    Configuration menu
    Copy the full SHA
    f0962d4 View commit details
    Browse the repository at this point in the history
  3. console: move the inspector console wrapping in a separate file

    Move the wrapping of the inspector console in a separate file
    for clarity. In addition, save the original console from the
    VM explicitly via an exported property
    `require('internal/console/inspector').consoleFromVM`
    that `require('inspector').console` can alias to it later,
    instead of hanging the original console onto `per_thread.js`
    during bootstrap and counting on that `per_thread.js`
    only gets evaluated once and gets cached.
    joyeecheung committed Nov 28, 2018
    Configuration menu
    Copy the full SHA
    24f7c80 View commit details
    Browse the repository at this point in the history