diff options
Diffstat (limited to 'JavaScriptCore')
| -rw-r--r-- | JavaScriptCore/wtf/Platform.h | 2 | ||||
| -rw-r--r-- | JavaScriptCore/wtf/ThreadingPthreads.cpp | 2 | ||||
| -rw-r--r-- | JavaScriptCore/wtf/android/AndroidThreading.h | 39 | ||||
| -rw-r--r-- | JavaScriptCore/wtf/android/MainThreadAndroid.cpp | 12 |
4 files changed, 43 insertions, 12 deletions
diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h index 18e2b5c..960b253 100644 --- a/JavaScriptCore/wtf/Platform.h +++ b/JavaScriptCore/wtf/Platform.h @@ -538,7 +538,7 @@ #if PLATFORM(ANDROID) #define WTF_USE_PTHREADS 1 -#define WTF_PLATFORM_SGL 1 +#define WTF_PLATFORM_SKIA 1 #define USE_SYSTEM_MALLOC 1 #define ENABLE_MAC_JAVA_BRIDGE 1 #define LOG_DISABLED 1 diff --git a/JavaScriptCore/wtf/ThreadingPthreads.cpp b/JavaScriptCore/wtf/ThreadingPthreads.cpp index fe7b26a..f5cba5d 100644 --- a/JavaScriptCore/wtf/ThreadingPthreads.cpp +++ b/JavaScriptCore/wtf/ThreadingPthreads.cpp @@ -46,7 +46,7 @@ #endif #if PLATFORM(ANDROID) -#include "jni_utility.h" +#include "JNIUtility.h" #endif namespace WTF { diff --git a/JavaScriptCore/wtf/android/AndroidThreading.h b/JavaScriptCore/wtf/android/AndroidThreading.h new file mode 100644 index 0000000..27f548c --- /dev/null +++ b/JavaScriptCore/wtf/android/AndroidThreading.h @@ -0,0 +1,39 @@ +/* + * Copyright 2009, The Android Open Source Project + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef AndroidThreading_h +#define AndroidThreading_h + +namespace WTF { + +// An interface to the embedding layer, which provides threading support. +class AndroidThreading { +public: + static void scheduleDispatchFunctionsOnMainThread(); +}; + +} // namespace WTF + +#endif // AndroidThreading_h diff --git a/JavaScriptCore/wtf/android/MainThreadAndroid.cpp b/JavaScriptCore/wtf/android/MainThreadAndroid.cpp index c28f953..5e5f7b1 100644 --- a/JavaScriptCore/wtf/android/MainThreadAndroid.cpp +++ b/JavaScriptCore/wtf/android/MainThreadAndroid.cpp @@ -26,25 +26,17 @@ #include "config.h" #include "MainThread.h" -#include "JavaSharedClient.h" - -using namespace android; +#include "AndroidThreading.h" namespace WTF { -// Callback in the main thread. -static void timeoutFired(void*) -{ - dispatchFunctionsFromMainThread(); -} - void initializeMainThreadPlatform() { } void scheduleDispatchFunctionsOnMainThread() { - JavaSharedClient::EnqueueFunctionPtr(timeoutFired, 0); + AndroidThreading::scheduleDispatchFunctionsOnMainThread(); } } // namespace WTF |
