diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-04 10:03:50 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-04 10:03:50 -0700 |
commit | e65a5905dd4459ab5e4ef22d6dcb85e1d1a0b7cb (patch) | |
tree | 44a83aa1aa7ac698d0403cbbc770ac1f68c78d54 /WebKit | |
parent | 8115505671ec0c195c7f1a965f37b079053bc0b6 (diff) | |
parent | 917149bb7d8c49bb401a6e3740a1046168397bc4 (diff) | |
download | external_webkit-e65a5905dd4459ab5e4ef22d6dcb85e1d1a0b7cb.zip external_webkit-e65a5905dd4459ab5e4ef22d6dcb85e1d1a0b7cb.tar.gz external_webkit-e65a5905dd4459ab5e4ef22d6dcb85e1d1a0b7cb.tar.bz2 |
Merge change 9470
* changes:
Enable workers for V8
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/jni/WebSettings.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/WebKit/android/jni/WebSettings.cpp b/WebKit/android/jni/WebSettings.cpp index 73ebf63..b6728fa 100644 --- a/WebKit/android/jni/WebSettings.cpp +++ b/WebKit/android/jni/WebSettings.cpp @@ -40,6 +40,9 @@ #include "Settings.h" #include "WebCoreFrameBridge.h" #include "WebCoreJni.h" +#if USE(V8) +#include "WorkerContextExecutionProxy.h" +#endif #include <JNIHelp.h> #include <utils/misc.h> @@ -94,6 +97,9 @@ struct FieldIds { mAppCachePath = env->GetFieldID(clazz, "mAppCachePath", "Ljava/lang/String;"); mAppCacheMaxSize = env->GetFieldID(clazz, "mAppCacheMaxSize", "J"); #endif +#if ENABLE(WORKERS) + mWorkersEnabled = env->GetFieldID(clazz, "mWorkersEnabled", "Z"); +#endif mJavaScriptCanOpenWindowsAutomatically = env->GetFieldID(clazz, "mJavaScriptCanOpenWindowsAutomatically", "Z"); mUseWideViewport = env->GetFieldID(clazz, "mUseWideViewport", "Z"); @@ -126,6 +132,9 @@ struct FieldIds { LOG_ASSERT(mAppCachePath, "Could not find field mAppCachePath"); LOG_ASSERT(mAppCacheMaxSize, "Could not find field mAppCacheMaxSize"); #endif +#if ENABLE(WORKERS) + LOG_ASSERT(mWorkersEnabled, "Could not find field mWorkersEnabled"); +#endif LOG_ASSERT(mJavaScriptCanOpenWindowsAutomatically, "Could not find field mJavaScriptCanOpenWindowsAutomatically"); LOG_ASSERT(mUseWideViewport, "Could not find field mUseWideViewport"); @@ -168,6 +177,9 @@ struct FieldIds { jfieldID mAppCachePath; jfieldID mAppCacheMaxSize; #endif +#if ENABLE(WORKERS) + jfieldID mWorkersEnabled; +#endif jfieldID mJavaScriptCanOpenWindowsAutomatically; jfieldID mUseWideViewport; jfieldID mSupportMultipleWindows; @@ -305,6 +317,16 @@ public: jlong maxsize = env->GetIntField(obj, gFieldIds->mAppCacheMaxSize); WebCore::cacheStorage().setMaximumSize(maxsize); #endif + +#if ENABLE(WORKERS) +#if USE(V8) + // This flag is only needed if we use V8. JSC doesn't yet have + // a setting for enabling workers. + flag = env->GetBooleanField(obj, gFieldIds->mWorkersEnabled); + WebCore::WorkerContextExecutionProxy::setIsWebWorkersEnabled(flag); +#endif +#endif + flag = env->GetBooleanField(obj, gFieldIds->mJavaScriptCanOpenWindowsAutomatically); s->setJavaScriptCanOpenWindowsAutomatically(flag); |