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

src: create env->inspector_console_api_object earlier #24906

Closed
wants to merge 1 commit into from

Commits on Dec 8, 2018

  1. src: create env->inspector_console_api_object earlier

    Previously we create env->inspector_console_api_object() when
    `process.binding('inspector')` is called, which may be too late
    if the inspector console is used before the first call to
    `process.binding('inspector')` - that is possible when
    using `--inspect-brk-node`. Setting a breakpoint and using the
    inspector console before that would crash the process.
    
    This patch moves the initialization of the console API object to
    the point when Environment is initialized so that
    `installAdditionalCommandLineAPI()` can be essentially a noop
    if we use the inspector console before the inspector binding
    is initialized instead of crashing on an empty object.
    joyeecheung committed Dec 8, 2018
    Configuration menu
    Copy the full SHA
    5650a1b View commit details
    Browse the repository at this point in the history