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

Unified Diff: webrtc/api/java/jni/surfacetexturehelper_jni.cc

Issue 1988043002: Call java SurfaceTextureHelper.dispose from the corresponding C++ destructor. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Indentation tweak. Created 4 years, 7 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
Index: webrtc/api/java/jni/surfacetexturehelper_jni.cc
diff --git a/webrtc/api/java/jni/surfacetexturehelper_jni.cc b/webrtc/api/java/jni/surfacetexturehelper_jni.cc
index 04623a791dcc10536241b7df9ac47f9b14d54546..0cc0d793f9b2bdebf6c00a10a89b1b51c51be02d 100644
--- a/webrtc/api/java/jni/surfacetexturehelper_jni.cc
+++ b/webrtc/api/java/jni/surfacetexturehelper_jni.cc
@@ -14,6 +14,7 @@
#include "webrtc/api/java/jni/classreferenceholder.h"
#include "webrtc/base/bind.h"
#include "webrtc/base/checks.h"
+#include "webrtc/base/logging.h"
namespace webrtc_jni {
@@ -48,6 +49,14 @@ SurfaceTextureHelper::SurfaceTextureHelper(JNIEnv* jni,
}
SurfaceTextureHelper::~SurfaceTextureHelper() {
+ LOG(LS_INFO) << "SurfaceTextureHelper dtor";
+ JNIEnv* jni = AttachCurrentThreadIfNeeded();
+ jni->CallVoidMethod(
+ *j_surface_texture_helper_,
+ GetMethodID(jni, FindClass(jni, "org/webrtc/SurfaceTextureHelper"),
+ "dispose", "()V"));
+
+ CHECK_EXCEPTION(jni) << "error during SurfaceTextureHelper.dispose()";
}
jobject SurfaceTextureHelper::GetJavaSurfaceTextureHelper() const {
« no previous file with comments | « webrtc/api/java/jni/surfacetexturehelper_jni.h ('k') | webrtc/api/java/src/org/webrtc/MediaCodecVideoDecoder.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698