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

Unified Diff: talk/app/webrtc/jsepsessiondescription.cc

Issue 1241973002: Use std::string references instead of copying contents. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix use-after-free Created 5 years, 5 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 | talk/app/webrtc/webrtcsdp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/jsepsessiondescription.cc
diff --git a/talk/app/webrtc/jsepsessiondescription.cc b/talk/app/webrtc/jsepsessiondescription.cc
index 697f332c27c64274951ba4255273c97568dcf09b..d1428d000cc060f05173eef3651866428a653171 100644
--- a/talk/app/webrtc/jsepsessiondescription.cc
+++ b/talk/app/webrtc/jsepsessiondescription.cc
@@ -130,7 +130,7 @@ bool JsepSessionDescription::AddCandidate(
}
if (mediasection_index >= number_of_mediasections())
return false;
- const std::string content_name =
+ const std::string& content_name =
description_->contents()[mediasection_index].name;
const cricket::TransportInfo* transport_info =
description_->GetTransportInfoByName(content_name);
« no previous file with comments | « no previous file | talk/app/webrtc/webrtcsdp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698