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

inspector - Use script name for target title #8243

Closed
wants to merge 1 commit into from
Closed

inspector - Use script name for target title #8243

wants to merge 1 commit into from

Conversation

eugeneo
Copy link
Contributor

@eugeneo eugeneo commented Aug 23, 2016

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

This only touches JSON API of the V8 Inspector integration.

Description of change

Changes inspector integration to use Node.js script file name as target
title (reported in JSON and shown in developer tools UIs). It will also
report file:// URL for the script as some tools seem to use that field
to open the script in the editor.

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 Aug 23, 2016
std::string AbsolutePath(const char* path) {
bool is_relative;
if (path && path[0]) {
char *file_name;
Copy link
Member

Choose a reason for hiding this comment

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

Style: char*

@jasnell
Copy link
Member

jasnell commented Aug 25, 2016

LGTM, ping @bnoordhuis

@@ -220,8 +221,8 @@ static struct {
void Initialize(int thread_pool_size) {}
void PumpMessageLoop(Isolate* isolate) {}
void Dispose() {}
bool StartInspector(Environment *env, int port, bool wait) {
env->ThrowError("Node compiled with NODE_USE_V8_PLATFORM=0");
void StartInspector(Environment *env, const char* script_path,
Copy link
Contributor

Choose a reason for hiding this comment

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

Accidental change from bool to void?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Merge artifact. Thank you for pointing it out.

@eugeneo
Copy link
Contributor Author

eugeneo commented Aug 26, 2016

Thank you for the review. I uploaded a revised CL, please take a look.


void Escape(std::string* string) {
int i = 0;
for (char c : *string) {
Copy link
Member

Choose a reason for hiding this comment

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

char& c? Then you don't need i.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@bnoordhuis
Copy link
Member

LGTM with some comments. The missing uv_fs_req_cleanup() is a bug that should be fixed, though.

@eugeneo
Copy link
Contributor Author

eugeneo commented Aug 29, 2016

Thank you for the review. CL was updated. Please take another look.

@bnoordhuis
Copy link
Member

bnoordhuis commented Aug 30, 2016

LGTM

EDIT: If you s/inspector - Use/inspector: use/ the commit log.

@ofrobots
Copy link
Contributor

I can fix the commit abstract at landing time.

New CI: https://ci.nodejs.org/job/node-test-pull-request/3887/

@ofrobots
Copy link
Contributor

@eugeneo: can you fix the linter errors from the CI?

Changes inspector integration to use Node.js script file name as target
title (reported in JSON and shown in developer tools UIs). It will also
report file:// URL for the script as some tools seem to use that field
to open the script in the editor.
@eugeneo
Copy link
Contributor Author

eugeneo commented Aug 31, 2016

Done. I'm sorry - forgot to run make cpplint...

@ofrobots
Copy link
Contributor

ofrobots commented Sep 1, 2016

@ofrobots
Copy link
Contributor

ofrobots commented Sep 2, 2016

CI is green (enough). Failures are unrelated / buildbot issues.

@ofrobots
Copy link
Contributor

ofrobots commented Sep 2, 2016

Landed as 609a265.

@ofrobots ofrobots closed this Sep 2, 2016
ofrobots pushed a commit that referenced this pull request Sep 2, 2016
Changes inspector integration to use Node.js script file name as target
title (reported in JSON and shown in developer tools UIs). It will also
report file:// URL for the script as some tools seem to use that field
to open the script in the editor.

PR-URL: #8243
Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]>
@Fishrock123 Fishrock123 mentioned this pull request Sep 6, 2016
Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request Sep 8, 2016
Changes inspector integration to use Node.js script file name as target
title (reported in JSON and shown in developer tools UIs). It will also
report file:// URL for the script as some tools seem to use that field
to open the script in the editor.

PR-URL: nodejs#8243
Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]>

 Conflicts:
	src/node.cc
Fishrock123 pushed a commit that referenced this pull request Sep 9, 2016
Changes inspector integration to use Node.js script file name as target
title (reported in JSON and shown in developer tools UIs). It will also
report file:// URL for the script as some tools seem to use that field
to open the script in the editor.

PR-URL: #8243
Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]>

 Conflicts:
	src/node.cc
@eugeneo eugeneo deleted the title_url branch September 16, 2016 17:20
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.

7 participants