Changeset 220499 in webkit


Ignore:
Timestamp:
Aug 9, 2017 5:35:58 PM (7 years ago)
Author:
Ryan Haddad
Message:

Unreviewed, rolling out r220466, r220477, and r220487.
https://bugs.webkit.org/show_bug.cgi?id=175411

This change broke existing API tests and follow up fixes did
not resolve all the issues. (Requested by ryanhaddad on
#webkit).

Reverted changesets:

https://bugs.webkit.org/show_bug.cgi?id=175244
http://trac.webkit.org/changeset/220466

"WTF::Function does not allow for reference / non-default
constructible return types"
https://bugs.webkit.org/show_bug.cgi?id=175244
http://trac.webkit.org/changeset/220477

https://bugs.webkit.org/show_bug.cgi?id=175244
http://trac.webkit.org/changeset/220487

Patch by Commit Queue <commit-queue@webkit.org> on 2017-08-09

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r220481 r220499  
     12017-08-09  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r220466, r220477, and r220487.
     4        https://bugs.webkit.org/show_bug.cgi?id=175411
     5
     6        This change broke existing API tests and follow up fixes did
     7        not resolve all the issues. (Requested by ryanhaddad on
     8        #webkit).
     9
     10        Reverted changesets:
     11
     12        https://bugs.webkit.org/show_bug.cgi?id=175244
     13        http://trac.webkit.org/changeset/220466
     14
     15        "WTF::Function does not allow for reference / non-default
     16        constructible return types"
     17        https://bugs.webkit.org/show_bug.cgi?id=175244
     18        http://trac.webkit.org/changeset/220477
     19
     20        https://bugs.webkit.org/show_bug.cgi?id=175244
     21        http://trac.webkit.org/changeset/220487
     22
    1232017-08-09  Caitlin Potter  <caitp@igalia.com>
    224
  • trunk/Source/JavaScriptCore/runtime/ArrayBuffer.cpp

    r220477 r220499  
    133133    other.m_destructor = WTFMove(m_destructor);
    134134    other.m_shared = m_shared;
    135     reset();
     135    clear();
    136136}
    137137
  • trunk/Source/WTF/ChangeLog

    r220478 r220499  
     12017-08-09  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r220466, r220477, and r220487.
     4        https://bugs.webkit.org/show_bug.cgi?id=175411
     5
     6        This change broke existing API tests and follow up fixes did
     7        not resolve all the issues. (Requested by ryanhaddad on
     8        #webkit).
     9
     10        Reverted changesets:
     11
     12        https://bugs.webkit.org/show_bug.cgi?id=175244
     13        http://trac.webkit.org/changeset/220466
     14
     15        "WTF::Function does not allow for reference / non-default
     16        constructible return types"
     17        https://bugs.webkit.org/show_bug.cgi?id=175244
     18        http://trac.webkit.org/changeset/220477
     19
     20        https://bugs.webkit.org/show_bug.cgi?id=175244
     21        http://trac.webkit.org/changeset/220487
     22
    1232017-08-09  Sam Weinig  <sam@webkit.org>
    224
  • trunk/Source/WTF/wtf/Function.h

    r220477 r220499  
    5353    Out operator()(In... in) const
    5454    {
    55         ASSERT(m_callableWrapper);
    56         return m_callableWrapper->call(std::forward<In>(in)...);
     55        if (m_callableWrapper)
     56            return m_callableWrapper->call(std::forward<In>(in)...);
     57        return Out();
    5758    }
    5859
  • trunk/Source/WebCore/ChangeLog

    r220497 r220499  
     12017-08-09  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r220466, r220477, and r220487.
     4        https://bugs.webkit.org/show_bug.cgi?id=175411
     5
     6        This change broke existing API tests and follow up fixes did
     7        not resolve all the issues. (Requested by ryanhaddad on
     8        #webkit).
     9
     10        Reverted changesets:
     11
     12        https://bugs.webkit.org/show_bug.cgi?id=175244
     13        http://trac.webkit.org/changeset/220466
     14
     15        "WTF::Function does not allow for reference / non-default
     16        constructible return types"
     17        https://bugs.webkit.org/show_bug.cgi?id=175244
     18        http://trac.webkit.org/changeset/220477
     19
     20        https://bugs.webkit.org/show_bug.cgi?id=175244
     21        http://trac.webkit.org/changeset/220487
     22
    1232017-08-09  Chris Dumez  <cdumez@apple.com>
    224
  • trunk/Source/WebCore/bindings/js/JSCustomElementInterface.h

    r220477 r220499  
    9595    RefPtr<Element> tryToConstructCustomElement(Document&, const AtomicString&);
    9696
    97     void invokeCallback(Element&, JSC::JSObject* callback, const WTF::Function<void(JSC::ExecState*, JSDOMGlobalObject*, JSC::MarkedArgumentBuffer&)>& addArguments = [](JSC::ExecState*, JSDOMGlobalObject*, JSC::MarkedArgumentBuffer&) { });
     97    void invokeCallback(Element&, JSC::JSObject* callback, const WTF::Function<void(JSC::ExecState*, JSDOMGlobalObject*, JSC::MarkedArgumentBuffer&)>& addArguments = { });
    9898
    9999    QualifiedName m_name;
  • trunk/Source/WebKit/ChangeLog

    r220497 r220499  
     12017-08-09  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r220466, r220477, and r220487.
     4        https://bugs.webkit.org/show_bug.cgi?id=175411
     5
     6        This change broke existing API tests and follow up fixes did
     7        not resolve all the issues. (Requested by ryanhaddad on
     8        #webkit).
     9
     10        Reverted changesets:
     11
     12        https://bugs.webkit.org/show_bug.cgi?id=175244
     13        http://trac.webkit.org/changeset/220466
     14
     15        "WTF::Function does not allow for reference / non-default
     16        constructible return types"
     17        https://bugs.webkit.org/show_bug.cgi?id=175244
     18        http://trac.webkit.org/changeset/220477
     19
     20        https://bugs.webkit.org/show_bug.cgi?id=175244
     21        http://trac.webkit.org/changeset/220487
     22
    1232017-08-09  Chris Dumez  <cdumez@apple.com>
    224
  • trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h

    r220477 r220499  
    6161public:
    6262    using UpdateCookiePartitioningForDomainsHandler = WTF::Function<void(const Vector<String>& domainsToRemove, const Vector<String>& domainsToAdd, ShouldClearFirst)>;
    63     static Ref<WebResourceLoadStatisticsStore> create(const String& resourceLoadStatisticsDirectory, Function<void (const String&)>&& testingCallback, UpdateCookiePartitioningForDomainsHandler&& updateCookiePartitioningForDomainsHandler = [](const Vector<String>&, const Vector<String>&, ShouldClearFirst) { })
     63    static Ref<WebResourceLoadStatisticsStore> create(const String& resourceLoadStatisticsDirectory, Function<void (const String&)>&& testingCallback, UpdateCookiePartitioningForDomainsHandler&& updateCookiePartitioningForDomainsHandler = { })
    6464    {
    6565        return adoptRef(*new WebResourceLoadStatisticsStore(resourceLoadStatisticsDirectory, WTFMove(testingCallback), WTFMove(updateCookiePartitioningForDomainsHandler)));
  • trunk/Tools/ChangeLog

    r220487 r220499  
     12017-08-09  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r220466, r220477, and r220487.
     4        https://bugs.webkit.org/show_bug.cgi?id=175411
     5
     6        This change broke existing API tests and follow up fixes did
     7        not resolve all the issues. (Requested by ryanhaddad on
     8        #webkit).
     9
     10        Reverted changesets:
     11
     12        https://bugs.webkit.org/show_bug.cgi?id=175244
     13        http://trac.webkit.org/changeset/220466
     14
     15        "WTF::Function does not allow for reference / non-default
     16        constructible return types"
     17        https://bugs.webkit.org/show_bug.cgi?id=175244
     18        http://trac.webkit.org/changeset/220477
     19
     20        https://bugs.webkit.org/show_bug.cgi?id=175244
     21        http://trac.webkit.org/changeset/220487
     22
    1232017-08-09  Sam Weinig  <sam@webkit.org>
    224
  • trunk/Tools/TestWebKitAPI/Tests/WTF/Function.cpp

    r220487 r220499  
    141141{
    142142    Function<unsigned()> a;
     143    EXPECT_FALSE(static_cast<bool>(a));
     144    EXPECT_EQ(0U, a());
     145
    143146    a = [] {
    144147        return 1U;
     
    147150    EXPECT_EQ(1U, a());
    148151
     152    a = nullptr;
     153    EXPECT_FALSE(static_cast<bool>(a));
     154    EXPECT_EQ(0U, a());
     155
    149156    a = MoveOnly { 2 };
    150157    EXPECT_TRUE(static_cast<bool>(a));
     
    169176    EXPECT_FALSE(static_cast<bool>(c));
    170177    EXPECT_EQ(0U, c());
     178
     179    Function<unsigned()> d = nullptr;
     180    EXPECT_FALSE(static_cast<bool>(d));
     181    EXPECT_EQ(0U, d());
    171182}
    172183
     
    212223
    213224    a = FunctionDestructionChecker(a);
     225    a = nullptr;
     226    EXPECT_TRUE(static_cast<bool>(FunctionDestructionChecker::functionAsBool));
     227    EXPECT_TRUE(static_cast<bool>(FunctionDestructionChecker::functionResult));
     228    EXPECT_FALSE(FunctionDestructionChecker::functionAsBool.value());
     229    EXPECT_EQ(0U, FunctionDestructionChecker::functionResult.value());
     230    FunctionDestructionChecker::functionAsBool = std::nullopt;
     231    FunctionDestructionChecker::functionResult = std::nullopt;
     232
     233    a = FunctionDestructionChecker(a);
    214234    a = MoveOnly { 2 };
    215235    EXPECT_TRUE(static_cast<bool>(FunctionDestructionChecker::functionAsBool));
Note: See TracChangeset for help on using the changeset viewer.