Changeset 84886 in webkit


Ignore:
Timestamp:
Apr 25, 2011 11:46:38 PM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-04-25 Adam Barth <abarth@webkit.org>

Reviewed by David Levin.

WebKit2 should play nice with strict OwnPtrs
https://bugs.webkit.org/show_bug.cgi?id=59426

Fix include ordering.

  • WebView/WebDeviceOrientationProviderMock.mm:

2011-04-25 Adam Barth <abarth@webkit.org>

Reviewed by David Levin.

WebKit2 should play nice with strict OwnPtrs
https://bugs.webkit.org/show_bug.cgi?id=59426

  • Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::waitForMessage):
    • Lack of OwnPtr in HashMap is sad face. This code becomes very pretty if we could use OwnPtr in HashMap...
  • Platform/RunLoop.cpp: (RunLoop::performWork): (RunLoop::scheduleWork):
  • Platform/RunLoop.h:
  • Platform/mac/WorkQueueMac.cpp: (WorkQueue::executeWorkItem):
  • WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: (WebKit::NetscapePluginStream::deliverData):
Location:
trunk/Source
Files:
8 edited

Legend:

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

    r84883 r84886  
     12011-04-25  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by David Levin.
     4
     5        WebKit2 should play nice with strict OwnPtrs
     6        https://bugs.webkit.org/show_bug.cgi?id=59426
     7
     8        Fix include ordering.
     9
     10        * WebView/WebDeviceOrientationProviderMock.mm:
     11
    1122011-04-25  Adam Barth  <abarth@webkit.org>
    213
  • trunk/Source/WebKit/mac/WebView/WebDeviceOrientationProviderMock.mm

    r84883 r84886  
    2626#import "WebDeviceOrientationProviderMockInternal.h"
    2727
     28#import "WebDeviceOrientationInternal.h"
    2829#import <wtf/PassOwnPtr.h>
    29 #import "WebDeviceOrientationInternal.h"
    3030
    3131using namespace WebCore;
  • trunk/Source/WebKit2/ChangeLog

    r84841 r84886  
     12011-04-25  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by David Levin.
     4
     5        WebKit2 should play nice with strict OwnPtrs
     6        https://bugs.webkit.org/show_bug.cgi?id=59426
     7
     8        * Platform/CoreIPC/Connection.cpp:
     9        (CoreIPC::Connection::waitForMessage):
     10            - Lack of OwnPtr in HashMap is sad face.  This code becomes very
     11              pretty if we could use OwnPtr in HashMap...
     12        * Platform/RunLoop.cpp:
     13        (RunLoop::performWork):
     14        (RunLoop::scheduleWork):
     15        * Platform/RunLoop.h:
     16        * Platform/mac/WorkQueueMac.cpp:
     17        (WorkQueue::executeWorkItem):
     18        * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
     19        (WebKit::NetscapePluginStream::deliverData):
     20
    1212011-04-25  Brian Weinstein  <bweinstein@apple.com>
    222
  • trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp

    r84293 r84886  
    312312
    313313        for (size_t i = 0; i < m_incomingMessages.size(); ++i) {
    314             const IncomingMessage& message = m_incomingMessages[i];
     314            IncomingMessage& message = m_incomingMessages[i];
    315315
    316316            if (message.messageID() == messageID && message.arguments()->destinationID() == destinationID) {
    317                 OwnPtr<ArgumentDecoder> arguments(message.arguments());
    318                
     317                OwnPtr<ArgumentDecoder> arguments = message.releaseArguments();
     318
    319319                // Erase the incoming message.
    320320                m_incomingMessages.remove(i);
     
    344344        HashMap<std::pair<unsigned, uint64_t>, ArgumentDecoder*>::iterator it = m_waitForMessageMap.find(messageAndDestination);
    345345        if (it->second) {
    346             OwnPtr<ArgumentDecoder> arguments(it->second);
     346            // FIXME: m_waitForMessageMap should really hold OwnPtrs to
     347            // ArgumentDecoders, but HashMap doesn't currently support OwnPtrs.
     348            OwnPtr<ArgumentDecoder> arguments = adoptPtr(it->second);
    347349            m_waitForMessageMap.remove(it);
    348350           
  • trunk/Source/WebKit2/Platform/RunLoop.cpp

    r76916 r84886  
    5353void RunLoop::performWork()
    5454{
    55     Vector<WorkItem*> workItemQueue;
     55    Vector<OwnPtr<WorkItem> > workItemQueue;
    5656    {
    5757        MutexLocker locker(m_workItemQueueLock);
     
    6060
    6161    for (size_t i = 0; i < workItemQueue.size(); ++i) {
    62         OwnPtr<WorkItem> item(workItemQueue[i]);
     62        OwnPtr<WorkItem> item = workItemQueue[i].release();
    6363        item->execute();
    6464    }
     
    6868{
    6969    MutexLocker locker(m_workItemQueueLock);
    70     m_workItemQueue.append(item.leakPtr());
     70    m_workItemQueue.append(item);
    7171
    7272    wakeUp();
  • trunk/Source/WebKit2/Platform/RunLoop.h

    r83498 r84886  
    138138
    139139    Mutex m_workItemQueueLock;
    140     Vector<WorkItem*> m_workItemQueue;
     140    Vector<OwnPtr<WorkItem> > m_workItemQueue;
    141141
    142142#if PLATFORM(WIN)
  • trunk/Source/WebKit2/Platform/mac/WorkQueueMac.cpp

    r76916 r84886  
    3535{
    3636    WorkQueue* queue = static_cast<WorkQueue*>(dispatch_get_context(dispatch_get_current_queue()));
    37     OwnPtr<WorkItem> workItem(static_cast<WorkItem*>(item));
     37    OwnPtr<WorkItem> workItem = adoptPtr(static_cast<WorkItem*>(item));
    3838   
    3939    {
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp

    r84095 r84886  
    184184    if (m_transferMode != NP_ASFILEONLY) {
    185185        if (!m_deliveryData)
    186             m_deliveryData.set(new Vector<uint8_t>);
     186            m_deliveryData = adoptPtr(new Vector<uint8_t>);
    187187
    188188        m_deliveryData->reserveCapacity(m_deliveryData->size() + length);
Note: See TracChangeset for help on using the changeset viewer.