Title: [220499] trunk
Revision
220499
Author
ryanhad...@apple.com
Date
2017-08-09 17:35:58 -0700 (Wed, 09 Aug 2017)

Log 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-qu...@webkit.org> on 2017-08-09

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (220498 => 220499)


--- trunk/Source/_javascript_Core/ChangeLog	2017-08-09 23:32:14 UTC (rev 220498)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-08-10 00:35:58 UTC (rev 220499)
@@ -1,3 +1,25 @@
+2017-08-09  Commit Queue  <commit-qu...@webkit.org>
+
+        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
+
 2017-08-09  Caitlin Potter  <ca...@igalia.com>
 
         Early error on ANY operator before new.target

Modified: trunk/Source/_javascript_Core/runtime/ArrayBuffer.cpp (220498 => 220499)


--- trunk/Source/_javascript_Core/runtime/ArrayBuffer.cpp	2017-08-09 23:32:14 UTC (rev 220498)
+++ trunk/Source/_javascript_Core/runtime/ArrayBuffer.cpp	2017-08-10 00:35:58 UTC (rev 220499)
@@ -132,7 +132,7 @@
     other.m_sizeInBytes = m_sizeInBytes;
     other.m_destructor = WTFMove(m_destructor);
     other.m_shared = m_shared;
-    reset();
+    clear();
 }
 
 void ArrayBufferContents::copyTo(ArrayBufferContents& other)

Modified: trunk/Source/WTF/ChangeLog (220498 => 220499)


--- trunk/Source/WTF/ChangeLog	2017-08-09 23:32:14 UTC (rev 220498)
+++ trunk/Source/WTF/ChangeLog	2017-08-10 00:35:58 UTC (rev 220499)
@@ -1,3 +1,25 @@
+2017-08-09  Commit Queue  <commit-qu...@webkit.org>
+
+        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
+
 2017-08-09  Sam Weinig  <s...@webkit.org>
 
         WTF::Function does not allow for reference / non-default constructible return types

Modified: trunk/Source/WTF/wtf/Function.h (220498 => 220499)


--- trunk/Source/WTF/wtf/Function.h	2017-08-09 23:32:14 UTC (rev 220498)
+++ trunk/Source/WTF/wtf/Function.h	2017-08-10 00:35:58 UTC (rev 220499)
@@ -52,8 +52,9 @@
 
     Out operator()(In... in) const
     {
-        ASSERT(m_callableWrapper);
-        return m_callableWrapper->call(std::forward<In>(in)...);
+        if (m_callableWrapper)
+            return m_callableWrapper->call(std::forward<In>(in)...);
+        return Out();
     }
 
     explicit operator bool() const { return !!m_callableWrapper; }

Modified: trunk/Source/WebCore/ChangeLog (220498 => 220499)


--- trunk/Source/WebCore/ChangeLog	2017-08-09 23:32:14 UTC (rev 220498)
+++ trunk/Source/WebCore/ChangeLog	2017-08-10 00:35:58 UTC (rev 220499)
@@ -1,3 +1,25 @@
+2017-08-09  Commit Queue  <commit-qu...@webkit.org>
+
+        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
+
 2017-08-09  Chris Dumez  <cdu...@apple.com>
 
         [Beacon][NetworkSession] Support CORS-preflighting on redirects

Modified: trunk/Source/WebCore/bindings/js/JSCustomElementInterface.h (220498 => 220499)


--- trunk/Source/WebCore/bindings/js/JSCustomElementInterface.h	2017-08-09 23:32:14 UTC (rev 220498)
+++ trunk/Source/WebCore/bindings/js/JSCustomElementInterface.h	2017-08-10 00:35:58 UTC (rev 220499)
@@ -94,7 +94,7 @@
 
     RefPtr<Element> tryToConstructCustomElement(Document&, const AtomicString&);
 
-    void invokeCallback(Element&, JSC::JSObject* callback, const WTF::Function<void(JSC::ExecState*, JSDOMGlobalObject*, JSC::MarkedArgumentBuffer&)>& addArguments = [](JSC::ExecState*, JSDOMGlobalObject*, JSC::MarkedArgumentBuffer&) { });
+    void invokeCallback(Element&, JSC::JSObject* callback, const WTF::Function<void(JSC::ExecState*, JSDOMGlobalObject*, JSC::MarkedArgumentBuffer&)>& addArguments = { });
 
     QualifiedName m_name;
     JSC::Weak<JSC::JSObject> m_constructor;

Modified: trunk/Source/WebKit/ChangeLog (220498 => 220499)


