Changeset 156968 in webkit


Ignore:
Timestamp:
Oct 5, 2013 11:59:00 AM (10 years ago)
Author:
andersca@apple.com
Message:

Remove createOwned
https://bugs.webkit.org/show_bug.cgi?id=122388

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • profiler/ProfilerDatabase.cpp:

(JSC::Profiler::Database::save):

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::createRenderTree):
(WebCore::Document::destroyRenderTree):

  • dom/Document.h:
  • page/Frame.cpp:

(WebCore::Frame::Frame):

  • page/Frame.h:
  • page/animation/AnimationController.cpp:

(WebCore::AnimationController::AnimationController):

  • page/animation/AnimationController.h:
  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
  • platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:

(WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC):
(WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack):

  • platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:

(WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC):
(WebCore::VideoTrackPrivateAVFObjC::setPlayerItemTrack):

  • platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::applyClippingToContext):

  • rendering/svg/RenderSVGResourceClipper.h:
  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):

  • rendering/svg/RenderSVGResourceFilter.h:
  • rendering/svg/RenderSVGResourceMasker.cpp:

(WebCore::RenderSVGResourceMasker::applyResource):

  • rendering/svg/RenderSVGResourceMasker.h:

Source/WebKit2:

  • UIProcess/API/mac/WKView.mm:

(-[WKView _setFindIndicator:fadeOut:animate:]):

  • WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:

(WKBundlePageOverlayCreate):

Source/WTF:

Since we're going with std::unique_ptr instead of OwnPtr, there's no need for makeOwned to exist.
Get rid of it and replace it with calls to std::make_unique.

  • wtf/FilePrintStream.cpp:

(WTF::FilePrintStream::open):

  • wtf/FilePrintStream.h:
  • wtf/HashTable.h:

(WTF::::HashTable):

  • wtf/ListHashSet.h:

(WTF::::ListHashSet):

  • wtf/OwnPtr.h:
  • wtf/Threading.cpp:

(WTF::compatEntryPoint):
(WTF::createThread):

  • wtf/ThreadingPthreads.cpp:

(WTF::wtfThreadEntryPoint):
(WTF::createThreadInternal):

  • wtf/unicode/Collator.h:
  • wtf/unicode/CollatorDefault.cpp:

(WTF::Collator::userDefault):

  • wtf/unicode/icu/CollatorICU.cpp:

(WTF::Collator::userDefault):

Location:
trunk/Source
Files:
34 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r156964 r156968  
     12013-10-05  Anders Carlsson  <andersca@apple.com>
     2
     3        Remove createOwned
     4        https://bugs.webkit.org/show_bug.cgi?id=122388
     5
     6        Reviewed by Darin Adler.
     7
     8        * profiler/ProfilerDatabase.cpp:
     9        (JSC::Profiler::Database::save):
     10
    1112013-10-05  Darin Adler  <darin@apple.com>
    212
  • trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp

    r153143 r156968  
    118118bool Database::save(const char* filename) const
    119119{
    120     OwnPtr<FilePrintStream> out = FilePrintStream::open(filename, "w");
     120    auto out = FilePrintStream::open(filename, "w");
    121121    if (!out)
    122122        return false;
  • trunk/Source/WTF/ChangeLog

    r156967 r156968  
     12013-10-05  Anders Carlsson  <andersca@apple.com>
     2
     3        Remove createOwned
     4        https://bugs.webkit.org/show_bug.cgi?id=122388
     5
     6        Reviewed by Darin Adler.
     7
     8        Since we're going with std::unique_ptr instead of OwnPtr, there's no need for makeOwned to exist.
     9        Get rid of it and replace it with calls to std::make_unique.
     10
     11        * wtf/FilePrintStream.cpp:
     12        (WTF::FilePrintStream::open):
     13        * wtf/FilePrintStream.h:
     14        * wtf/HashTable.h:
     15        (WTF::::HashTable):
     16        * wtf/ListHashSet.h:
     17        (WTF::::ListHashSet):
     18        * wtf/OwnPtr.h:
     19        * wtf/Threading.cpp:
     20        (WTF::compatEntryPoint):
     21        (WTF::createThread):
     22        * wtf/ThreadingPthreads.cpp:
     23        (WTF::wtfThreadEntryPoint):
     24        (WTF::createThreadInternal):
     25        * wtf/unicode/Collator.h:
     26        * wtf/unicode/CollatorDefault.cpp:
     27        (WTF::Collator::userDefault):
     28        * wtf/unicode/icu/CollatorICU.cpp:
     29        (WTF::Collator::userDefault):
     30
    1312013-10-05  Darin Adler  <darin@apple.com>
    232
  • trunk/Source/WTF/wtf/FilePrintStream.cpp

    r155407 r156968  
    4242}
    4343
    44 OwnPtr<FilePrintStream> FilePrintStream::open(const char* filename, const char* mode)
     44std::unique_ptr<FilePrintStream> FilePrintStream::open(const char* filename, const char* mode)
    4545{
    4646    FILE* file = fopen(filename, mode);
     
    4848        return nullptr;
    4949
    50     return createOwned<FilePrintStream>(file);
     50    return std::make_unique<FilePrintStream>(file);
    5151}
    5252
  • trunk/Source/WTF/wtf/FilePrintStream.h

    r155407 r156968  
    4343    virtual ~FilePrintStream();
    4444   
    45     WTF_EXPORT_PRIVATE static OwnPtr<FilePrintStream> open(const char* filename, const char* mode);
     45    WTF_EXPORT_PRIVATE static std::unique_ptr<FilePrintStream> open(const char* filename, const char* mode);
    4646   
    4747    FILE* file() { return m_file; }
  • trunk/Source/WTF/wtf/HashTable.h

    r156526 r156968  
    484484        mutable const_iterator* m_iterators;
    485485        // Use OwnPtr so HashTable can still be memmove'd or memcpy'ed.
    486         mutable OwnPtr<Mutex> m_mutex;
     486        mutable std::unique_ptr<Mutex> m_mutex;
    487487#endif
    488488
     
    540540#if CHECK_HASHTABLE_ITERATORS
    541541        , m_iterators(0)
    542         , m_mutex(createOwned<Mutex>())
    543 #endif
    544 #if DUMP_HASHTABLE_STATS_PER_TABLE
    545         , m_stats(createOwned<Stats>())
     542        , m_mutex(std::make_unique<Mutex>())
     543#endif
     544#if DUMP_HASHTABLE_STATS_PER_TABLE
     545        , m_stats(std::make_unique<Stats>())
    546546#endif
    547547    {
     
    11481148#if CHECK_HASHTABLE_ITERATORS
    11491149        , m_iterators(0)
    1150         , m_mutex(createOwned<Mutex>())
    1151 #endif
    1152 #if DUMP_HASHTABLE_STATS_PER_TABLE
    1153         , m_stats(createOwned<Stats>(*other.m_stats))
     1150        , m_mutex(std::make_unique<Mutex>())
     1151#endif
     1152#if DUMP_HASHTABLE_STATS_PER_TABLE
     1153        , m_stats(std::make_unique<Stats>(*other.m_stats))
    11541154#endif
    11551155    {
  • trunk/Source/WTF/wtf/ListHashSet.h

    r156305 r156968  
    161161    Node* m_head;
    162162    Node* m_tail;
    163     OwnPtr<NodeAllocator> m_allocator;
     163    std::unique_ptr<NodeAllocator> m_allocator;
    164164};
    165165
     
    406406    : m_head(0)
    407407    , m_tail(0)
    408     , m_allocator(createOwned<NodeAllocator>())
     408    , m_allocator(std::make_unique<NodeAllocator>())
    409409{
    410410}
     
    414414    : m_head(0)
    415415    , m_tail(0)
    416     , m_allocator(createOwned<NodeAllocator>())
     416    , m_allocator(std::make_unique<NodeAllocator>())
    417417{
    418418    for (auto it = other.begin(), end = other.end(); it != end; ++it)
  • trunk/Source/WTF/wtf/OwnPtr.h

    r156353 r156968  
    7676    private:
    7777        explicit OwnPtr(PtrType ptr) : m_ptr(ptr) { }
    78 
    79 #if COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES)
    80         template<typename U, typename... Args> friend OwnPtr<U> createOwned(Args&&... args);
    81 #else
    82         template<typename U> friend OwnPtr<U> createOwned();
    83         template<typename U, typename A1> friend OwnPtr<U> createOwned(A1&&);
    84         template<typename U, typename A1, typename A2> friend OwnPtr<U> createOwned(A1&&, A2&&);
    85 #endif
    8678
    8779        // We should never have two OwnPtrs for the same underlying object (otherwise we'll get
     
    195187    }
    196188
    197 #if COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES)
    198 template<typename T, typename... Args>
    199 inline OwnPtr<T> createOwned(Args&&... args)
    200 {
    201     return OwnPtr<T>(new T(std::forward<Args>(args)...));
    202 }
    203 #else
    204 template<typename T>
    205 inline OwnPtr<T> createOwned()
    206 {
    207     return OwnPtr<T>(new T);
    208 }
    209 
    210 template<typename T, typename A1>
    211 inline OwnPtr<T> createOwned(A1&& a1)
    212 {
    213     return OwnPtr<T>(new T(std::forward<A1>(a1)));
    214 }
    215 
    216 template<typename T, typename A1, typename A2>
    217 inline OwnPtr<T> createOwned(A1&& a1, A2&& a2)
    218 {
    219     return OwnPtr<T>(new T(std::forward<A1>(a1), std::forward<A2>(a2)));
    220 }
    221 #endif
    222 
    223189} // namespace WTF
    224190
    225191using WTF::OwnPtr;
    226 using WTF::createOwned;
    227192
    228193#endif // WTF_OwnPtr_h
  • trunk/Source/WTF/wtf/Threading.cpp

    r155407 r156968  
    110110static void compatEntryPoint(void* param)
    111111{
    112     // Balanced by .leakPtr() in createThread.
    113     OwnPtr<ThreadFunctionWithReturnValueInvocation> invocation = adoptPtr(static_cast<ThreadFunctionWithReturnValueInvocation*>(param));
     112    // Balanced by .release() in createThread.
     113    auto invocation = std::unique_ptr<ThreadFunctionWithReturnValueInvocation>(static_cast<ThreadFunctionWithReturnValueInvocation*>(param));
    114114    invocation->function(invocation->data);
    115115}
     
    117117ThreadIdentifier createThread(ThreadFunctionWithReturnValue entryPoint, void* data, const char* name)
    118118{
    119     auto invocation = createOwned<ThreadFunctionWithReturnValueInvocation>(entryPoint, data);
     119    auto invocation = std::make_unique<ThreadFunctionWithReturnValueInvocation>(entryPoint, data);
    120120
    121     // Balanced by adoptPtr() in compatEntryPoint.
    122     return createThread(compatEntryPoint, invocation.leakPtr(), name);
     121    // Balanced by std::unique_ptr constructor in compatEntryPoint.
     122    return createThread(compatEntryPoint, invocation.release(), name);
    123123}
    124124
     
    137137ThreadIdentifier createThread(ThreadFunctionWithReturnValue entryPoint, void* data)
    138138{
    139     auto invocation = createOwned<ThreadFunctionWithReturnValueInvocation>(entryPoint, data);
     139    auto invocation = std::make_unique<ThreadFunctionWithReturnValueInvocation>(entryPoint, data);
    140140
    141141    // Balanced by adoptPtr() in compatEntryPoint.
    142     return createThread(compatEntryPoint, invocation.leakPtr(), 0);
     142    return createThread(compatEntryPoint, invocation.release(), 0);
    143143}
    144144#endif
  • trunk/Source/WTF/wtf/ThreadingPthreads.cpp

    r156304 r156968  
    192192{
    193193    // Balanced by .leakPtr() in createThreadInternal.
    194     OwnPtr<ThreadFunctionInvocation> invocation = adoptPtr(static_cast<ThreadFunctionInvocation*>(param));
     194    auto invocation = std::unique_ptr<ThreadFunctionInvocation>(static_cast<ThreadFunctionInvocation*>(param));
    195195    invocation->function(invocation->data);
    196     return 0;
     196    return nullptr;
    197197}
    198198
    199199ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, const char*)
    200200{
    201     auto invocation = WTF::createOwned<ThreadFunctionInvocation>(entryPoint, data);
     201    auto invocation = std::make_unique<ThreadFunctionInvocation>(entryPoint, data);
    202202    pthread_t threadHandle;
    203203    if (pthread_create(&threadHandle, 0, wtfThreadEntryPoint, invocation.get())) {
     
    206206    }
    207207
    208     // Balanced by adoptPtr() in wtfThreadEntryPoint.
    209     ThreadFunctionInvocation* leakedInvocation = invocation.leakPtr();
     208    // Balanced by std::unique_ptr constructor in wtfThreadEntryPoint.
     209    ThreadFunctionInvocation* leakedInvocation = invocation.release();
    210210    UNUSED_PARAM(leakedInvocation);
    211211
  • trunk/Source/WTF/wtf/unicode/Collator.h

    r155407 r156968  
    4949        WTF_EXPORT_PRIVATE void setOrderLowerFirst(bool);
    5050
    51         WTF_EXPORT_PRIVATE static OwnPtr<Collator> userDefault();
     51        WTF_EXPORT_PRIVATE static std::unique_ptr<Collator> userDefault();
    5252
    5353        WTF_EXPORT_PRIVATE Result collate(const ::UChar*, size_t, const ::UChar*, size_t) const;
  • trunk/Source/WTF/wtf/unicode/CollatorDefault.cpp

    r156401 r156968  
    4848OwnPtr<Collator> Collator::userDefault()
    4949{
    50     return createOwned<Collator>(nullptr);
     50    return std::make_unique<Collator>(nullptr);
    5151}
    5252
  • trunk/Source/WTF/wtf/unicode/icu/CollatorICU.cpp

    r155407 r156968  
    5959}
    6060
    61 OwnPtr<Collator> Collator::userDefault()
     61std::unique_ptr<Collator> Collator::userDefault()
    6262{
    6363#if OS(DARWIN) && USE(CF)
     
    7272    char buf[256];
    7373    if (!collationOrder)
    74         return createOwned<Collator>("");
     74        return std::make_unique<Collator>("");
    7575    CFStringGetCString(collationOrder, buf, sizeof(buf), kCFStringEncodingASCII);
    76     return createOwned<Collator>(buf);
     76    return std::make_unique<Collator>(buf);
    7777#else
    78     return createOwned<Collator>(static_cast<const char*>(0));
     78    return std::make_unique<Collator>(static_cast<const char*>(0));
    7979#endif
    8080}
  • trunk/Source/WebCore/ChangeLog

    r156967 r156968  
     12013-10-05  Anders Carlsson  <andersca@apple.com>
     2
     3        Remove createOwned
     4        https://bugs.webkit.org/show_bug.cgi?id=122388
     5
     6        Reviewed by Darin Adler.
     7
     8        * dom/Document.cpp:
     9        (WebCore::Document::Document):
     10        (WebCore::Document::~Document):
     11        (WebCore::Document::createRenderTree):
     12        (WebCore::Document::destroyRenderTree):
     13        * dom/Document.h:
     14        * page/Frame.cpp:
     15        (WebCore::Frame::Frame):
     16        * page/Frame.h:
     17        * page/animation/AnimationController.cpp:
     18        (WebCore::AnimationController::AnimationController):
     19        * page/animation/AnimationController.h:
     20        * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
     21        * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
     22        * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
     23        (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC):
     24        (WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack):
     25        * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
     26        (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC):
     27        (WebCore::VideoTrackPrivateAVFObjC::setPlayerItemTrack):
     28        * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
     29        * rendering/svg/RenderSVGResourceClipper.cpp:
     30        (WebCore::RenderSVGResourceClipper::applyClippingToContext):
     31        * rendering/svg/RenderSVGResourceClipper.h:
     32        * rendering/svg/RenderSVGResourceFilter.cpp:
     33        (WebCore::RenderSVGResourceFilter::applyResource):
     34        * rendering/svg/RenderSVGResourceFilter.h:
     35        * rendering/svg/RenderSVGResourceMasker.cpp:
     36        (WebCore::RenderSVGResourceMasker::applyResource):
     37        * rendering/svg/RenderSVGResourceMasker.h:
     38
    1392013-10-05  Darin Adler  <darin@apple.com>
    240
  • trunk/Source/WebCore/dom/Document.cpp

    r156940 r156968  
    448448    , m_startTime(monotonicallyIncreasingTimeMS())
    449449    , m_overMinimumLayoutThreshold(false)
    450     , m_scriptRunner(createOwned<ScriptRunner>(*this))
     450    , m_scriptRunner(std::make_unique<ScriptRunner>(*this))
    451451    , m_xmlVersion(ASCIILiteral("1.0"))
    452452    , m_xmlStandalone(StandaloneUnspecified)
     
    580580        m_domWindow->resetUnlessSuspendedForPageCache();
    581581
    582     m_scriptRunner.clear();
     582    m_scriptRunner = nullptr;
    583583
    584584    histogramMutationEventUsage(m_listenerTypes);
     
    595595    detachParser();
    596596
    597     m_renderArena.clear();
     597    m_renderArena = nullptr;
    598598
    599599    if (this == topDocument())
     
    20122012
    20132013    if (!m_renderArena)
    2014         m_renderArena = createOwned<RenderArena>();
     2014        m_renderArena = std::make_unique<RenderArena>();
    20152015   
    20162016    setRenderView(new (*m_renderArena) RenderView(*this));
     
    21192119#endif
    21202120
    2121     m_renderArena.clear();
     2121    m_renderArena = nullptr;
    21222122}
    21232123
  • trunk/Source/WebCore/dom/Document.h

    r156940 r156968  
    13821382    RefPtr<Element> m_titleElement;
    13831383
    1384     OwnPtr<RenderArena> m_renderArena;
     1384    std::unique_ptr<RenderArena> m_renderArena;
    13851385
    13861386    OwnPtr<AXObjectCache> m_axObjectCache;
     
    14031403    bool m_overMinimumLayoutThreshold;
    14041404   
    1405     OwnPtr<ScriptRunner> m_scriptRunner;
    1406 
    1407     Vector<RefPtr<HTMLScriptElement> > m_currentScriptStack;
     1405    std::unique_ptr<ScriptRunner> m_scriptRunner;
     1406
     1407    Vector<RefPtr<HTMLScriptElement>> m_currentScriptStack;
    14081408
    14091409#if ENABLE(XSLT)
  • trunk/Source/WebCore/page/Frame.cpp

    r156769 r156968  
    160160    , m_navigationScheduler(this)
    161161    , m_ownerElement(ownerElement)
    162     , m_script(createOwned<ScriptController>(*this))
     162    , m_script(std::make_unique<ScriptController>(*this))
    163163    , m_editor(Editor::create(*this))
    164164    , m_selection(adoptPtr(new FrameSelection(this)))
    165165    , m_eventHandler(adoptPtr(new EventHandler(*this)))
    166     , m_animationController(createOwned<AnimationController>(*this))
     166    , m_animationController(std::make_unique<AnimationController>(*this))
    167167    , m_pageZoomFactor(parentPageZoomFactor(this))
    168168    , m_textZoomFactor(parentTextZoomFactor(this))
  • trunk/Source/WebCore/page/Frame.h

    r156769 r156968  
    221221        RefPtr<Document> m_doc;
    222222
    223         const OwnPtr<ScriptController> m_script;
     223        const std::unique_ptr<ScriptController> m_script;
    224224        const OwnPtr<Editor> m_editor;
    225225        const OwnPtr<FrameSelection> m_selection;
    226226        const OwnPtr<EventHandler> m_eventHandler;
    227         const OwnPtr<AnimationController> m_animationController;
     227        const std::unique_ptr<AnimationController> m_animationController;
    228228
    229229#if ENABLE(IOS_TEXT_AUTOSIZING)
  • trunk/Source/WebCore/page/animation/AnimationController.cpp

    r156622 r156968  
    474474
    475475AnimationController::AnimationController(Frame& frame)
    476     : m_data(createOwned<AnimationControllerPrivate>(frame))
     476    : m_data(std::make_unique<AnimationControllerPrivate>(frame))
    477477    , m_beginAnimationUpdateCount(0)
    478478{
  • trunk/Source/WebCore/page/animation/AnimationController.h

    r156622 r156968  
    8484
    8585private:
    86     const OwnPtr<AnimationControllerPrivate> m_data;
     86    const std::unique_ptr<AnimationControllerPrivate> m_data;
    8787    int m_beginAnimationUpdateCount;
    8888};
  • trunk/Source/WebCore/platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h

    r156722 r156968  
    4141class AVTrackPrivateAVFObjCImpl {
    4242public:
    43     static OwnPtr<AVTrackPrivateAVFObjCImpl> create(AVPlayerItemTrack* track)
    44     {
    45         return createOwned<AVTrackPrivateAVFObjCImpl>(track);
    46     }
    47     AVTrackPrivateAVFObjCImpl(AVPlayerItemTrack*);
     43    explicit AVTrackPrivateAVFObjCImpl(AVPlayerItemTrack*);
    4844
    4945    AVPlayerItemTrack* playerItemTrack() const { return m_playerItemTrack.get(); }
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h

    r156722 r156968  
    5555
    5656    void resetPropertiesFromTrack();
    57     OwnPtr<AVTrackPrivateAVFObjCImpl> m_impl;
     57    std::unique_ptr<AVTrackPrivateAVFObjCImpl> m_impl;
    5858};
    5959
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm

    r156722 r156968  
    3333
    3434AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC(AVPlayerItemTrack* track)
    35     : m_impl(AVTrackPrivateAVFObjCImpl::create(track))
     35    : m_impl(std::make_unique<AVTrackPrivateAVFObjCImpl>(track))
    3636{
    3737    resetPropertiesFromTrack();
     
    4949void AudioTrackPrivateAVFObjC::setPlayerItemTrack(AVPlayerItemTrack *track)
    5050{
    51     m_impl = AVTrackPrivateAVFObjCImpl::create(track);
     51    m_impl = std::make_unique<AVTrackPrivateAVFObjCImpl>(track);
    5252    resetPropertiesFromTrack();
    5353}
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp

    r156722 r156968  
    3333
    3434VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC(AVPlayerItemTrack* track)
    35 : m_impl(AVTrackPrivateAVFObjCImpl::create(track))
     35    : m_impl(std::make_unique<AVTrackPrivateAVFObjCImpl>(track))
    3636{
    3737    resetPropertiesFromTrack();
     
    4949void VideoTrackPrivateAVFObjC::setPlayerItemTrack(AVPlayerItemTrack *track)
    5050{
    51     m_impl = AVTrackPrivateAVFObjCImpl::create(track);
     51    m_impl = std::make_unique<AVTrackPrivateAVFObjCImpl>(track);
    5252    resetPropertiesFromTrack();
    5353}
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h

    r156722 r156968  
    5252
    5353private:
    54     VideoTrackPrivateAVFObjC(AVPlayerItemTrack*);
     54    explicit VideoTrackPrivateAVFObjC(AVPlayerItemTrack*);
    5555
    5656    void resetPropertiesFromTrack();
    57     OwnPtr<AVTrackPrivateAVFObjCImpl> m_impl;
     57    std::unique_ptr<AVTrackPrivateAVFObjCImpl> m_impl;
    5858};
    5959
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp

    r156954 r156968  
    148148    bool missingClipperData = !m_clipper.contains(object);
    149149    if (missingClipperData)
    150         m_clipper.set(object, createOwned<ClipperData>().release());
     150        m_clipper.set(object, std::make_unique<ClipperData>());
    151151
    152152    bool shouldCreateClipData = false;
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.h

    r156155 r156968  
    7676
    7777    FloatRect m_clipBoundaries;
    78     HashMap<RenderObject*, OwnPtr<ClipperData>> m_clipper;
     78    HashMap<RenderObject*, std::unique_ptr<ClipperData>> m_clipper;
    7979};
    8080
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp

    r155755 r156968  
    147147    }
    148148
    149     auto filterData = createOwned<FilterData>();
     149    auto filterData = std::make_unique<FilterData>();
    150150    FloatRect targetBoundingBox = object->objectBoundingBox();
    151151
     
    215215        ASSERT(!m_filter.contains(object));
    216216        filterData->savedContext = context;
    217         m_filter.set(object, filterData.release());
     217        m_filter.set(object, std::move(filterData));
    218218        return false;
    219219    }
     
    229229        ASSERT(!m_filter.contains(object));
    230230        filterData->savedContext = context;
    231         m_filter.set(object, filterData.release());
     231        m_filter.set(object, std::move(filterData));
    232232        return false;
    233233    }
     
    245245
    246246    ASSERT(!m_filter.contains(object));
    247     m_filter.set(object, filterData.release());
     247    m_filter.set(object, std::move(filterData));
    248248
    249249    return true;
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.h

    r155755 r156968  
    9898    bool fitsInMaximumImageSize(const FloatSize&, FloatSize&);
    9999
    100     HashMap<RenderObject*, OwnPtr<FilterData>> m_filter;
     100    HashMap<RenderObject*, std::unique_ptr<FilterData>> m_filter;
    101101};
    102102
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp

    r156954 r156968  
    7575    bool missingMaskerData = !m_masker.contains(object);
    7676    if (missingMaskerData)
    77         m_masker.set(object, createOwned<MaskerData>().release());
     77        m_masker.set(object, std::make_unique<MaskerData>());
    7878
    7979    MaskerData* maskerData = m_masker.get(object);
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.h

    r155755 r156968  
    6666
    6767    FloatRect m_maskContentBoundaries;
    68     HashMap<RenderObject*, OwnPtr<MaskerData>> m_masker;
     68    HashMap<RenderObject*, std::unique_ptr<MaskerData>> m_masker;
    6969};
    7070
  • trunk/Source/WebKit2/ChangeLog

    r156967 r156968  
     12013-10-05  Anders Carlsson  <andersca@apple.com>
     2
     3        Remove createOwned
     4        https://bugs.webkit.org/show_bug.cgi?id=122388
     5
     6        Reviewed by Darin Adler.
     7
     8        * UIProcess/API/mac/WKView.mm:
     9        (-[WKView _setFindIndicator:fadeOut:animate:]):
     10        * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
     11        (WKBundlePageOverlayCreate):
     12
    1132013-10-05  Darin Adler  <darin@apple.com>
    214
  • trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm

    r156860 r156968  
    173173    ValidationMap _validationMap;
    174174
    175     OwnPtr<FindIndicatorWindow> _findIndicatorWindow;
     175    std::unique_ptr<FindIndicatorWindow> _findIndicatorWindow;
     176
    176177    // We keep here the event when resending it to
    177178    // the application to distinguish the case of a new event from one
     
    26062607
    26072608    if (!_data->_findIndicatorWindow)
    2608         _data->_findIndicatorWindow = createOwned<FindIndicatorWindow>(self);
     2609        _data->_findIndicatorWindow = std::make_unique<FindIndicatorWindow>(self);
    26092610
    26102611    _data->_findIndicatorWindow->setFindIndicator(findIndicator, fadeOut, animate);
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp

    r156688 r156968  
    145145        return 0;
    146146
    147     auto clientImpl = createOwned<PageOverlayClientImpl>(wkClient);
     147    auto clientImpl = std::make_unique<PageOverlayClientImpl>(wkClient);
    148148
    149149    // FIXME: Looks like this leaks the clientImpl.
    150     return toAPI(PageOverlay::create(clientImpl.leakPtr()).leakRef());
     150    return toAPI(PageOverlay::create(clientImpl.release()).leakRef());
    151151}
    152152
Note: See TracChangeset for help on using the changeset viewer.