Title: [276308] trunk
Revision
276308
Author
[email protected]
Date
2021-04-20 09:50:24 -0700 (Tue, 20 Apr 2021)

Log Message

[WPE][Qt] Fix build failure after r270690
https://bugs.webkit.org/show_bug.cgi?id=223070

Patch by Marco Felsch <[email protected]> on 2021-04-20
Reviewed by Philippe Normand.

Source/WebKit:

WPE fails to build with `-DENABLE_WPE_QT_API=ON` after adapting the
visibility for linked frameworks done by r270690.

The reason for that is that the visibility is now more strict and we
have to add the WTF dependecy or drop the WTF fast-allocate mechanism.

Adding the WTF dependency is a bit odd since this would staticly link
the WTF lib into a small wrapper lib. Also this lib has nothing to do
with Webkit at all. It is just a QT adaption library.

No new tests, it can be build again.

* UIProcess/API/wpe/qt/WPEQtView.cpp:
(WPEQtView::notifyLoadChangedCallback):
(WPEQtView::notifyLoadFailedCallback):
(WPEQtView::runJavaScript):
* UIProcess/API/wpe/qt/WPEQtViewBackend.cpp:
(WPEQtViewBackend::create):
* UIProcess/API/wpe/qt/WPEQtViewBackend.h:
* UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h:

Drop WTF usage and use system allocator since the lib has nothing to do
with Webkit at all.

Tools:

* Scripts/webkitpy/style/checker.py:

Add exception for WPE QT wrapper library to use system alloc instead
of WTF.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (276307 => 276308)


--- trunk/Source/WebKit/ChangeLog	2021-04-20 16:16:43 UTC (rev 276307)
+++ trunk/Source/WebKit/ChangeLog	2021-04-20 16:50:24 UTC (rev 276308)
@@ -1,3 +1,34 @@
+2021-04-20  Marco Felsch  <[email protected]>
+
+        [WPE][Qt] Fix build failure after r270690
+        https://bugs.webkit.org/show_bug.cgi?id=223070
+
+        Reviewed by Philippe Normand.
+
+        WPE fails to build with `-DENABLE_WPE_QT_API=ON` after adapting the
+        visibility for linked frameworks done by r270690.
+
+        The reason for that is that the visibility is now more strict and we
+        have to add the WTF dependecy or drop the WTF fast-allocate mechanism.
+
+        Adding the WTF dependency is a bit odd since this would staticly link
+        the WTF lib into a small wrapper lib. Also this lib has nothing to do
+        with Webkit at all. It is just a QT adaption library.
+
+        No new tests, it can be build again.
+
+        * UIProcess/API/wpe/qt/WPEQtView.cpp:
+        (WPEQtView::notifyLoadChangedCallback):
+        (WPEQtView::notifyLoadFailedCallback):
+        (WPEQtView::runJavaScript):
+        * UIProcess/API/wpe/qt/WPEQtViewBackend.cpp:
+        (WPEQtViewBackend::create):
+        * UIProcess/API/wpe/qt/WPEQtViewBackend.h:
+        * UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h:
+
+        Drop WTF usage and use system allocator since the lib has nothing to do
+        with Webkit at all.
+
 2021-04-20  Basuke Suzuki  <[email protected]>
 
         Remove UNUSED warnings based on the configuration.

Modified: trunk/Source/WebKit/UIProcess/API/wpe/qt/WPEQtView.cpp (276307 => 276308)


--- trunk/Source/WebKit/UIProcess/API/wpe/qt/WPEQtView.cpp	2021-04-20 16:16:43 UTC (rev 276307)
+++ trunk/Source/WebKit/UIProcess/API/wpe/qt/WPEQtView.cpp	2021-04-20 16:50:24 UTC (rev 276308)
@@ -152,7 +152,7 @@
 
     if (statusSet) {
         WPEQtViewLoadRequestPrivate loadRequestPrivate(view->url(), loadStatus, "");
-        std::unique_ptr<WPEQtViewLoadRequest> loadRequest = makeUnique<WPEQtViewLoadRequest>(loadRequestPrivate);
+        std::unique_ptr<WPEQtViewLoadRequest> loadRequest = std::make_unique<WPEQtViewLoadRequest>(loadRequestPrivate);
         Q_EMIT view->loadingChanged(loadRequest.get());
     }
 }
@@ -168,7 +168,7 @@
         loadStatus = WPEQtView::LoadStatus::LoadFailedStatus;
 
     WPEQtViewLoadRequestPrivate loadRequestPrivate(QUrl(QString(failingURI)), loadStatus, error->message);
-    std::unique_ptr<WPEQtViewLoadRequest> loadRequest = makeUnique<WPEQtViewLoadRequest>(loadRequestPrivate);
+    std::unique_ptr<WPEQtViewLoadRequest> loadRequest = std::make_unique<WPEQtViewLoadRequest>(loadRequestPrivate);
     Q_EMIT view->loadingChanged(loadRequest.get());
 }
 
