Bug 902431 - Don't clean up references to global Android WebRTC objects. r=blassey
authorGian-Carlo Pascutto <gpascutto@mozilla.com>
Mon, 23 Sep 2013 14:41:41 +0200
changeset 148278 a6f9e5a3c069565967daa209811f1c762e2aa190
parent 148277 92b58c9e331d69dd7b65501c7cd0f5075d805129
child 148279 92ae873dea3a817390efb321f7ebf9b32eeb18e3
push id34169
push usergpascutto@mozilla.com
push dateMon, 23 Sep 2013 12:41:56 +0000
treeherdermozilla-inbound@a6f9e5a3c069 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs902431
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 902431 - Don't clean up references to global Android WebRTC objects. r=blassey
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__);
       }
     }