diff options
author | Patrick Scott <phanna@android.com> | 2009-07-28 15:24:16 -0400 |
---|---|---|
committer | Patrick Scott <phanna@android.com> | 2009-07-29 09:00:35 -0400 |
commit | 0deb5796f1ccc4ea91903fec3eda2c18ea5b3e37 (patch) | |
tree | 9574b757deeadd11f4dd2128f3a5247152fe5e04 /WebKit | |
parent | 8456b60241dce135dbda5b6114fd3650366f5a9c (diff) | |
download | external_webkit-0deb5796f1ccc4ea91903fec3eda2c18ea5b3e37.zip external_webkit-0deb5796f1ccc4ea91903fec3eda2c18ea5b3e37.tar.gz external_webkit-0deb5796f1ccc4ea91903fec3eda2c18ea5b3e37.tar.bz2 |
Remove the WebIconDatabase thread attachment since ThreadingPthreads does it.
Also, delete threadData if pthread_create fails. This is a rare occurance but we
don't want to leak memory just in case.
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/jni/WebIconDatabase.cpp | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/WebKit/android/jni/WebIconDatabase.cpp b/WebKit/android/jni/WebIconDatabase.cpp index c982c78..daf0334 100644 --- a/WebKit/android/jni/WebIconDatabase.cpp +++ b/WebKit/android/jni/WebIconDatabase.cpp @@ -71,28 +71,11 @@ void WebIconDatabase::dispatchDidAddIconForPageURL(const WebCore::String& pageUR if (mClients.size() == 0) return; - // Attempt to attach to the current vm. - JavaVM* vm = JSC::Bindings::getJavaVM(); - JavaVMAttachArgs args; - - args.version = JNI_VERSION_1_4; - args.name = "IconDatabase"; - args.group = NULL; - - JNIEnv* env; - bool threadIsAttached = true; - if (vm->AttachCurrentThread(&env, (void*) &args) != JNI_OK) { - LOGE("Could not attach IconDatabase thread to the VM"); - threadIsAttached = false; - } - mNotificationsMutex.lock(); mNotifications.append(pageURL); if (!mDeliveryRequested) { - if (threadIsAttached) { - mDeliveryRequested = true; - JavaSharedClient::EnqueueFunctionPtr(DeliverNotifications, this); - } + mDeliveryRequested = true; + JavaSharedClient::EnqueueFunctionPtr(DeliverNotifications, this); } mNotificationsMutex.unlock(); } |