--- trunk/Source/WebKit/ChangeLog	2017-08-09 23:32:14 UTC (rev 220498)
+++ trunk/Source/WebKit/ChangeLog	2017-08-10 00:35:58 UTC (rev 220499)
@@ -1,3 +1,25 @@
+2017-08-09  Commit Queue  <commit-qu...@webkit.org>
+
+        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
+
 2017-08-09  Chris Dumez  <cdu...@apple.com>
 
         [Beacon][NetworkSession] Support CORS-preflighting on redirects

Modified: trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h (220498 => 220499)


--- trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h	2017-08-09 23:32:14 UTC (rev 220498)
+++ trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h	2017-08-10 00:35:58 UTC (rev 220499)
@@ -60,7 +60,7 @@
 class WebResourceLoadStatisticsStore final : public IPC::Connection::WorkQueueMessageReceiver {
 public:
     using UpdateCookiePartitioningForDomainsHandler = WTF::Function<void(const Vector<String>& domainsToRemove, const Vector<String>& domainsToAdd, ShouldClearFirst)>;
-    static Ref<WebResourceLoadStatisticsStore> create(const String& resourceLoadStatisticsDirectory, Function<void (const String&)>&& testingCallback, UpdateCookiePartitioningForDomainsHandler&& updateCookiePartitioningForDomainsHandler = [](const Vector<String>&, const Vector<String>&, ShouldClearFirst) { })
+    static Ref<WebResourceLoadStatisticsStore> create(const String& resourceLoadStatisticsDirectory, Function<void (const String&)>&& testingCallback, UpdateCookiePartitioningForDomainsHandler&& updateCookiePartitioningForDomainsHandler = { })
     {
         return adoptRef(*new WebResourceLoadStatisticsStore(resourceLoadStatisticsDirectory, WTFMove(testingCallback), WTFMove(updateCookiePartitioningForDomainsHandler)));
     }

Modified: trunk/Tools/ChangeLog (220498 => 220499)


--- trunk/Tools/ChangeLog	2017-08-09 23:32:14 UTC (rev 220498)
+++ trunk/Tools/ChangeLog	2017-08-10 00:35:58 UTC (rev 220499)
@@ -1,3 +1,25 @@
+2017-08-09  Commit Queue  <commit-qu...@webkit.org>
+
+        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
+
 2017-08-09  Sam Weinig  <s...@webkit.org>
 
         Update for https://bugs.webkit.org/show_bug.cgi?id=175244.

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/Function.cpp (220498 => 220499)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/Function.cpp	2017-08-09 23:32:14 UTC (rev 220498)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/Function.cpp	2017-08-10 00:35:58 UTC (rev 220499)
@@ -140,6 +140,9 @@
 TEST(WTF_Function, Basics)
 {
     Function<unsigned()> a;
+    EXPECT_FALSE(static_cast<bool>(a));
+    EXPECT_EQ(0U, a());
+
     a = [] {
         return 1U;
     };
@@ -146,6 +149,10 @@
     EXPECT_TRUE(static_cast<bool>(a));
     EXPECT_EQ(1U, a());
 
+    a = nullptr;
+    EXPECT_FALSE(static_cast<bool>(a));
+    EXPECT_EQ(0U, a());
+
     a = MoveOnly { 2 };
     EXPECT_TRUE(static_cast<bool>(a));
     EXPECT_EQ(2U, a());
@@ -168,6 +175,10 @@
     EXPECT_EQ(3U, b());
     EXPECT_FALSE(static_cast<bool>(c));
     EXPECT_EQ(0U, c());
+
+    Function<unsigned()> d = nullptr;
+    EXPECT_FALSE(static_cast<bool>(d));
+    EXPECT_EQ(0U, d());
 }
 
 struct FunctionDestructionChecker {
@@ -211,6 +222,15 @@
     FunctionDestructionChecker::functionResult = std::nullopt;
 
     a = FunctionDestructionChecker(a);
+    a = nullptr;
+    EXPECT_TRUE(static_cast<bool>(FunctionDestructionChecker::functionAsBool));
+    EXPECT_TRUE(static_cast<bool>(FunctionDestructionChecker::functionResult));
+    EXPECT_FALSE(FunctionDestructionChecker::functionAsBool.value());
+    EXPECT_EQ(0U, FunctionDestructionChecker::functionResult.value());
+    FunctionDestructionChecker::functionAsBool = std::nullopt;
+    FunctionDestructionChecker::functionResult = std::nullopt;
+
+    a = FunctionDestructionChecker(a);
     a = MoveOnly { 2 };
     EXPECT_TRUE(static_cast<bool>(FunctionDestructionChecker::functionAsBool));
     EXPECT_TRUE(static_cast<bool>(FunctionDestructionChecker::functionResult));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to