Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@eugeneo
Copy link
Contributor

@eugeneo eugeneo commented Jul 25, 2016

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

deps:v8_inspector

Description of change

Node process will no longer terminate with an assertion if the inspector
port is not available.

CC: @ofrobots

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. inspector Issues and PRs related to the V8 inspector protocol labels Jul 25, 2016
Copy link
Member

Choose a reason for hiding this comment

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

This is starting to look like a state machine spread across several booleans. Consolidating them into an enum is cleaner and easier to reason about, IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the review. I introduced initial set of states. Note that I am still working a refactoring that will split "inspector agent" (the one that lives on the main thread and talks to V8) and "inspector server" (that talks to a client over the socket - including all HTTP responses and such). Then there will be 2 objects with likely two states. In the current implementation, adding states for all flags (like shutting_down_ and wait_) would make the variable accessed (and modified) from both threads - which might introduce some race conditions (or require more synchronization than is neccessary now).

@bnoordhuis
Copy link
Member

LGTM

@ofrobots
Copy link
Contributor

Node process will no longer terminate with an assertion if the inspector
port is not available.
@eugeneo
Copy link
Contributor Author

eugeneo commented Jul 29, 2016

I added a missing space, as required by linter.

@jasnell
Copy link
Member

jasnell commented Jul 29, 2016

LGTM

@ofrobots
Copy link
Contributor

@ofrobots
Copy link
Contributor

Landed as f789eb3.

@ofrobots ofrobots closed this Jul 29, 2016
ofrobots pushed a commit that referenced this pull request Jul 29, 2016
Node process will no longer terminate with an assertion if the
inspector port is not available.

PR-URL: #7874
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
@eugeneo eugeneo deleted the stop_when_no_port branch August 2, 2016 23:37
@cjihrig cjihrig mentioned this pull request Aug 8, 2016
cjihrig pushed a commit that referenced this pull request Aug 10, 2016
Node process will no longer terminate with an assertion if the
inspector port is not available.

PR-URL: #7874
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>

Conflicts:
	src/node.cc
@cjihrig cjihrig mentioned this pull request Aug 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. inspector Issues and PRs related to the V8 inspector protocol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.