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

chore: pass base::StringPiece args by value #19432

Merged
merged 1 commit into from Jul 25, 2019

Conversation

@ckerr
Copy link
Member

commented Jul 24, 2019

Description of Change

Changes all of Electron's functions that took a const base::StringPiece& to take a base::StringPiece instead. https://cs.chromium.org/chromium/src/base/strings/string_piece.h?l=14 discusses this, saying "Prefer passing StringPieces by value" because "[p]assing by value generates slightly smaller code."

Not CC'ing any specific person on this because I don't see an obvious stakeholder. Reviews appreciated.

Checklist

Release Notes

Notes: no-notes

chore: pass base::StringPiece args by value
https://cs.chromium.org/chromium/src/base/strings/string_piece.h?l=14
discusses this, saying "Prefer passing StringPieces by value" because
"[p]assing by value generates slightly smaller code."
@ckerr ckerr referenced this pull request Jul 24, 2019
5 of 5 tasks complete
@deepak1556
Copy link
Member

left a comment

Would be good to know what causes the size difference. The explanation seems to be an internal link.

@ckerr ckerr merged commit f6fb877 into master Jul 25, 2019

13 checks passed

Artifact Comparison No Changes
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
build-linux Workflow: build-linux
Details
build-mac Workflow: build-mac
Details
electron-arm-testing Build #20190724.27 succeeded
Details
electron-arm64-testing Build #20190724.27 succeeded
Details
lint Workflow: lint
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

commented Jul 25, 2019

No Release Notes

@ckerr ckerr deleted the prefer-passing-stringpiece-by-value branch Jul 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.