Skip to content

Conversation

@juanarbol
Copy link
Member

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

@nodejs-github-botnodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Aug 9, 2020
Copy link
Member

@addaleaxaddaleax left a comment

Choose a reason for hiding this comment

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

This is not redundant because it moves the task out of the InternalCallbackScope in the case in which env is available.

@BridgeAR
Copy link
Member

@addaleax since the code is now run after the if statement, does it not behave the same as before?

@addaleax
Copy link
Member

addaleax commented Aug 9, 2020

@BridgeAR No – this is als the cause of the failures in the WASI tests here, I assume.

More generally, in C++

if (x){some_variable a; do_something()} else{do_something()}

and

if (x){some_variable a} do_something(); 

are not equivalent if the constructor/destructor of a influence do_something() in some way (which is the case here).

@juanarbol
Copy link
MemberAuthor

Hey @addaleax thank you!! I was asking why it did break WASI tests.

Closing.

@addaleax
Copy link
Member

@juanarbol Fwiw, you’re not the first one who ran into this, so it might be worth adding a comment here that this is intentional (especially considering that this PR already had 4 approvals)

@juanarboljuanarbol reopened this Aug 10, 2020
@juanarboljuanarbolforce-pushed the juanarbol/remove-else-block branch from 4209ff9 to 24fba59CompareAugust 24, 2020 16:16
@juanarboljuanarbol changed the title src: remove redundant else blocksrc: document required else block at src/node_platform.ccAug 24, 2020
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@juanarboljuanarbol added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 29, 2020
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 29, 2020
@nodejs-github-bot
Copy link
Collaborator

@addaleaxaddaleax added the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 30, 2020
@github-actionsgithub-actionsbot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Sep 30, 2020
@addaleax
Copy link
Member

Landed in 535989e

addaleax pushed a commit that referenced this pull request Sep 30, 2020
PR-URL: #34688 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
danielleadams pushed a commit that referenced this pull request Oct 6, 2020
PR-URL: #34688 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
@danielleadamsdanielleadams mentioned this pull request Oct 6, 2020
joesepi pushed a commit to joesepi/node that referenced this pull request Jan 8, 2021
PR-URL: nodejs#34688 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
@juanarboljuanarbol deleted the juanarbol/remove-else-block branch January 19, 2021 16:27
@targostargos removed the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Sep 5, 2021
Sign up for freeto 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.

11 participants

@juanarbol@BridgeAR@addaleax@nodejs-github-bot@jasnell@lpinca@devnexen@gireeshpunathil@yashLadha@Nelias@targos