Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(961)

Unified Diff: net/spdy/hpack/hpack_decoder.cc

Issue 1354773002: Avoid string construction overhead for lookup-only HpackEntry objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit: return feels weird in a constructor. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/spdy/hpack/hpack_encoder_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/hpack/hpack_decoder.cc
diff --git a/net/spdy/hpack/hpack_decoder.cc b/net/spdy/hpack/hpack_decoder.cc
index b803302c2753c9ab16cc54c30274f40c019c091f..1b66851159a6879ad006933707dd2a4c996be0b0 100644
--- a/net/spdy/hpack/hpack_decoder.cc
+++ b/net/spdy/hpack/hpack_decoder.cc
@@ -189,7 +189,7 @@ bool HpackDecoder::DecodeNextName(HpackInputStream* input_stream,
*next_name = entry->name();
} else {
// |entry| could be evicted as part of this insertion. Preemptively copy.
- key_buffer_.assign(entry->name());
+ key_buffer_.assign(entry->name().data(), entry->name().size());
*next_name = key_buffer_;
}
return true;
« no previous file with comments | « no previous file | net/spdy/hpack/hpack_encoder_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698