diff options
author | Andrei Popescu <andreip@google.com> | 2009-08-03 13:16:56 +0100 |
---|---|---|
committer | Andrei Popescu <andreip@google.com> | 2009-08-03 16:04:26 +0100 |
commit | 917149bb7d8c49bb401a6e3740a1046168397bc4 (patch) | |
tree | 4bc6104959261a36b6f44a51f6f131a94a7bb945 /WebKit | |
parent | 51c0d4c6b1b74fff7336d81451ba7d2fc132e31c (diff) | |
download | external_webkit-917149bb7d8c49bb401a6e3740a1046168397bc4.zip external_webkit-917149bb7d8c49bb401a6e3740a1046168397bc4.tar.gz external_webkit-917149bb7d8c49bb401a6e3740a1046168397bc4.tar.bz2 |
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); |