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

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."
This commit is contained in:
Charles Kerr 2019-07-25 10:19:04 -05:00 committed by GitHub
parent 539078f281
commit f6fb877de9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 46 additions and 54 deletions

View file

@ -12,7 +12,7 @@ namespace gin_util {
template <typename T>
bool SetMethod(v8::Local<v8::Object> recv,
const base::StringPiece& key,
base::StringPiece key,
const T& callback) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
auto context = isolate->GetCurrentContext();