diff options
author | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-16 18:35:10 +0000 |
---|---|---|
committer | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-16 18:35:10 +0000 |
commit | c410a2cb9f7120b5c1e6a83ff54b53b19cae79d3 (patch) | |
tree | ea2a3871c5bae617dd9ceb8e8418f84cd60e74bd /content/browser/geolocation/location_api_adapter_android.cc | |
parent | 784ba78a56c2e541bff04fdc54e8ea8a235c14f0 (diff) | |
download | chromium_src-c410a2cb9f7120b5c1e6a83ff54b53b19cae79d3.zip chromium_src-c410a2cb9f7120b5c1e6a83ff54b53b19cae79d3.tar.gz chromium_src-c410a2cb9f7120b5c1e6a83ff54b53b19cae79d3.tar.bz2 |
Android: lazy initialization for method id.
Rather than requiring early registration for all method id, we can initialize
them lazily as required.
This solves the problem of building against SDK X but running against X - 1.
Also adds a microbenchmark to ensure there are no considerable regressions.
Results are a bit variable, but it hovers over:
[ERROR:jni_android_unittest.cc(125)] JNI LazyMethodIDCall (us) 1983
[ERROR:jni_android_unittest.cc(127)] JNI MethodIDCall (us) 1862
BUG=152987
TEST=JNIAndroidMicrobenchmark.MethodId
TBR=akalin
Review URL: https://chromiumcodereview.appspot.com/11038015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162186 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/geolocation/location_api_adapter_android.cc')
-rw-r--r-- | content/browser/geolocation/location_api_adapter_android.cc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/content/browser/geolocation/location_api_adapter_android.cc b/content/browser/geolocation/location_api_adapter_android.cc index 6028a43..0e71a9f 100644 --- a/content/browser/geolocation/location_api_adapter_android.cc +++ b/content/browser/geolocation/location_api_adapter_android.cc @@ -14,7 +14,6 @@ using base::android::AttachCurrentThread; using base::android::CheckException; using base::android::ClearException; -using base::android::GetMethodID; static void NewLocationAvailable(JNIEnv* env, jclass, jdouble latitude, |