-
Notifications
You must be signed in to change notification settings - Fork 15k
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
refactor: use base::Value::Take*() #41169
Merged
Merged
Conversation
This file contains 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
ckerr
added
semver/patch
backwards-compatible bug fixes
target/28-x-y
PR should also be added to the "28-x-y" branch.
target/29-x-y
PR should also be added to the "29-x-y" branch.
labels
Jan 30, 2024
codebytere
requested changes
Jan 31, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ckerr these two tests are failing consistently on macOS & Linux:
- protocol module protocol.registerSchemesAsPrivileged stream successfully plays videos when content is buffered (stream: false)
- protocol module protocol.registerSchemesAsPrivileged stream successfully plays videos when streaming content (stream: true)
Looks like this change inadvertently broke them somehow 🤔
ckerr
force-pushed
the
refactor/use-base-Value-Take
branch
from
February 1, 2024 16:08
6c1a1d1
to
e0192dd
Compare
electron-cation
bot
added
new-pr 🌱
PR opened in the last 24 hours
and removed
new-pr 🌱
PR opened in the last 24 hours
labels
Feb 1, 2024
github-actions
bot
added
the
target/30-x-y
PR should also be added to the "30-x-y" branch.
label
Feb 21, 2024
github-actions
bot
added
the
target/31-x-y
PR should also be added to the "31-x-y" branch.
label
Apr 17, 2024
ckerr
removed
target/28-x-y
PR should also be added to the "28-x-y" branch.
target/29-x-y
PR should also be added to the "29-x-y" branch.
target/30-x-y
PR should also be added to the "30-x-y" branch.
target/31-x-y
PR should also be added to the "31-x-y" branch.
labels
May 9, 2024
As per the base::Value docs: "prefer over `std::move(value.Get...())` so clang-tidy can warn about potential use-after-move mistakes."
ckerr
force-pushed
the
refactor/use-base-Value-Take
branch
from
May 9, 2024 03:01
e0192dd
to
4556cef
Compare
codebytere
approved these changes
May 13, 2024
No Release Notes |
Mrnikifabio
pushed a commit
to Mrnikifabio/electron
that referenced
this pull request
May 14, 2024
* perf: avoid temporary strings in Converter<net::HttpRequestHeaders>::FromV8() * perf: take strings instead of copying them in ToResponseHead() * refactor: prefer base::Value::Take*() where appropriate As per the base::Value docs: "prefer over `std::move(value.Get...())` so clang-tidy can warn about potential use-after-move mistakes."
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Use
base::Value::TakeDict()
,TakeList()
, andTakeString()
where appropriate.std::move(value.Get*())
tostd::move(value).Take*()
for better build-time checks.base::Value::Dict
, we can avoid extra work byTake*()
ing objects directly from the temporary dict instead of copying them.Description from values.h code comments:
Checklist
npm test
passesRelease Notes
Notes: none.