2009-11-23 Steve Block <steveblock@google.com>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Nov 2009 22:55:22 +0000 (22:55 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Nov 2009 22:55:22 +0000 (22:55 +0000)
        Reviewed by Dmitry Titov.

        Adds MainThreadAndroid.cpp with Android-specific WTF threading functions.
        https://bugs.webkit.org/show_bug.cgi?id=31807

        * wtf/android: Added.
        * wtf/android/MainThreadAndroid.cpp: Added.
        (WTF::timeoutFired):
        (WTF::initializeMainThreadPlatform):
        (WTF::scheduleDispatchFunctionsOnMainThread):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51323 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/wtf/android/MainThreadAndroid.cpp [new file with mode: 0644]

index dd4493a11c3a9b58d3f76d80f7dfa92fcf4bc3e8..0188633d2c728754364cc02a17ebd695eeae4210 100644 (file)
@@ -1,3 +1,16 @@
+2009-11-23  Steve Block  <steveblock@google.com>
+
+        Reviewed by Dmitry Titov.
+
+        Adds MainThreadAndroid.cpp with Android-specific WTF threading functions.
+        https://bugs.webkit.org/show_bug.cgi?id=31807
+
+        * wtf/android: Added.
+        * wtf/android/MainThreadAndroid.cpp: Added.
+        (WTF::timeoutFired):
+        (WTF::initializeMainThreadPlatform):
+        (WTF::scheduleDispatchFunctionsOnMainThread):
+
 2009-11-23  Alexey Proskuryakov  <ap@apple.com>
 
         Reviewed by Brady Eidson.
diff --git a/JavaScriptCore/wtf/android/MainThreadAndroid.cpp b/JavaScriptCore/wtf/android/MainThreadAndroid.cpp
new file mode 100644 (file)
index 0000000..c28f953
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "MainThread.h"
+
+#include "JavaSharedClient.h"
+
+using namespace android;
+
+namespace WTF {
+
+// Callback in the main thread.
+static void timeoutFired(void*)
+{
+    dispatchFunctionsFromMainThread();
+}
+
+void initializeMainThreadPlatform()
+{
+}
+
+void scheduleDispatchFunctionsOnMainThread()
+{
+    JavaSharedClient::EnqueueFunctionPtr(timeoutFired, 0);
+}
+
+} // namespace WTF