Title: [285101] trunk/Source
Revision
285101
Author
[email protected]
Date
2021-11-01 01:42:19 -0700 (Mon, 01 Nov 2021)

Log Message

Fix build with GCC 8.4 on Ubuntu 18.04
https://bugs.webkit.org/show_bug.cgi?id=232305

Patch by Daniel Kolesa <[email protected]> on 2021-11-01
Reviewed by Adrian Perez de Castro.

Source/WebCore:

Fix build with GCC 8.4 on Ubuntu 18.04

Thes sections of the code trigger an internal compiler error with
GCC 8.4, segfaulting the compiler. This adds a workaround that
makes it work again.

* Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
(WebCore::ClipboardItemBindingsDataSource::collectDataForWriting):

Source/WebKit:

Thes sections of the code trigger an internal compiler error with
GCC 8.4, segfaulting the compiler. This adds a workaround that
makes it work again.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (285100 => 285101)


--- trunk/Source/WebCore/ChangeLog	2021-11-01 06:20:41 UTC (rev 285100)
+++ trunk/Source/WebCore/ChangeLog	2021-11-01 08:42:19 UTC (rev 285101)
@@ -1,3 +1,19 @@
+2021-11-01  Daniel Kolesa  <[email protected]>
+
+        Fix build with GCC 8.4 on Ubuntu 18.04
+        https://bugs.webkit.org/show_bug.cgi?id=232305
+
+        Reviewed by Adrian Perez de Castro.
+
+        Fix build with GCC 8.4 on Ubuntu 18.04
+
+        Thes sections of the code trigger an internal compiler error with
+        GCC 8.4, segfaulting the compiler. This adds a workaround that
+        makes it work again.
+
+        * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
+        (WebCore::ClipboardItemBindingsDataSource::collectDataForWriting):
+
 2021-10-31  Antti Koivisto  <[email protected]>
 
         Fix :host invalidation when combined with pseudo classes in descendant position

Modified: trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp (285100 => 285101)


--- trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp	2021-11-01 06:20:41 UTC (rev 285100)
+++ trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp	2021-11-01 08:42:19 UTC (rev 285101)
@@ -139,7 +139,9 @@
         });
 
         auto promise = typeAndItem.value;
-        promise->whenSettled([this, protectedItem = Ref { m_item }, destination = m_writingDestination, promise, type, weakItemTypeLoader = WeakPtr { itemTypeLoader }] () mutable {
+        /* hack: gcc 8.4 will segfault if the WeakPtr is instantiated within the lambda captures */
+        auto wl = WeakPtr { itemTypeLoader };
+        promise->whenSettled([this, protectedItem = Ref { m_item }, destination = m_writingDestination, promise, type, weakItemTypeLoader = WTFMove(wl)] () mutable {
             if (!weakItemTypeLoader)
                 return;
 

Modified: trunk/Source/WebKit/ChangeLog (285100 => 285101)


--- trunk/Source/WebKit/ChangeLog	2021-11-01 06:20:41 UTC (rev 285100)
+++ trunk/Source/WebKit/ChangeLog	2021-11-01 08:42:19 UTC (rev 285101)
@@ -1,3 +1,17 @@
+2021-11-01  Daniel Kolesa  <[email protected]>
+
+        Fix build with GCC 8.4 on Ubuntu 18.04
+        https://bugs.webkit.org/show_bug.cgi?id=232305
+
+        Reviewed by Adrian Perez de Castro.
+
+        Thes sections of the code trigger an internal compiler error with
+        GCC 8.4, segfaulting the compiler. This adds a workaround that
+        makes it work again.
+
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
+
 2021-10-31  Fujii Hironori  <[email protected]>
 
         [WinCairo] New GraphicsLayer for GPU process mode

Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (285100 => 285101)


--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp	2021-11-01 06:20:41 UTC (rev 285100)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp	2021-11-01 08:42:19 UTC (rev 285101)
@@ -1940,7 +1940,9 @@
 
     if (websiteDataTypes.contains(WebsiteDataType::DiskCache)) {
         forEachNetworkSession([sessionID, fetchOptions, &domainsToDeleteAllNonCookieWebsiteDataFor, &callbackAggregator](auto& session) {
-            fetchDiskCacheEntries(session.cache(), sessionID, fetchOptions, [domainsToDeleteAllNonCookieWebsiteDataFor, callbackAggregator, session = WeakPtr { session }](auto entries) mutable {
+            /* hack: gcc 8.4 will segfault if the WeakPtr is instantiated within the lambda captures */
+            auto ws = WeakPtr { session };
+            fetchDiskCacheEntries(session.cache(), sessionID, fetchOptions, [domainsToDeleteAllNonCookieWebsiteDataFor, callbackAggregator, session = WTFMove(ws)](auto entries) mutable {
                 if (!session)
                     return;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to