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

Unified Diff: webrtc/api/android/jni/androidmetrics_jni.cc

Issue 2337883003: Remove name parameter from HistogramAdd function. (Closed)
Patch Set: Add check to Android Metrics. Created 4 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 | webrtc/system_wrappers/include/metrics.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/android/jni/androidmetrics_jni.cc
diff --git a/webrtc/api/android/jni/androidmetrics_jni.cc b/webrtc/api/android/jni/androidmetrics_jni.cc
index 833066a66f915ca06da2027dfddb79c8113fc613..68b0b73bbef85db9a07bb2709bf85c1530a8e5ff 100644
--- a/webrtc/api/android/jni/androidmetrics_jni.cc
+++ b/webrtc/api/android/jni/androidmetrics_jni.cc
@@ -68,8 +68,10 @@ JOW(jlong, Metrics_00024Histogram_nativeCreateCounts)
JOW(void, Metrics_00024Histogram_nativeAddSample)
(JNIEnv* jni, jclass, jlong histogram, jint sample) {
- HistogramAdd(reinterpret_cast<webrtc::metrics::Histogram*>(histogram),
- sample);
+ if (histogram) {
tommi 2016/09/15 17:16:48 Would it be a programmer error if histogram is 0?
sakal 2016/09/15 19:31:03 No, this can happen in other cases as well. Histog
+ HistogramAdd(reinterpret_cast<webrtc::metrics::Histogram*>(histogram),
+ sample);
+ }
}
} // namespace webrtc_jni
« no previous file with comments | « no previous file | webrtc/system_wrappers/include/metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698