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:
parent
539078f281
commit
f6fb877de9
12 changed files with 46 additions and 54 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue