Bug 902431 - Don't clean up references to global Android WebRTC objects. r=blassey, a=lsblakk
authorGian-Carlo Pascutto <gpascutto@mozilla.com>
Mon, 23 Sep 2013 14:41:41 +0200
changeset 155519 4baf5c9bfeeba82726a8bb839738dee5d69fb3cc
parent 155518 276c9c1c8e16adb51bd8e252f8ec2e263a940185
child 155520 30c00918c184e092d65fc9c3efa69d0e3cf0e912
push id4307
push userryanvm@gmail.com
push dateWed, 25 Sep 2013 20:28:33 +0000
treeherdermozilla-aurora@d2cf008c007e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey, lsblakk
bugs902431
milestone26.0a2
Bug 902431 - Don't clean up references to global Android WebRTC objects. r=blassey, a=lsblakk
media/webrtc/trunk/webrtc/modules/video_capture/android/video_capture_android.cc
--- a/media/webrtc/trunk/webrtc/modules/video_capture/android/video_capture_android.cc
+++ b/media/webrtc/trunk/webrtc/modules/video_capture/android/video_capture_android.cc
@@ -431,23 +431,18 @@ VideoCaptureAndroid::~VideoCaptureAndroi
       if (cid != NULL) {
         WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceVideoCapture, -1,
                      "%s: Call DeleteVideoCaptureAndroid", __FUNCTION__);
         // Close the camera by calling the static destruct function.
         env->CallStaticVoidMethod(g_javaCmClass, cid, _javaCaptureObj);
 
         // Delete global object ref to the camera.
         env->DeleteGlobalRef(_javaCaptureObj);
-        // Clean up the global class references
-        env->DeleteGlobalRef(g_javaCmClass);
-        env->DeleteGlobalRef(g_javaCmDevInfoClass);
 
         _javaCaptureObj = NULL;
-        VideoCaptureAndroid::g_javaCmClass = NULL;
-        VideoCaptureAndroid::g_javaCmDevInfoClass = NULL;
       }
       else {
         WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, -1,
                      "%s: Failed to find DeleteVideoCaptureAndroid id",
                      __FUNCTION__);
       }
     }