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

Side by Side Diff: webrtc/sdk/android/src/jni/pc/peerconnection_jni.cc

Issue 3010433002: Android: Don't check ref count when releasing PeerConnectionInterface (Closed)
Patch Set: Rebase Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 jlong j_p = GetLongField(jni, j_pc, native_pc_id); 55 jlong j_p = GetLongField(jni, j_pc, native_pc_id);
56 return rtc::scoped_refptr<webrtc::PeerConnectionInterface>( 56 return rtc::scoped_refptr<webrtc::PeerConnectionInterface>(
57 reinterpret_cast<webrtc::PeerConnectionInterface*>(j_p)); 57 reinterpret_cast<webrtc::PeerConnectionInterface*>(j_p));
58 } 58 }
59 59
60 JNI_FUNCTION_DECLARATION(void, 60 JNI_FUNCTION_DECLARATION(void,
61 PeerConnection_freePeerConnection, 61 PeerConnection_freePeerConnection,
62 JNIEnv*, 62 JNIEnv*,
63 jclass, 63 jclass,
64 jlong j_p) { 64 jlong j_p) {
65 CHECK_RELEASE(reinterpret_cast<webrtc::PeerConnectionInterface*>(j_p)); 65 reinterpret_cast<webrtc::PeerConnectionInterface*>(j_p)->Release();
66 } 66 }
67 67
68 JNI_FUNCTION_DECLARATION(void, 68 JNI_FUNCTION_DECLARATION(void,
69 PeerConnection_freeObserver, 69 PeerConnection_freeObserver,
70 JNIEnv*, 70 JNIEnv*,
71 jclass, 71 jclass,
72 jlong j_p) { 72 jlong j_p) {
73 PeerConnectionObserverJni* p = 73 PeerConnectionObserverJni* p =
74 reinterpret_cast<PeerConnectionObserverJni*>(j_p); 74 reinterpret_cast<PeerConnectionObserverJni*>(j_p);
75 delete p; 75 delete p;
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 425
426 JNI_FUNCTION_DECLARATION(void, 426 JNI_FUNCTION_DECLARATION(void,
427 PeerConnection_close, 427 PeerConnection_close,
428 JNIEnv* jni, 428 JNIEnv* jni,
429 jobject j_pc) { 429 jobject j_pc) {
430 ExtractNativePC(jni, j_pc)->Close(); 430 ExtractNativePC(jni, j_pc)->Close();
431 return; 431 return;
432 } 432 }
433 433
434 } // namespace webrtc_jni 434 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698