Subject: Fix the dom bindings build
From: Claudio Saavedra <[email-masked]>

===================================================================
--- webkitgtk.orig/Source/WebCore/page/UserMessageHandler.cpp
+++ webkitgtk/Source/WebCore/page/UserMessageHandler.cpp
@@ -63,16 +63,20 @@ static bool passesSameOriginCheck(JSC::J
     return securityOrigin->isSameOriginAs(frameSecurityOrigin);
 }
 
-void UserMessageHandler::postMessage(JSC::JSGlobalObject& globalObject, JSC::JSValue value, Ref<DeferredPromise>&& promise)
+ExceptionOr<void> UserMessageHandler::postMessage(JSC::JSGlobalObject& globalObject, JSC::JSValue value, Ref<DeferredPromise>&& promise)
 {
     // Check to see if the descriptor has been removed. This can happen if the host application has
     // removed the named message handler at the WebKit2 API level.
     RefPtr descriptor = m_descriptor;
-    if (!descriptor)
-        return promise->reject(Exception { ExceptionCode::InvalidAccessError });
+    if (!descriptor) {
+        promise->reject(Exception { ExceptionCode::InvalidAccessError });
+        return Exception { ExceptionCode::InvalidAccessError };
+    }
 
-    if (!passesSameOriginCheck(globalObject, m_frame.get()))
-        return promise->reject(Exception { ExceptionCode::InvalidAccessError, "Failed same-origin check."_s });
+    if (!passesSameOriginCheck(globalObject, m_frame.get())) {
+        promise->reject(Exception { ExceptionCode::InvalidAccessError, "Failed same-origin check."_s });
+        return Exception { ExceptionCode::InvalidAccessError };
+    }
 
     descriptor->didPostMessage(*this, globalObject, value, [promise = WTF::move(promise)](JSC::JSValue result, const String& errorMessage) {
         if (errorMessage.isNull())
@@ -84,6 +88,8 @@ void UserMessageHandler::postMessage(JSC
         JSC::JSLockHolder lock(globalObject);
         promise->reject<IDLAny>(JSC::createError(globalObject, errorMessage));
     });
+
+    return { };
 }
 
 ExceptionOr<JSC::JSValue> UserMessageHandler::postLegacySynchronousMessage(JSC::JSGlobalObject& globalObject, JSC::JSValue value)
Index: webkitgtk/Source/WebCore/page/UserMessageHandler.h
===================================================================
--- webkitgtk.orig/Source/WebCore/page/UserMessageHandler.h
+++ webkitgtk/Source/WebCore/page/UserMessageHandler.h
@@ -52,7 +52,7 @@ public:
     void ref() const final { RefCounted::ref(); }
     void deref() const final { RefCounted::deref(); }
 
-    void postMessage(JSC::JSGlobalObject&, JSC::JSValue, Ref<DeferredPromise>&&);
+    ExceptionOr<void> postMessage(JSC::JSGlobalObject&, JSC::JSValue, Ref<DeferredPromise>&&);
     ExceptionOr<JSC::JSValue> postLegacySynchronousMessage(JSC::JSGlobalObject&, JSC::JSValue);
 
     const UserMessageHandlerDescriptor* descriptor() const { return m_descriptor.get(); }