@@ -387,7 +387,6 @@
 }
 
 struct _javascript_CallbackData {
-    WTF_MAKE_STRUCT_FAST_ALLOCATED;
     _javascript_CallbackData(QJSValue cb, QPointer<WPEQtView> obj)
         : callback(cb)
         , object(obj) { }
@@ -447,7 +446,7 @@
 */
 void WPEQtView::runJavaScript(const QString& script, const QJSValue& callback)
 {
-    std::unique_ptr<_javascript_CallbackData> data = "" QPointer<WPEQtView>(this));
+    std::unique_ptr<_javascript_CallbackData> data = "" QPointer<WPEQtView>(this));
     webkit_web_view_run_javascript(m_webView.get(), script.toUtf8().constData(), nullptr, jsAsyncReadyCallback, data.release());
 }
 

Modified: trunk/Source/WebKit/UIProcess/API/wpe/qt/WPEQtViewBackend.cpp (276307 => 276308)


--- trunk/Source/WebKit/UIProcess/API/wpe/qt/WPEQtViewBackend.cpp	2021-04-20 16:16:43 UTC (rev 276307)
+++ trunk/Source/WebKit/UIProcess/API/wpe/qt/WPEQtViewBackend.cpp	2021-04-20 16:50:24 UTC (rev 276308)
@@ -66,7 +66,7 @@
     if (!eglContext)
         return nullptr;
 
-    return makeUnique<WPEQtViewBackend>(size, eglDisplay, eglContext, context, view);
+    return std::make_unique<WPEQtViewBackend>(size, eglDisplay, eglContext, context, view);
 }
 
 WPEQtViewBackend::WPEQtViewBackend(const QSizeF& size, EGLDisplay display, EGLContext eglContext, QPointer<QOpenGLContext> context, QPointer<WPEQtView> view)

Modified: trunk/Source/WebKit/UIProcess/API/wpe/qt/WPEQtViewBackend.h (276307 => 276308)


--- trunk/Source/WebKit/UIProcess/API/wpe/qt/WPEQtViewBackend.h	2021-04-20 16:16:43 UTC (rev 276307)
+++ trunk/Source/WebKit/UIProcess/API/wpe/qt/WPEQtViewBackend.h	2021-04-20 16:50:24 UTC (rev 276308)
@@ -37,7 +37,6 @@
 class WPEQtView;
 
 class Q_DECL_EXPORT WPEQtViewBackend {
-    WTF_MAKE_FAST_ALLOCATED;
 public:
     static std::unique_ptr<WPEQtViewBackend> create(const QSizeF&, QPointer<QOpenGLContext>, EGLDisplay, QPointer<WPEQtView>);
     WPEQtViewBackend(const QSizeF&, EGLDisplay, EGLContext, QPointer<QOpenGLContext>, QPointer<WPEQtView>);

Modified: trunk/Source/WebKit/UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h (276307 => 276308)


--- trunk/Source/WebKit/UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h	2021-04-20 16:16:43 UTC (rev 276307)
+++ trunk/Source/WebKit/UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h	2021-04-20 16:50:24 UTC (rev 276308)
@@ -27,8 +27,6 @@
 class WPEQtViewLoadRequestPrivate;
 
 class WPEQtViewLoadRequest : public QObject {
-    WTF_MAKE_FAST_ALLOCATED;
-
     Q_OBJECT
     Q_PROPERTY(QUrl url READ url)
     Q_PROPERTY(WPEQtView::LoadStatus status READ status)

Modified: trunk/Tools/ChangeLog (276307 => 276308)


--- trunk/Tools/ChangeLog	2021-04-20 16:16:43 UTC (rev 276307)
+++ trunk/Tools/ChangeLog	2021-04-20 16:50:24 UTC (rev 276308)
@@ -1,3 +1,15 @@
+2021-04-20  Marco Felsch  <[email protected]>
+
+        [WPE][Qt] Fix build failure after r270690
+        https://bugs.webkit.org/show_bug.cgi?id=223070
+
+        Reviewed by Philippe Normand.
+
+        * Scripts/webkitpy/style/checker.py:
+
+        Add exception for WPE QT wrapper library to use system alloc instead
+        of WTF. 
+
 2021-04-19  Chris Dumez  <[email protected]>
 
         REGRESSION (r276189): GPUProcess.WebProcessTerminationAfterTooManyGPUProcessCrashes is crashing

Modified: trunk/Tools/Scripts/webkitpy/style/checker.py (276307 => 276308)


--- trunk/Tools/Scripts/webkitpy/style/checker.py	2021-04-20 16:16:43 UTC (rev 276307)
+++ trunk/Tools/Scripts/webkitpy/style/checker.py	2021-04-20 16:50:24 UTC (rev 276308)
@@ -162,6 +162,12 @@
     ["-readability/parameter_name"]),
 
     ([
+     # The WPE QT wrapper lib is not part of Webkit and therefore don't need to statically
+     # link the WTF framework. Instead it uses the standard alloc mechanism.
+     os.path.join('Source', 'WebKit', 'UIProcess', 'API', 'wpe', 'qt')],
+     ["-runtime/wtf_make_unique"]),
+
+    ([
       # The GTK+ and WPE APIs use upper case, underscore separated, words in
       # certain types of enums (e.g. signals, properties).
       os.path.join('Source', '_javascript_Core', 'API', 'glib'),
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to