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

Unified Diff: android_webview/native/input_stream_impl.cc

Issue 2237943002: Remove now-unnecessary .obj() in Java method calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@switch-context
Patch Set: Rebase *again* :( Created 4 years, 4 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: 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 0adbaabb225f401c1e8f34ba65b7c695497f21a9..efcf31184790dac9ce4333e04d5426b62a0f70a3 100644
--- a/android_webview/native/input_stream_impl.cc
+++ b/android_webview/native/input_stream_impl.cc
@@ -49,12 +49,12 @@ InputStreamImpl::InputStreamImpl(const JavaRef<jobject>& stream)
InputStreamImpl::~InputStreamImpl() {
JNIEnv* env = AttachCurrentThread();
- Java_InputStreamUtil_close(env, jobject_.obj());
+ Java_InputStreamUtil_close(env, jobject_);
}
bool InputStreamImpl::BytesAvailable(int* bytes_available) const {
JNIEnv* env = AttachCurrentThread();
- int bytes = Java_InputStreamUtil_available(env, jobject_.obj());
+ int bytes = Java_InputStreamUtil_available(env, jobject_);
if (bytes == kExceptionThrownStatusCode)
return false;
*bytes_available = bytes;
@@ -63,7 +63,7 @@ bool InputStreamImpl::BytesAvailable(int* bytes_available) const {
bool InputStreamImpl::Skip(int64_t n, int64_t* bytes_skipped) {
JNIEnv* env = AttachCurrentThread();
- int bytes = Java_InputStreamUtil_skip(env, jobject_.obj(), n);
+ int bytes = Java_InputStreamUtil_skip(env, jobject_, n);
if (bytes < 0)
return false;
if (bytes > n)
@@ -91,7 +91,7 @@ bool InputStreamImpl::Read(net::IOBuffer* dest, int length, int* bytes_read) {
while (remaining_length > 0) {
const int max_transfer_length = std::min(remaining_length, kBufferSize);
const int transfer_length = Java_InputStreamUtil_read(
- env, jobject_.obj(), buffer, 0, max_transfer_length);
+ env, jobject_, buffer, 0, max_transfer_length);
if (transfer_length == kExceptionThrownStatusCode)
return false;
« no previous file with comments | « android_webview/native/cookie_manager.cc ('k') | android_webview/native/java_browser_view_renderer_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698