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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 11038015: Android: lazy initialization for method id. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 2 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: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 244a10682922201000fd9f506b67de9153abda21..9120e66bc572d0ad44fb4debcd86d139ca1994f1 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -50,6 +50,7 @@ using base::android::ConvertUTF16ToJavaString;
using base::android::ConvertUTF8ToJavaString;
using base::android::GetClass;
using base::android::HasField;
+using base::android::MethodID;
using base::android::JavaByteArrayToByteVector;
using base::android::ScopedJavaGlobalRef;
using base::android::ScopedJavaLocalRef;
@@ -228,8 +229,8 @@ void ContentViewCoreImpl::Observe(int type,
void ContentViewCoreImpl::InitJNI(JNIEnv* env, jobject obj) {
java_object_ = new JavaObject;
java_object_->rect_clazz.Reset(GetClass(env, "android/graphics/Rect"));
- java_object_->rect_constructor =
- GetMethodID(env, java_object_->rect_clazz, "<init>", "(IIII)V");
+ java_object_->rect_constructor = MethodID::Get<MethodID::TYPE_INSTANCE>(
+ env, java_object_->rect_clazz.obj(), "<init>", "(IIII)V");
}
RenderWidgetHostViewAndroid*
« no previous file with comments | « chrome/browser/history/android/sqlite_cursor.cc ('k') | content/browser/android/download_controller_android_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698