Chromium Code Reviews| Index: android_webview/native/input_stream_impl.cc |
| diff --git a/android_webview/native/input_stream_impl.cc b/android_webview/native/input_stream_impl.cc |
| index 5838650e43b5a74c2b51d8e2cb099317f206b934..5272ee54c1852bede7ba500fe7a240b2903d300a 100644 |
| --- a/android_webview/native/input_stream_impl.cc |
| +++ b/android_webview/native/input_stream_impl.cc |
| @@ -18,6 +18,7 @@ using base::android::AttachCurrentThread; |
| using base::android::ClearException; |
| using base::android::JavaRef; |
| using JNI_InputStream::Java_InputStream_available; |
| +using JNI_InputStream::Java_InputStream_close; |
| using JNI_InputStream::Java_InputStream_skip; |
| using JNI_InputStream::Java_InputStream_readI_AB_I_I; |
| @@ -45,6 +46,9 @@ InputStreamImpl::InputStreamImpl(const JavaRef<jobject>& stream) |
| } |
| InputStreamImpl::~InputStreamImpl() { |
| + JNIEnv* env = AttachCurrentThread(); |
| + Java_InputStream_close(env, jobject_.obj()); |
| + DCHECK(!ClearException(env)); |
|
joth
2013/01/03 19:18:18
the ClearException will be removed in release buil
mkosiba (inactive)
2013/01/04 12:31:11
uh, actually due to the way the JNI methods are au
benm (inactive)
2013/01/04 12:55:11
I see. So right now in the exception case we'll ne
mkosiba (inactive)
2013/01/04 14:41:01
When the bug is fixed we'll have an unsafe version
benm (inactive)
2013/01/04 16:59:40
Gotcha. Follow up in https://codereview.chromium.o
|
| } |
| bool InputStreamImpl::BytesAvailable(int* bytes_available) const { |