mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
Unbreak build.
Not sure how I was able to build this in the first place...
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
From 40c315ca7b3ad6ae5c98d72a6927b3a75b43cb46 Mon Sep 17 00:00:00 2001
|
||||
From: Claudio Saavedra <csaavedra@igalia.com>
|
||||
Date: Fri, 27 Mar 2026 22:09:02 +0200
|
||||
Subject: [PATCH] [GTK3] Fix the dom bindings build https://bugs.webkit.org/show_bug.cgi?id=310915
|
||||
|
||||
Index: Source/WebCore/page/UserMessageHandler.cpp
|
||||
--- Source/WebCore/page/UserMessageHandler.cpp.orig
|
||||
+++ Source/WebCore/page/UserMessageHandler.cpp
|
||||
@@ -63,16 +63,20 @@ static bool passesSameOriginCheck(JSC::JSGlobalObject&
|
||||
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::JSGlobalObje
|
||||
JSC::JSLockHolder lock(globalObject);
|
||||
promise->reject<IDLAny>(JSC::createError(globalObject, errorMessage));
|
||||
});
|
||||
+
|
||||
+ return { };
|
||||
}
|
||||
|
||||
ExceptionOr<JSC::JSValue> UserMessageHandler::postLegacySynchronousMessage(JSC::JSGlobalObject& globalObject, JSC::JSValue value)
|
||||
@@ -0,0 +1,17 @@
|
||||
From 40c315ca7b3ad6ae5c98d72a6927b3a75b43cb46 Mon Sep 17 00:00:00 2001
|
||||
From: Claudio Saavedra <csaavedra@igalia.com>
|
||||
Date: Fri, 27 Mar 2026 22:09:02 +0200
|
||||
Subject: [PATCH] [GTK3] Fix the dom bindings build https://bugs.webkit.org/show_bug.cgi?id=310915
|
||||
|
||||
Index: Source/WebCore/page/UserMessageHandler.h
|
||||
--- Source/WebCore/page/UserMessageHandler.h.orig
|
||||
+++ Source/WebCore/page/UserMessageHandler.h
|
||||
@@ -52,7 +52,7 @@ class UserMessageHandler : public RefCounted<UserMessa
|
||||
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(); }
|
||||
Reference in New Issue
Block a user