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

Unified Diff: content/renderer/media/peer_connection_tracker.cc

Issue 22979002: Remove unnecessary checks and fix shader_bench. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 4 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 | media/tools/shader_bench/shader_bench.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/peer_connection_tracker.cc
diff --git a/content/renderer/media/peer_connection_tracker.cc b/content/renderer/media/peer_connection_tracker.cc
index 44f44458aaca20f84784651ad15cc180a48815a6..597c64557048f1c9872c53b9d189f740fd03bd23 100644
--- a/content/renderer/media/peer_connection_tracker.cc
+++ b/content/renderer/media/peer_connection_tracker.cc
@@ -161,15 +161,9 @@ static base::DictionaryValue* GetDictValueStats(
return NULL;
DictionaryValue* dict = new base::DictionaryValue();
- if (!dict)
- return NULL;
dict->SetDouble("timestamp", report.timestamp);
base::ListValue* values = new base::ListValue();
- if (!values) {
- delete dict;
- return NULL;
- }
dict->Set("values", values);
for (size_t i = 0; i < report.values.size(); ++i) {
@@ -189,14 +183,10 @@ static base::DictionaryValue* GetDictValue(const webrtc::StatsReport& report) {
return NULL;
result.reset(new base::DictionaryValue());
- if (!result)
- return NULL;
-
// Note:
// The format must be consistent with what webrtc_internals.js expects.
// If you change it here, you must change webrtc_internals.js as well.
- if (stats)
- result->Set("stats", stats.release());
+ result->Set("stats", stats.release());
result->SetString("id", report.id);
result->SetString("type", report.type);
« no previous file with comments | « no previous file | media/tools/shader_bench/shader_bench.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698