Changeset 93599 in webkit


Ignore:
Timestamp:
Aug 23, 2011 6:19:40 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] Add auxiliary ewk_util functions for DRT.
https://bugs.webkit.org/show_bug.cgi?id=66702

Patch by Raphael Kubo da Costa <kubo@profusion.mobi> on 2011-08-23
Reviewed by Kenneth Rohde Christiansen.

Add some auxiliary functions needed by EFL's DRT implementation. They
all revolve around talking to the garbage collector and counting the
worker threads.

  • ewk/ewk_private.h:
  • ewk/ewk_util.cpp:

(ewk_util_javascript_gc_collect):
(ewk_util_javascript_gc_alternate_thread_collect):
(ewk_util_javascript_gc_object_count_get):
(ewk_util_worker_thread_count):
(ewk_util_dpi_get):

Location:
trunk/Source/WebKit/efl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/efl/ChangeLog

    r93572 r93599  
     12011-08-23  Raphael Kubo da Costa  <kubo@profusion.mobi>
     2
     3        [EFL] Add auxiliary ewk_util functions for DRT.
     4        https://bugs.webkit.org/show_bug.cgi?id=66702
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Add some auxiliary functions needed by EFL's DRT implementation. They
     9        all revolve around talking to the garbage collector and counting the
     10        worker threads.
     11
     12        * ewk/ewk_private.h:
     13        * ewk/ewk_util.cpp:
     14        (ewk_util_javascript_gc_collect):
     15        (ewk_util_javascript_gc_alternate_thread_collect):
     16        (ewk_util_javascript_gc_object_count_get):
     17        (ewk_util_worker_thread_count):
     18        (ewk_util_dpi_get):
     19
    1202011-08-22  Raphael Kubo da Costa  <kubo@profusion.mobi>
    221
  • trunk/Source/WebKit/efl/ewk/ewk_private.h

    r93572 r93599  
    123123
    124124int ewk_util_dpi_get(void);
     125void ewk_util_javascript_gc_collect();
     126void ewk_util_javascript_gc_alternate_thread_collect(Eina_Bool waitUntilDone);
     127unsigned ewk_util_javascript_gc_object_count_get();
     128unsigned ewk_util_worker_thread_count();
    125129
    126130#if ENABLE(TOUCH_EVENTS)
  • trunk/Source/WebKit/efl/ewk/ewk_util.cpp

    r91972 r93599  
    2121#include "config.h"
    2222#include "ewk_util.h"
     23
     24#include "bindings/js/GCController.h"
     25#include "workers/WorkerThread.h"
    2326
    2427#include "ewk_private.h"
     
    111114/**
    112115 * @internal
     116 *
     117 * Performs garbage collection of JavaScript objects.
     118 */
     119void ewk_util_javascript_gc_collect()
     120{
     121    WebCore::gcController().garbageCollectNow();
     122}
     123
     124/**
     125 * @internal
     126 *
     127 * Performs garbage collection of JavaScript objects in a separate thread.
     128 *
     129 * @param waitUntilDone If @c TRUE, wait the garbage collection thread to finish; if @c FALSE,
     130 * return as soon as the thread has been created.
     131 */
     132void ewk_util_javascript_gc_alternate_thread_collect(Eina_Bool waitUntilDone)
     133{
     134    WebCore::gcController().garbageCollectOnAlternateThreadForDebugging(waitUntilDone);
     135}
     136
     137/**
     138 * @internal
     139 *
     140 * Returns the number of current JavaScript objects.
     141 */
     142unsigned ewk_util_javascript_gc_object_count_get()
     143{
     144    return WebCore::JSDOMWindow::commonJSGlobalData()->heap.objectCount();
     145}
     146
     147/**
     148 * @internal
     149 *
     150 * Returns the number of current worked threads.
     151 */
     152unsigned ewk_util_worker_thread_count()
     153{
     154#if ENABLE(WORKERS)
     155    return WebCore::WorkerThread::workerThreadCount();
     156#else
     157    return 0;
     158#endif
     159}
     160
     161/**
     162 * @internal
    113163 * Gets dpi value.
    114164 *
     
    123173#endif
    124174}
    125 
Note: See TracChangeset for help on using the changeset viewer.