Changeset 141528 in webkit


Ignore:
Timestamp:
Jan 31, 2013 7:52:13 PM (11 years ago)
Author:
rafael.lobo@openbossa.org
Message:

[Qt][WK2] Another attempt to fix build after recent WebKit2 changes
https://bugs.webkit.org/show_bug.cgi?id=108548

Reviewed by Anders Carlsson.

  • Platform/CoreIPC/unix/ConnectionUnix.cpp:

(CoreIPC::Connection::platformInvalidate):
(CoreIPC::Connection::processMessage): Change Deque to Vector and do similar
logic as on patch for https://bugs.webkit.org/show_bug.cgi?id=108517
(CoreIPC::Connection::open):
(CoreIPC::Connection::setShouldCloseConnectionOnProcessTermination):

  • Platform/qt/WorkQueueQt.cpp: Reflect changes on Qt WorkQueue to increase ref

count when the execution is started and decrease it when the work item is deleted,
following the logic on https://bugs.webkit.org/show_bug.cgi?id=108544
(WorkQueue::WorkItemQt::~WorkItemQt):
(WorkQueue::WorkItemQt::execute):
(WorkQueue::dispatch):
(WorkQueue::dispatchAfterDelay):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::getPluginPath): This function was moved from WebProcessProxy but
mac specific code was not protected properly: https://bugs.webkit.org/show_bug.cgi?id=108407

Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r141524 r141528  
     12013-01-31  Rafael Brandao  <rafael.lobo@openbossa.org>
     2
     3        [Qt][WK2] Another attempt to fix build after recent WebKit2 changes
     4        https://bugs.webkit.org/show_bug.cgi?id=108548
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * Platform/CoreIPC/unix/ConnectionUnix.cpp:
     9        (CoreIPC::Connection::platformInvalidate):
     10        (CoreIPC::Connection::processMessage): Change Deque to Vector and do similar
     11        logic as on patch for https://bugs.webkit.org/show_bug.cgi?id=108517
     12        (CoreIPC::Connection::open):
     13        (CoreIPC::Connection::setShouldCloseConnectionOnProcessTermination):
     14        * Platform/qt/WorkQueueQt.cpp: Reflect changes on Qt WorkQueue to increase ref
     15        count when the execution is started and decrease it when the work item is deleted,
     16        following the logic on https://bugs.webkit.org/show_bug.cgi?id=108544
     17        (WorkQueue::WorkItemQt::~WorkItemQt):
     18        (WorkQueue::WorkItemQt::execute):
     19        (WorkQueue::dispatch):
     20        (WorkQueue::dispatchAfterDelay):
     21        * UIProcess/WebPageProxy.cpp:
     22        (WebKit::WebPageProxy::getPluginPath): This function was moved from WebProcessProxy but
     23        mac specific code was not protected properly: https://bugs.webkit.org/show_bug.cgi?id=108407
     24
    1252013-01-31  Changhun Kang  <temoochin@company100.net>
    226
  • trunk/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp

    r141495 r141528  
    141141
    142142#if PLATFORM(GTK)
    143     m_connectionQueue.unregisterEventSourceHandler(m_socketDescriptor);
     143    m_connectionQueue->unregisterEventSourceHandler(m_socketDescriptor);
    144144#endif
    145145
     
    150150
    151151#if PLATFORM(EFL)
    152     m_connectionQueue.unregisterSocketEventHandler(m_socketDescriptor);
     152    m_connectionQueue->unregisterSocketEventHandler(m_socketDescriptor);
    153153#endif
    154154
     
    208208        return false;
    209209
    210     Deque<Attachment> attachments;
    211     AttachmentResourceGuard<Deque<Attachment>, Deque<Attachment>::iterator> attachementDisposer(attachments);
    212     RefPtr<WebKit::SharedMemory> oolMessageBody;
    213 
    214210    size_t attachmentFileDescriptorCount = 0;
    215211    size_t attachmentCount = messageInfo.attachmentCount();
     212    OwnArrayPtr<AttachmentInfo> attachmentInfo;
     213
    216214    if (attachmentCount) {
    217         OwnArrayPtr<AttachmentInfo> attachmentInfo = adoptArrayPtr(new AttachmentInfo[attachmentCount]);
     215        attachmentInfo = adoptArrayPtr(new AttachmentInfo[attachmentCount]);
    218216        memcpy(attachmentInfo.get(), messageData, sizeof(AttachmentInfo) * attachmentCount);
    219217        messageData += sizeof(AttachmentInfo) * attachmentCount;
     
    227225            case Attachment::Uninitialized:
    228226            default:
     227                ASSERT_NOT_REACHED();
    229228                break;
    230229            }
     
    233232        if (messageInfo.isMessageBodyIsOutOfLine())
    234233            attachmentCount--;
    235 
     234    }
     235
     236    Vector<Attachment> attachments(attachmentCount);
     237    AttachmentResourceGuard<Vector<Attachment>, Vector<Attachment>::iterator> attachementDisposer(attachments);
     238    RefPtr<WebKit::SharedMemory> oolMessageBody;
     239
     240    if (attachmentCount) {
    236241        size_t fdIndex = 0;
    237242        for (size_t i = 0; i < attachmentCount; ++i) {
     
    241246                if (!attachmentInfo[i].isNull())
    242247                    fd = m_fileDescriptors[fdIndex++];
    243                 attachments.append(Attachment(fd, attachmentInfo[i].getSize()));
     248                attachments[attachmentCount - i - 1] = Attachment(fd, attachmentInfo[i].getSize());
    244249                break;
    245250            case Attachment::SocketType:
    246251                if (!attachmentInfo[i].isNull())
    247252                    fd = m_fileDescriptors[fdIndex++];
    248                 attachments.append(Attachment(fd));
     253                attachments[attachmentCount - i - 1] = Attachment(fd);
    249254                break;
    250255            case Attachment::Uninitialized:
    251                 attachments.append(Attachment());
     256                attachments[attachmentCount - i - 1] = Attachment();
    252257            default:
    253258                break;
     
    419424    m_isConnected = true;
    420425#if PLATFORM(QT)
    421     m_socketNotifier = m_connectionQueue.registerSocketEventHandler(m_socketDescriptor, QSocketNotifier::Read, WTF::bind(&Connection::readyReadHandler, this));
     426    m_socketNotifier = m_connectionQueue->registerSocketEventHandler(m_socketDescriptor, QSocketNotifier::Read, WTF::bind(&Connection::readyReadHandler, this));
    422427#elif PLATFORM(GTK)
    423     m_connectionQueue.registerEventSourceHandler(m_socketDescriptor, (G_IO_HUP | G_IO_ERR), WTF::bind(&Connection::connectionDidClose, this));
    424     m_connectionQueue.registerEventSourceHandler(m_socketDescriptor, G_IO_IN, WTF::bind(&Connection::readyReadHandler, this));
     428    m_connectionQueue->registerEventSourceHandler(m_socketDescriptor, (G_IO_HUP | G_IO_ERR), WTF::bind(&Connection::connectionDidClose, this));
     429    m_connectionQueue->registerEventSourceHandler(m_socketDescriptor, G_IO_IN, WTF::bind(&Connection::readyReadHandler, this));
    425430#elif PLATFORM(EFL)
    426     m_connectionQueue.registerSocketEventHandler(m_socketDescriptor, WTF::bind(&Connection::readyReadHandler, this));
     431    m_connectionQueue->registerSocketEventHandler(m_socketDescriptor, WTF::bind(&Connection::readyReadHandler, this));
    427432#endif
    428433
    429434    // Schedule a call to readyReadHandler. Data may have arrived before installation of the signal
    430435    // handler.
    431     m_connectionQueue.dispatch(WTF::bind(&Connection::readyReadHandler, this));
     436    m_connectionQueue->dispatch(WTF::bind(&Connection::readyReadHandler, this));
    432437
    433438    return true;
     
    557562void Connection::setShouldCloseConnectionOnProcessTermination(WebKit::PlatformProcessIdentifier process)
    558563{
    559     m_connectionQueue.dispatchOnTermination(process, WTF::bind(&Connection::connectionDidClose, this));
     564    m_connectionQueue->dispatchOnTermination(process, WTF::bind(&Connection::connectionDidClose, this));
    560565}
    561566#endif
  • trunk/Source/WebKit2/Platform/qt/WorkQueueQt.cpp

    r137023 r141528  
    5656    ~WorkItemQt()
    5757    {
     58        m_queue->deref();
    5859    }
    5960
    6061    Q_SLOT void execute()
    6162    {
    62         if (m_queue->m_isValid)
    63             m_function();
     63        m_function();
    6464    }
    6565
     
    109109void WorkQueue::dispatch(const Function<void()>& function)
    110110{
     111    ref();
    111112    WorkQueue::WorkItemQt* itemQt = new WorkQueue::WorkItemQt(this, function);
    112113    itemQt->moveToThread(m_workThread);
     
    116117void WorkQueue::dispatchAfterDelay(const Function<void()>& function, double delayInSecond)
    117118{
     119    ref();
    118120    WorkQueue::WorkItemQt* itemQt = new WorkQueue::WorkItemQt(this, function);
    119121    itemQt->startTimer(static_cast<int>(delayInSecond * 1000));
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r141486 r141528  
    12371237        return;
    12381238
     1239#if PLATFORM(MAC)
    12391240    pluginLoadPolicy = m_uiClient.shouldInstantiatePlugin(this, plugin.bundleIdentifier, plugin.info.name) ? PluginModuleLoadNormally : PluginModuleBlocked;
    12401241    if (pluginLoadPolicy != PluginModuleLoadNormally)
    12411242        return;
     1243#endif
    12421244
    12431245    pluginPath = plugin.path;
Note: See TracChangeset for help on using the changeset viewer.