Ignore:
Timestamp:
Mar 16, 2014, 12:47:00 PM (11 years ago)
Author:
[email protected]
Message:

Move GTK WebKit2 code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=129672

Reviewed by Anders Carlsson.

Repace uses of OwnPtr and PassOwnPtr in GTK-specific WebKit2 code with std::unique_ptr.

  • Shared/Downloads/Download.h:
  • Shared/Downloads/soup/DownloadSoup.cpp:

(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::platformInvalidate):

  • UIProcess/API/gtk/PageClientImpl.cpp:
  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/gtk/WebKitContextMenuItem.cpp:

(webkitContextMenuItemCreate):
(webkitContextMenuItemCreateForGtkItem):
(webkit_context_menu_item_new):
(webkit_context_menu_item_new_from_stock_action):
(webkit_context_menu_item_new_from_stock_action_with_label):
(webkit_context_menu_item_new_with_submenu):
(webkit_context_menu_item_new_separator):

  • UIProcess/API/gtk/WebKitTextChecker.h:
  • UIProcess/API/gtk/WebKitWebContext.cpp:

(createDefaultWebContext):

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseConstructed):

  • WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:

(WebKit::WebPrintOperationGtk::print):

  • WebProcess/gtk/WebGtkExtensionManager.cpp:

(WebKit::WebGtkExtensionManager::initialize):

  • WebProcess/soup/WebKitSoupRequestInputStream.cpp:

(webkitSoupRequestInputStreamPendingReadAsyncComplete):
(webkitSoupRequestInputStreamReadAsync):

  • WebProcess/soup/WebSoupRequestManager.cpp:

(WebKit::WebSoupRequestManager::send):

  • WebProcess/soup/WebSoupRequestManager.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestInputStream.cpp

    r129096 r165707  
    2121#include "WebKitSoupRequestInputStream.h"
    2222
    23 #include <wtf/OwnPtr.h>
    24 #include <wtf/PassOwnPtr.h>
    2523#include <wtf/Threading.h>
    2624#include <wtf/gobject/GRefPtr.h>
     
    4745
    4846    Mutex readLock;
    49     OwnPtr<AsyncReadData> pendingAsyncRead;
     47    std::unique_ptr<AsyncReadData> pendingAsyncRead;
    5048};
    5149
     
    7169    AsyncReadData* data = stream->priv->pendingAsyncRead.get();
    7270    webkitSoupRequestInputStreamReadAsyncResultComplete(stream, data->result.get(), data->buffer, data->count, data->cancellable.get());
    73     stream->priv->pendingAsyncRead.clear();
     71    stream->priv->pendingAsyncRead = nullptr;
    7472}
    7573
     
    102100    }
    103101
    104     stream->priv->pendingAsyncRead = adoptPtr(new AsyncReadData(result.get(), buffer, count, cancellable));
     102    stream->priv->pendingAsyncRead = std::make_unique<AsyncReadData>(result.get(), buffer, count, cancellable);
    105103}
    106104
Note: See TracChangeset for help on using the changeset viewer.