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

fix: correctly emplace optional values in the value converter #20985

Merged
merged 2 commits into from Nov 6, 2019

Conversation

MarshallOfSound
Copy link
Member

@MarshallOfSound MarshallOfSound commented Nov 5, 2019

I don't wanna talk about it....

Fixes #20941

Will follow up with a test for master, we do not need to fix anything in master as the gin converter migration fixed this by accident

Notes: Fixed issue where app.setAppLogsPath did not work when you provided a valid path

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Nov 5, 2019
Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

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

i am deeply sorry for the pain this probably caused you to debug

@MarshallOfSound MarshallOfSound added the fast-track 🚅 Indicates that this PR is intended to bypass the 24 hour rule. Needs approval from Releases label Nov 5, 2019
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Nov 5, 2019
@felixrieseberg
Copy link
Member

What. The. Hell.

return true;
}
T converted;
if (Converter<T>::FromV8(isolate, val, &converted)) {
if (!Converter<T>::FromV8(isolate, val, &converted)) {
*out = base::nullopt;
Copy link
Member

Choose a reason for hiding this comment

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

it seems like this branch should return false with a failed conversion rather than silently convert to nullopt, but given that this is fixing a much bigger 🤦‍♂ issue, i'm OK with merging as is.

Copy link
Member Author

Choose a reason for hiding this comment

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

It isn't a failed conversion because this is an optional param. If this param fails to convert the optional will be empty and the next arg will use this param.

This emulates expected behavior of optional arguments in the middle of argument lists.

@MarshallOfSound MarshallOfSound merged commit a46b50f into 8-x-y Nov 6, 2019
@release-clerk
Copy link

release-clerk bot commented Nov 6, 2019

Release Notes Persisted

Fixed issue where app.setAppLogsPath did not work when you provided a valid path

@trop
Copy link
Contributor

trop bot commented Nov 6, 2019

I have automatically backported this PR to "7-1-x", please check out #21008

@sofianguy sofianguy added this to Fixed in 7.1.1 in 7.2.x Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fast-track 🚅 Indicates that this PR is intended to bypass the 24 hour rule. Needs approval from Releases
Projects
No open projects
7.2.x
Fixed in 7.1.1
Development

Successfully merging this pull request may close these issues.

None yet

4 participants