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

Unified Diff: android_webview/native/input_stream_impl.cc

Issue 11748032: [Android WebView] Remove unnecessary DCHECK in InputStreamImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5272ee54c1852bede7ba500fe7a240b2903d300a..515cb51cedeea4b0eca25ec97804ed89863b1300 100644
--- a/android_webview/native/input_stream_impl.cc
+++ b/android_webview/native/input_stream_impl.cc
@@ -37,6 +37,9 @@ const InputStreamImpl* InputStreamImpl::FromInputStream(
return static_cast<const InputStreamImpl*>(input_stream);
}
+// TODO: Use unsafe version for all Java_InputStream methods in this file
+// once BUG 157880 is fixed and implement graceful exception handling.
+
InputStreamImpl::InputStreamImpl() {
}
@@ -48,13 +51,10 @@ InputStreamImpl::InputStreamImpl(const JavaRef<jobject>& stream)
InputStreamImpl::~InputStreamImpl() {
JNIEnv* env = AttachCurrentThread();
Java_InputStream_close(env, jobject_.obj());
- DCHECK(!ClearException(env));
}
bool InputStreamImpl::BytesAvailable(int* bytes_available) const {
JNIEnv* env = AttachCurrentThread();
- // TODO: Use unsafe version for all Java_InputStream methods in this file
- // once BUG 157880 is fixed.
int bytes = Java_InputStream_available(env, jobject_.obj());
if (ClearException(env))
return false;
« 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