FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

src: refactor emit before/after/promiseResolve by danbev · Pull Request #19295 · nodejs/node · GitHub

/ node Public

src: refactor emit before/after/promiseResolve - #19295

Closed
danbev wants to merge 1 commit into
nodejs:masterfrom
danbev:async_wrap_emit
Closed

src: refactor emit before/after/promiseResolve#19295
danbev wants to merge 1 commit into
nodejs:masterfrom
danbev:async_wrap_emit

Conversation

danbev commented Mar 12, 2018

Copy link
Copy Markdown
Contributor

Currently EmitBefore, EmitAfter, EmitPromiseResolve are very similar.
This commit suggests extracting the code they have in common to a new
function to reduce code duplication.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Currently EmitBefore, EmitAfter, EmitPromiseResolve are very similar.
This commit suggests extracting the code they have in common to a new
function to reduce code duplication.
nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Mar 12, 2018

danbev commented Mar 12, 2018

Copy link
Copy Markdown
Contributor Author

danbev commented Mar 12, 2018

Copy link
Copy Markdown
Contributor Author
node-test-commit failure looks unrelated

console output:

06:10:11 Makefile:475: recipe for target 'run-ci' failed
06:10:11 make: *** [run-ci] Error 2
06:10:11 Build step 'Execute shell' marked build as failure
06:10:11 Run condition [Always] enabling perform for step [[]]
06:10:11 Run condition [Always] enabling perform for step [[]]
06:10:11 TAP Reports Processing: START
06:10:11 Looking for TAP results report in workspace using pattern: *.tap
06:10:11 Did not find any matching files. Setting build result to FAILURE.
06:10:11 Checking ^not ok
06:10:11 Jenkins Text Finder: File set '*.tap' is empty
06:10:11 Notifying upstream projects of job completion
06:10:11 Finished: FAILURE

Comment thread src/async_wrap.cc


void AsyncWrap::EmitPromiseResolve(Environment* env, double async_id) {
void Emit(Environment* env, double async_id, AsyncHooks::Fields type,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

perhaps inline void Emit(...?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@jasnell Imo we shouldn’t be adding inline to functions that aren’t defined in the corresponding -inl.h header

Also, @bnoordhuis pointed out somewhere else that we should put the inline specifier on the declarations in the .h header file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

ok, I'm good with that.

danbev commented Mar 14, 2018

Copy link
Copy Markdown
Contributor Author

Landed in 861285a.

danbev closed this Mar 14, 2018
danbev added a commit that referenced this pull request Mar 14, 2018
Currently EmitBefore, EmitAfter, EmitPromiseResolve are very similar.
This commit suggests extracting the code they have in common to a new
function to reduce code duplication.

PR-URL: #19295
Reviewed-By: Anna Henningsen <anna@addaleax.net>
danbev deleted the async_wrap_emit branch March 14, 2018 09:49
targos pushed a commit that referenced this pull request Mar 17, 2018
Currently EmitBefore, EmitAfter, EmitPromiseResolve are very similar.
This commit suggests extracting the code they have in common to a new
function to reduce code duplication.

PR-URL: #19295
Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos mentioned this pull request Mar 18, 2018
MylesBorins pushed a commit that referenced this pull request Mar 20, 2018
Currently EmitBefore, EmitAfter, EmitPromiseResolve are very similar.
This commit suggests extracting the code they have in common to a new
function to reduce code duplication.

PR-URL: #19295
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
Currently EmitBefore, EmitAfter, EmitPromiseResolve are very similar.
This commit suggests extracting the code they have in common to a new
function to reduce code duplication.

PR-URL: nodejs#19295
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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++.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL