Changeset 194470 in webkit


Ignore:
Timestamp:
Dec 31, 2015 2:49:09 PM (8 years ago)
Author:
aestes@apple.com
Message:

Fix warnings uncovered by migrating to WTF_MOVE
https://bugs.webkit.org/show_bug.cgi?id=152601

Reviewed by Daniel Bates.

Source/JavaScriptCore:

  • create_regex_tables: Moving a return value prevented copy elision.
  • ftl/FTLUnwindInfo.cpp:

(JSC::FTL::parseUnwindInfo): Ditto.

  • replay/EncodedValue.h: Ditto.

Source/WebCore:

  • Modules/encryptedmedia/MediaKeys.cpp:

(WebCore::MediaKeys::createSession): Moving a return value prevented copy elision.

Source/WebKit2:

  • UIProcess/API/APIUIClient.h:

(API::UIClient::actionsForElement): Moving a return value passed to the function by value is redundant, since it
will be implicitly moved in this case.

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::actionsForElement): Ditto.

Tools:

Ignored -Wself-move warnings in these two API tests. It's useful to test that these classes properly handle
self-move, even if doing so would trigger a warning.

  • TestWebKitAPI/Tests/WTF/NakedPtr.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WTF/RefPtr.cpp:

(TestWebKitAPI::TEST):

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r194449 r194470  
     12015-12-31  Andy Estes  <aestes@apple.com>
     2
     3        Fix warnings uncovered by migrating to WTF_MOVE
     4        https://bugs.webkit.org/show_bug.cgi?id=152601
     5
     6        Reviewed by Daniel Bates.
     7
     8        * create_regex_tables: Moving a return value prevented copy elision.
     9        * ftl/FTLUnwindInfo.cpp:
     10        (JSC::FTL::parseUnwindInfo): Ditto.
     11        * replay/EncodedValue.h: Ditto.
     12
    1132015-12-30  Aleksandr Skachkov  <gskachkov@gmail.com>
    214
  • trunk/Source/JavaScriptCore/create_regex_tables

    r177854 r194470  
    107107        else:
    108108            function += ("    characterClass->m_ranges.append(CharacterRange(0x%02x, 0x%02x));\n" % (min, max))
    109     function += ("    return WTF::move(characterClass);\n")
     109    function += ("    return characterClass;\n")
    110110    function += ("}\n\n")
    111111    functions += function
  • trunk/Source/JavaScriptCore/ftl/FTLUnwindInfo.cpp

    r193414 r194470  
    10171017#endif
    10181018    registerOffsets->sort();
    1019     return WTF::move(registerOffsets);
     1019    return registerOffsets;
    10201020}
    10211021
  • trunk/Source/JavaScriptCore/replay/EncodedValue.h

    r178060 r194470  
    115115            encodedVector.append<T>(value);
    116116
    117         return WTF::move(encodedVector);
     117        return encodedVector;
    118118    }
    119119
  • trunk/Source/WebCore/ChangeLog

    r194468 r194470  
     12015-12-31  Andy Estes  <aestes@apple.com>
     2
     3        Fix warnings uncovered by migrating to WTF_MOVE
     4        https://bugs.webkit.org/show_bug.cgi?id=152601
     5
     6        Reviewed by Daniel Bates.
     7
     8        * Modules/encryptedmedia/MediaKeys.cpp:
     9        (WebCore::MediaKeys::createSession): Moving a return value prevented copy elision.
     10
    1112015-12-31  Brady Eidson  <beidson@apple.com>
    212
  • trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp

    r185336 r194470  
    120120
    121121    // 6. Return the new object to the caller.
    122     return WTF::move(session);
     122    return session;
    123123}
    124124
  • trunk/Source/WebKit2/ChangeLog

    r194448 r194470  
     12015-12-31  Andy Estes  <aestes@apple.com>
     2
     3        Fix warnings uncovered by migrating to WTF_MOVE
     4        https://bugs.webkit.org/show_bug.cgi?id=152601
     5
     6        Reviewed by Daniel Bates.
     7
     8        * UIProcess/API/APIUIClient.h:
     9        (API::UIClient::actionsForElement): Moving a return value passed to the function by value is redundant, since it
     10        will be implicitly moved in this case.
     11        * UIProcess/Cocoa/UIDelegate.mm:
     12        (WebKit::UIDelegate::UIClient::actionsForElement): Ditto.
     13
    1142015-12-30  Simon Fraser  <simon.fraser@apple.com>
    215
  • trunk/Source/WebKit2/UIProcess/API/APIUIClient.h

    r193944 r194470  
    160160    virtual bool shouldIncludeAppLinkActionsForElement(_WKActivatedElementInfo *) { return true; }
    161161#endif
    162     virtual RetainPtr<NSArray> actionsForElement(_WKActivatedElementInfo *, RetainPtr<NSArray> defaultActions) { return WTF::move(defaultActions); }
     162    virtual RetainPtr<NSArray> actionsForElement(_WKActivatedElementInfo *, RetainPtr<NSArray> defaultActions) { return defaultActions; }
    163163    virtual void didNotHandleTapAsClick(const WebCore::IntPoint&) { }
    164164#endif
  • trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm

    r192397 r194470  
    361361{
    362362    if (!m_uiDelegate.m_delegateMethods.webViewActionsForElementDefaultActions)
    363         return WTF::move(defaultActions);
    364 
    365     auto delegate = m_uiDelegate.m_delegate.get();
    366     if (!delegate)
    367363        return defaultActions;
    368364
     365    auto delegate = m_uiDelegate.m_delegate.get();
     366    if (!delegate)
     367        return defaultActions;
     368
    369369    return [(id <WKUIDelegatePrivate>)delegate _webView:m_uiDelegate.m_webView actionsForElement:elementInfo defaultActions:defaultActions.get()];
    370370}
  • trunk/Tools/ChangeLog

    r194464 r194470  
     12015-12-31  Andy Estes  <aestes@apple.com>
     2
     3        Fix warnings uncovered by migrating to WTF_MOVE
     4        https://bugs.webkit.org/show_bug.cgi?id=152601
     5
     6        Reviewed by Daniel Bates.
     7
     8        Ignored -Wself-move warnings in these two API tests. It's useful to test that these classes properly handle
     9        self-move, even if doing so would trigger a warning.
     10
     11        * TestWebKitAPI/Tests/WTF/NakedPtr.cpp:
     12        (TestWebKitAPI::TEST):
     13        * TestWebKitAPI/Tests/WTF/RefPtr.cpp:
     14        (TestWebKitAPI::TEST):
     15
    1162015-12-31  Martin Robinson  <mrobinson@igalia.com>
    217
  • trunk/Tools/TestWebKitAPI/Tests/WTF/NakedPtr.cpp

    r185608 r194470  
    180180        NakedPtr<RefLogger> ptr(&a);
    181181        ASSERT_EQ(&a, ptr.get());
     182#if COMPILER(CLANG)
     183#pragma clang diagnostic push
     184#pragma clang diagnostic ignored "-Wself-move"
     185#endif
    182186        ptr = WTF::move(ptr);
     187#if COMPILER(CLANG)
     188#pragma clang diagnostic pop
     189#endif
    183190        ASSERT_EQ(&a, ptr.get());
    184191    }
  • trunk/Tools/TestWebKitAPI/Tests/WTF/RefPtr.cpp

    r186279 r194470  
    271271        RefPtr<RefLogger> ptr(&a);
    272272        ASSERT_EQ(&a, ptr.get());
     273#if COMPILER(CLANG)
     274#pragma clang diagnostic push
     275#pragma clang diagnostic ignored "-Wself-move"
     276#endif
    273277        ptr = WTF::move(ptr);
     278#if COMPILER(CLANG)
     279#pragma clang diagnostic pop
     280#endif
    274281        ASSERT_EQ(&a, ptr.get());
    275282    }
Note: See TracChangeset for help on using the changeset viewer.