Changeset 141580 in webkit


Ignore:
Timestamp:
Feb 1, 2013 4:54:33 AM (11 years ago)
Author:
Simon Hausmann
Message:

[Gtk][WK2] Fix build after recent WebKit2 changes
https://bugs.webkit.org/show_bug.cgi?id=108588

Patch by Seulgi Kim <seulgikim@company100.net> on 2013-02-01
Reviewed by Andreas Kling.

Don't remove WorkQueue during execution.
Following the logic on https://bugs.webkit.org/show_bug.cgi?id=108544

  • Platform/gtk/WorkQueueGtk.cpp:

(WorkQueue::EventSource::~EventSource):
(WorkQueue::EventSource::executeEventSource):
(WorkQueue::dispatch):
(WorkQueue::dispatchAfterDelay):
(WorkQueue::dispatchOnTermination):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r141578 r141580  
     12013-02-01  Seulgi Kim  <seulgikim@company100.net>
     2
     3        [Gtk][WK2] Fix build after recent WebKit2 changes
     4        https://bugs.webkit.org/show_bug.cgi?id=108588
     5
     6        Reviewed by Andreas Kling.
     7
     8        Don't remove WorkQueue during execution.
     9        Following the logic on https://bugs.webkit.org/show_bug.cgi?id=108544
     10
     11        * Platform/gtk/WorkQueueGtk.cpp:
     12        (WorkQueue::EventSource::~EventSource):
     13        (WorkQueue::EventSource::executeEventSource):
     14        (WorkQueue::dispatch):
     15        (WorkQueue::dispatchAfterDelay):
     16        (WorkQueue::dispatchOnTermination):
     17
    1182013-02-01  Alexis Menard  <alexis@webkit.org>
    219
  • trunk/Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp

    r130612 r141580  
    4343    {
    4444    }
     45    ~EventSource()
     46    {
     47        m_workQueue->deref();
     48    }
    4549
    4650    void cancel()
     
    5458    {
    5559        ASSERT(eventSource);
    56         WorkQueue* queue = eventSource->m_workQueue;
    57         {
    58             MutexLocker locker(queue->m_isValidMutex);
    59             if (!queue->m_isValid)
    60                 return;
    61         }
    62 
    6360        eventSource->m_function();
    6461    }
     
    207204void WorkQueue::dispatch(const Function<void()>& function)
    208205{
     206    ref();
    209207    GRefPtr<GSource> dispatchSource = adoptGRef(g_idle_source_new());
    210208    ASSERT(dispatchSource);
     
    216214void WorkQueue::dispatchAfterDelay(const Function<void()>& function, double delay)
    217215{
     216    ref();
    218217    GRefPtr<GSource> dispatchSource = adoptGRef(g_timeout_source_new(static_cast<guint>(delay * 1000)));
    219218    ASSERT(dispatchSource);
     
    224223void WorkQueue::dispatchOnTermination(WebKit::PlatformProcessIdentifier process, const Function<void()>& function)
    225224{
     225    ref();
    226226    GRefPtr<GSource> dispatchSource = adoptGRef(g_child_watch_source_new(process));
    227227    ASSERT(dispatchSource);
Note: See TracChangeset for help on using the changeset viewer.