Changeset 52503 in webkit


Ignore:
Timestamp:
Dec 22, 2009 2:33:31 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-22 Steve Block <steveblock@google.com>

Reviewed by David Levin.

Updates Android's scheduleDispatchFunctionsOnMainThread() to use new
AndroidThreading class, rather than using JavaSharedClient directly.
This fixes the current layering violation.
https://bugs.webkit.org/show_bug.cgi?id=32651

The pattern is copied from Chromium, which uses the ChromiumThreading
class. This patch also fixes the style in ChromiumThreading.h.

  • wtf/android/AndroidThreading.h: Added. Declares AndroidThreading.
  • wtf/android/MainThreadAndroid.cpp: Modified (WTF::scheduleDispatchFunctionsOnMainThread): Uses AndroidThreading.
  • wtf/chromium/ChromiumThreading.h: Modified. Fixes style.
Location:
trunk/JavaScriptCore
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r52500 r52503  
     12009-12-22  Steve Block  <steveblock@google.com>
     2
     3        Reviewed by David Levin.
     4
     5        Updates Android's scheduleDispatchFunctionsOnMainThread() to use new
     6        AndroidThreading class, rather than using JavaSharedClient directly.
     7        This fixes the current layering violation.
     8        https://bugs.webkit.org/show_bug.cgi?id=32651
     9
     10        The pattern is copied from Chromium, which uses the ChromiumThreading
     11        class. This patch also fixes the style in ChromiumThreading.h.
     12
     13        * wtf/android/AndroidThreading.h: Added. Declares AndroidThreading.
     14        * wtf/android/MainThreadAndroid.cpp: Modified
     15        (WTF::scheduleDispatchFunctionsOnMainThread): Uses AndroidThreading.
     16        * wtf/chromium/ChromiumThreading.h: Modified. Fixes style.
     17
    1182009-12-22  Gavin Barraclough  <barraclough@apple.com>
    219
  • trunk/JavaScriptCore/wtf/android/AndroidThreading.h

    r52502 r52503  
    2424 */
    2525
    26 #include "config.h"
    27 #include "MainThread.h"
    28 
    29 #include "JavaSharedClient.h"
    30 
    31 using namespace android;
     26#ifndef AndroidThreading_h
     27#define AndroidThreading_h
    3228
    3329namespace WTF {
    3430
    35 // Callback in the main thread.
    36 static void timeoutFired(void*)
    37 {
    38     dispatchFunctionsFromMainThread();
    39 }
    40 
    41 void initializeMainThreadPlatform()
    42 {
    43 }
    44 
    45 void scheduleDispatchFunctionsOnMainThread()
    46 {
    47     JavaSharedClient::EnqueueFunctionPtr(timeoutFired, 0);
    48 }
     31// An interface to the embedding layer, which provides threading support.
     32class AndroidThreading {
     33public:
     34    static void scheduleDispatchFunctionsOnMainThread();
     35};
    4936
    5037} // namespace WTF
     38
     39#endif // AndroidThreading_h
  • trunk/JavaScriptCore/wtf/android/MainThreadAndroid.cpp

    r51323 r52503  
    2727#include "MainThread.h"
    2828
    29 #include "JavaSharedClient.h"
    30 
    31 using namespace android;
     29#include "AndroidThreading.h"
    3230
    3331namespace WTF {
    34 
    35 // Callback in the main thread.
    36 static void timeoutFired(void*)
    37 {
    38     dispatchFunctionsFromMainThread();
    39 }
    4032
    4133void initializeMainThreadPlatform()
     
    4537void scheduleDispatchFunctionsOnMainThread()
    4638{
    47     JavaSharedClient::EnqueueFunctionPtr(timeoutFired, 0);
     39    AndroidThreading::scheduleDispatchFunctionsOnMainThread();
    4840}
    4941
  • trunk/JavaScriptCore/wtf/chromium/ChromiumThreading.h

    r40684 r52503  
    3434namespace WTF {
    3535
    36     // An interface to the embedding layer, which provides threading support.
    37     class ChromiumThreading {
    38     public:
    39         static void initializeMainThread();
    40         static void scheduleDispatchFunctionsOnMainThread();
    41     };
     36// An interface to the embedding layer, which provides threading support.
     37class ChromiumThreading {
     38public:
     39    static void initializeMainThread();
     40    static void scheduleDispatchFunctionsOnMainThread();
     41};
    4242
    4343} // namespace WTF
Note: See TracChangeset for help on using the changeset viewer.