Compare commits
23 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8db4cd4e2 | ||
|
|
ee3003b84b | ||
|
|
434b597cb9 | ||
|
|
265780f742 | ||
|
|
b79929e5eb | ||
|
|
8f4b0ae5da | ||
|
|
3f02e0172c | ||
|
|
ab829bd6be | ||
|
|
3e3df3fef1 | ||
|
|
520712bd1c | ||
|
|
fd050d83e6 | ||
|
|
2abffaa4af | ||
|
|
80cede840d | ||
|
|
dc72cf7a20 | ||
|
|
c4a08e2797 | ||
|
|
249aefb8cb | ||
|
|
db8404586b | ||
|
|
38532b3cd8 | ||
|
|
cca73d6fb0 | ||
|
|
1bdb288d59 | ||
|
|
4c15545597 | ||
|
|
9674b58471 | ||
|
|
4fecf60d86 |
13 changed files with 18485 additions and 648 deletions
19
.gitignore
vendored
19
.gitignore
vendored
|
|
@ -51,3 +51,22 @@
|
|||
/webkitgtk-2.15.3.tar.xz
|
||||
/webkitgtk-2.15.4.tar.xz
|
||||
/webkitgtk-2.15.90.tar.xz
|
||||
/webkitgtk-2.15.91.tar.xz
|
||||
/webkitgtk-2.15.92.tar.xz
|
||||
/webkitgtk-2.16.0.tar.xz
|
||||
/webkitgtk-2.16.1.tar.xz
|
||||
/webkitgtk-2.16.2.tar.xz
|
||||
/webkitgtk-2.16.3.tar.xz
|
||||
/webkitgtk-2.16.4.tar.xz
|
||||
/webkitgtk-2.16.5.tar.xz
|
||||
/webkitgtk-2.16.6.tar.xz
|
||||
/webkitgtk-2.18.0.tar.xz
|
||||
/webkitgtk-2.18.1.tar.xz
|
||||
/webkitgtk-2.18.2.tar.xz
|
||||
/webkitgtk-2.18.3.tar.xz
|
||||
/webkitgtk-2.18.4.tar.xz
|
||||
/webkitgtk-2.18.5.tar.xz
|
||||
/webkitgtk-2.18.6.tar.xz
|
||||
/webkitgtk-2.20.0.tar.xz
|
||||
/webkitgtk-2.20.1.tar.xz
|
||||
/webkitgtk-2.20.2.tar.xz
|
||||
|
|
|
|||
|
|
@ -1,589 +0,0 @@
|
|||
From 7e013c8c5ff959cd71a939a4795ef7dfc18a51f1 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Garcia Campos <cgarcia@igalia.com>
|
||||
Date: Fri, 24 Feb 2017 13:03:14 +0100
|
||||
Subject: [PATCH] [GTK] Hangs when showing Google search results
|
||||
|
||||
https://bugs.webkit.org/show_bug.cgi?id=168699
|
||||
|
||||
Reviewed by NOBODY (OOPS!).
|
||||
|
||||
Connection::sendOutgoingMessage() can poll forever if sendmsg fails with EAGAIN or EWOULDBLOCK. For example if
|
||||
socket read buffers are full, poll will be blocked until we read the pending data, but we can't read because
|
||||
the thread is blocked in the poll. In case of EAGAIN/EWOULDBLOCK we should poll using the run loop, to allow
|
||||
reads to happen in thread while we wait for the socket to be writable again. In the GTK+ port we use
|
||||
GSocketMonitor to poll socket file descriptor without blocking, using the run loop. This patch renames the
|
||||
socket monitor as readSocketMonitor and adds another one for polling output. When sendmsg fails with
|
||||
EAGAIN/EWOULDBLOCK, the pending message is saved and the write monitor starts polling. Once the socket is
|
||||
writable again we send the pending message. Helper class MessageInfo and a new one UnixMessage have been moved
|
||||
to its own header file to be able to use std::unique_ptr member to save the pending message.
|
||||
|
||||
* Platform/IPC/Connection.cpp: Include UnixMessage.h as required by std::unique_ptr.
|
||||
* Platform/IPC/Connection.h: Add write socket monitor and also keep the GSocket as a member to reuse it.
|
||||
* Platform/IPC/glib/GSocketMonitor.cpp: Use Function instead of std::function.
|
||||
(IPC::GSocketMonitor::start):
|
||||
* Platform/IPC/glib/GSocketMonitor.h:
|
||||
* Platform/IPC/unix/ConnectionUnix.cpp:
|
||||
(IPC::Connection::platformInitialize): Initialize the GSocket here since we rely on it to take the ownership of
|
||||
the descriptor. We were leaking it if the connection was invalidated without being opened.
|
||||
(IPC::Connection::platformInvalidate): Destroy the GSocket even when not connected. Also stop the write monitor.
|
||||
(IPC::Connection::processMessage):
|
||||
(IPC::Connection::open):
|
||||
(IPC::Connection::platformCanSendOutgoingMessages): Return false if we have a pending message to ensure
|
||||
Connection doesn't try to send more messages until the pending message is dispatched. We don't need to check
|
||||
m_isConnected because the caller already checks that.
|
||||
(IPC::Connection::sendOutgoingMessage): Split it in two. This creates and prepares a UnixMessage and then calls
|
||||
sendOutputMessage() to do the rest.
|
||||
(IPC::Connection::sendOutputMessage): Send the message, or save it if sendmsg fails with EAGAIN or EWOULDBLOCK
|
||||
to be sent later when the socket is writable.
|
||||
* Platform/IPC/unix/UnixMessage.h: Added.
|
||||
(IPC::MessageInfo::MessageInfo):
|
||||
(IPC::MessageInfo::setMessageBodyIsOutOfLine):
|
||||
(IPC::MessageInfo::isMessageBodyIsOutOfLine):
|
||||
(IPC::MessageInfo::bodySize):
|
||||
(IPC::MessageInfo::attachmentCount):
|
||||
(IPC::UnixMessage::UnixMessage):
|
||||
(IPC::UnixMessage::~UnixMessage):
|
||||
(IPC::UnixMessage::attachments):
|
||||
(IPC::UnixMessage::messageInfo):
|
||||
(IPC::UnixMessage::body):
|
||||
(IPC::UnixMessage::bodySize):
|
||||
(IPC::UnixMessage::appendAttachment):
|
||||
* PlatformGTK.cmake:
|
||||
---
|
||||
Source/WebKit2/Platform/IPC/Connection.cpp | 4 +
|
||||
Source/WebKit2/Platform/IPC/Connection.h | 7 +-
|
||||
.../WebKit2/Platform/IPC/glib/GSocketMonitor.cpp | 2 +-
|
||||
Source/WebKit2/Platform/IPC/glib/GSocketMonitor.h | 4 +-
|
||||
.../WebKit2/Platform/IPC/unix/ConnectionUnix.cpp | 140 ++++++++++-----------
|
||||
Source/WebKit2/Platform/IPC/unix/UnixMessage.h | 113 +++++++++++++++++
|
||||
Source/WebKit2/PlatformGTK.cmake | 1 +
|
||||
7 files changed, 194 insertions(+), 77 deletions(-)
|
||||
create mode 100644 Source/WebKit2/Platform/IPC/unix/UnixMessage.h
|
||||
|
||||
diff --git a/Source/WebKit2/Platform/IPC/Connection.cpp b/Source/WebKit2/Platform/IPC/Connection.cpp
|
||||
index daa6510..baf5306 100644
|
||||
--- a/Source/WebKit2/Platform/IPC/Connection.cpp
|
||||
+++ b/Source/WebKit2/Platform/IPC/Connection.cpp
|
||||
@@ -39,6 +39,10 @@
|
||||
#include "MachMessage.h"
|
||||
#endif
|
||||
|
||||
+#if USE(UNIX_DOMAIN_SOCKETS)
|
||||
+#include "UnixMessage.h"
|
||||
+#endif
|
||||
+
|
||||
namespace IPC {
|
||||
|
||||
struct Connection::ReplyHandler {
|
||||
diff --git a/Source/WebKit2/Platform/IPC/Connection.h b/Source/WebKit2/Platform/IPC/Connection.h
|
||||
index 87a3d91..a5a8ad7 100644
|
||||
--- a/Source/WebKit2/Platform/IPC/Connection.h
|
||||
+++ b/Source/WebKit2/Platform/IPC/Connection.h
|
||||
@@ -79,6 +79,7 @@ enum class WaitForOption {
|
||||
while (0)
|
||||
|
||||
class MachMessage;
|
||||
+class UnixMessage;
|
||||
|
||||
class Connection : public ThreadSafeRefCounted<Connection> {
|
||||
public:
|
||||
@@ -308,12 +309,16 @@ private:
|
||||
// Called on the connection queue.
|
||||
void readyReadHandler();
|
||||
bool processMessage();
|
||||
+ bool sendOutputMessage(UnixMessage&);
|
||||
|
||||
Vector<uint8_t> m_readBuffer;
|
||||
Vector<int> m_fileDescriptors;
|
||||
int m_socketDescriptor;
|
||||
+ std::unique_ptr<UnixMessage> m_pendingOutputMessage;
|
||||
#if PLATFORM(GTK)
|
||||
- GSocketMonitor m_socketMonitor;
|
||||
+ GRefPtr<GSocket> m_socket;
|
||||
+ GSocketMonitor m_readSocketMonitor;
|
||||
+ GSocketMonitor m_writeSocketMonitor;
|
||||
#endif
|
||||
#elif OS(DARWIN)
|
||||
// Called on the connection queue.
|
||||
diff --git a/Source/WebKit2/Platform/IPC/glib/GSocketMonitor.cpp b/Source/WebKit2/Platform/IPC/glib/GSocketMonitor.cpp
|
||||
index 0faf266..14329b9 100644
|
||||
--- a/Source/WebKit2/Platform/IPC/glib/GSocketMonitor.cpp
|
||||
+++ b/Source/WebKit2/Platform/IPC/glib/GSocketMonitor.cpp
|
||||
@@ -42,7 +42,7 @@ gboolean GSocketMonitor::socketSourceCallback(GSocket*, GIOCondition condition,
|
||||
return monitor->m_callback(condition);
|
||||
}
|
||||
|
||||
-void GSocketMonitor::start(GSocket* socket, GIOCondition condition, RunLoop& runLoop, std::function<gboolean (GIOCondition)>&& callback)
|
||||
+void GSocketMonitor::start(GSocket* socket, GIOCondition condition, RunLoop& runLoop, Function<gboolean (GIOCondition)>&& callback)
|
||||
{
|
||||
stop();
|
||||
|
||||
diff --git a/Source/WebKit2/Platform/IPC/glib/GSocketMonitor.h b/Source/WebKit2/Platform/IPC/glib/GSocketMonitor.h
|
||||
index 11e528a..ff37bf9 100644
|
||||
--- a/Source/WebKit2/Platform/IPC/glib/GSocketMonitor.h
|
||||
+++ b/Source/WebKit2/Platform/IPC/glib/GSocketMonitor.h
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
GSocketMonitor() = default;
|
||||
~GSocketMonitor();
|
||||
|
||||
- void start(GSocket*, GIOCondition, RunLoop&, std::function<gboolean (GIOCondition)>&&);
|
||||
+ void start(GSocket*, GIOCondition, RunLoop&, Function<gboolean (GIOCondition)>&&);
|
||||
void stop();
|
||||
|
||||
private:
|
||||
@@ -51,7 +51,7 @@ private:
|
||||
|
||||
GRefPtr<GSource> m_source;
|
||||
GRefPtr<GCancellable> m_cancellable;
|
||||
- std::function<gboolean (GIOCondition)> m_callback;
|
||||
+ Function<gboolean (GIOCondition)> m_callback;
|
||||
};
|
||||
|
||||
} // namespace IPC
|
||||
diff --git a/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp b/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp
|
||||
index fcd1047..0e04238 100644
|
||||
--- a/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp
|
||||
+++ b/Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "DataReference.h"
|
||||
#include "SharedMemory.h"
|
||||
+#include "UnixMessage.h"
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
@@ -60,60 +61,20 @@ namespace IPC {
|
||||
static const size_t messageMaxSize = 4096;
|
||||
static const size_t attachmentMaxAmount = 255;
|
||||
|
||||
-enum {
|
||||
- MessageBodyIsOutOfLine = 1U << 31
|
||||
-};
|
||||
-
|
||||
-class MessageInfo {
|
||||
-public:
|
||||
- MessageInfo() { }
|
||||
-
|
||||
- MessageInfo(size_t bodySize, size_t initialAttachmentCount)
|
||||
- : m_bodySize(bodySize)
|
||||
- , m_attachmentCount(initialAttachmentCount)
|
||||
- , m_isMessageBodyOutOfLine(false)
|
||||
- {
|
||||
- }
|
||||
-
|
||||
- void setMessageBodyIsOutOfLine()
|
||||
- {
|
||||
- ASSERT(!isMessageBodyIsOutOfLine());
|
||||
-
|
||||
- m_isMessageBodyOutOfLine = true;
|
||||
- m_attachmentCount++;
|
||||
- }
|
||||
-
|
||||
- bool isMessageBodyIsOutOfLine() const { return m_isMessageBodyOutOfLine; }
|
||||
-
|
||||
- size_t bodySize() const { return m_bodySize; }
|
||||
-
|
||||
- size_t attachmentCount() const { return m_attachmentCount; }
|
||||
-
|
||||
-private:
|
||||
- size_t m_bodySize;
|
||||
- size_t m_attachmentCount;
|
||||
- bool m_isMessageBodyOutOfLine;
|
||||
-};
|
||||
-
|
||||
class AttachmentInfo {
|
||||
WTF_MAKE_FAST_ALLOCATED;
|
||||
public:
|
||||
- AttachmentInfo()
|
||||
- : m_type(Attachment::Uninitialized)
|
||||
- , m_size(0)
|
||||
- , m_isNull(false)
|
||||
- {
|
||||
- }
|
||||
+ AttachmentInfo() = default;
|
||||
|
||||
void setType(Attachment::Type type) { m_type = type; }
|
||||
- Attachment::Type getType() { return m_type; }
|
||||
+ Attachment::Type type() const { return m_type; }
|
||||
void setSize(size_t size)
|
||||
{
|
||||
ASSERT(m_type == Attachment::MappedMemoryType);
|
||||
m_size = size;
|
||||
}
|
||||
|
||||
- size_t getSize()
|
||||
+ size_t size() const
|
||||
{
|
||||
ASSERT(m_type == Attachment::MappedMemoryType);
|
||||
return m_size;
|
||||
@@ -121,25 +82,30 @@ public:
|
||||
|
||||
// The attachment is not null unless explicitly set.
|
||||
void setNull() { m_isNull = true; }
|
||||
- bool isNull() { return m_isNull; }
|
||||
+ bool isNull() const { return m_isNull; }
|
||||
|
||||
private:
|
||||
- Attachment::Type m_type;
|
||||
- size_t m_size;
|
||||
- bool m_isNull;
|
||||
+ Attachment::Type m_type { Attachment::Uninitialized };
|
||||
+ size_t m_size { 0 };
|
||||
+ bool m_isNull { false };
|
||||
};
|
||||
|
||||
void Connection::platformInitialize(Identifier identifier)
|
||||
{
|
||||
m_socketDescriptor = identifier;
|
||||
+#if PLATFORM(GTK)
|
||||
+ m_socket = adoptGRef(g_socket_new_from_fd(m_socketDescriptor, nullptr));
|
||||
+#endif
|
||||
m_readBuffer.reserveInitialCapacity(messageMaxSize);
|
||||
m_fileDescriptors.reserveInitialCapacity(attachmentMaxAmount);
|
||||
}
|
||||
|
||||
void Connection::platformInvalidate()
|
||||
{
|
||||
- // In GTK+ platform the socket is closed by the work queue.
|
||||
-#if !PLATFORM(GTK)
|
||||
+#if PLATFORM(GTK)
|
||||
+ // In GTK+ platform the socket descriptor is owned by GSocket.
|
||||
+ m_socket = nullptr;
|
||||
+#else
|
||||
if (m_socketDescriptor != -1)
|
||||
closeWithRetry(m_socketDescriptor);
|
||||
#endif
|
||||
@@ -148,7 +114,8 @@ void Connection::platformInvalidate()
|
||||
return;
|
||||
|
||||
#if PLATFORM(GTK)
|
||||
- m_socketMonitor.stop();
|
||||
+ m_readSocketMonitor.stop();
|
||||
+ m_writeSocketMonitor.stop();
|
||||
#endif
|
||||
|
||||
m_socketDescriptor = -1;
|
||||
@@ -165,7 +132,7 @@ bool Connection::processMessage()
|
||||
memcpy(&messageInfo, messageData, sizeof(messageInfo));
|
||||
messageData += sizeof(messageInfo);
|
||||
|
||||
- size_t messageLength = sizeof(MessageInfo) + messageInfo.attachmentCount() * sizeof(AttachmentInfo) + (messageInfo.isMessageBodyIsOutOfLine() ? 0 : messageInfo.bodySize());
|
||||
+ size_t messageLength = sizeof(MessageInfo) + messageInfo.attachmentCount() * sizeof(AttachmentInfo) + (messageInfo.isBodyOutOfLine() ? 0 : messageInfo.bodySize());
|
||||
if (m_readBuffer.size() < messageLength)
|
||||
return false;
|
||||
|
||||
@@ -179,7 +146,7 @@ bool Connection::processMessage()
|
||||
messageData += sizeof(AttachmentInfo) * attachmentCount;
|
||||
|
||||
for (size_t i = 0; i < attachmentCount; ++i) {
|
||||
- switch (attachmentInfo[i].getType()) {
|
||||
+ switch (attachmentInfo[i].type()) {
|
||||
case Attachment::MappedMemoryType:
|
||||
case Attachment::SocketType:
|
||||
if (!attachmentInfo[i].isNull())
|
||||
@@ -191,7 +158,7 @@ bool Connection::processMessage()
|
||||
}
|
||||
}
|
||||
|
||||
- if (messageInfo.isMessageBodyIsOutOfLine())
|
||||
+ if (messageInfo.isBodyOutOfLine())
|
||||
attachmentCount--;
|
||||
}
|
||||
|
||||
@@ -201,11 +168,11 @@ bool Connection::processMessage()
|
||||
size_t fdIndex = 0;
|
||||
for (size_t i = 0; i < attachmentCount; ++i) {
|
||||
int fd = -1;
|
||||
- switch (attachmentInfo[i].getType()) {
|
||||
+ switch (attachmentInfo[i].type()) {
|
||||
case Attachment::MappedMemoryType:
|
||||
if (!attachmentInfo[i].isNull())
|
||||
fd = m_fileDescriptors[fdIndex++];
|
||||
- attachments[attachmentCount - i - 1] = Attachment(fd, attachmentInfo[i].getSize());
|
||||
+ attachments[attachmentCount - i - 1] = Attachment(fd, attachmentInfo[i].size());
|
||||
break;
|
||||
case Attachment::SocketType:
|
||||
if (!attachmentInfo[i].isNull())
|
||||
@@ -219,7 +186,7 @@ bool Connection::processMessage()
|
||||
}
|
||||
}
|
||||
|
||||
- if (messageInfo.isMessageBodyIsOutOfLine()) {
|
||||
+ if (messageInfo.isBodyOutOfLine()) {
|
||||
ASSERT(messageInfo.bodySize());
|
||||
|
||||
if (attachmentInfo[attachmentCount].isNull()) {
|
||||
@@ -228,7 +195,7 @@ bool Connection::processMessage()
|
||||
}
|
||||
|
||||
WebKit::SharedMemory::Handle handle;
|
||||
- handle.adoptAttachment(IPC::Attachment(m_fileDescriptors[attachmentFileDescriptorCount - 1], attachmentInfo[attachmentCount].getSize()));
|
||||
+ handle.adoptAttachment(IPC::Attachment(m_fileDescriptors[attachmentFileDescriptorCount - 1], attachmentInfo[attachmentCount].size()));
|
||||
|
||||
oolMessageBody = WebKit::SharedMemory::map(handle, WebKit::SharedMemory::Protection::ReadOnly);
|
||||
if (!oolMessageBody) {
|
||||
@@ -237,10 +204,10 @@ bool Connection::processMessage()
|
||||
}
|
||||
}
|
||||
|
||||
- ASSERT(attachments.size() == (messageInfo.isMessageBodyIsOutOfLine() ? messageInfo.attachmentCount() - 1 : messageInfo.attachmentCount()));
|
||||
+ ASSERT(attachments.size() == (messageInfo.isBodyOutOfLine() ? messageInfo.attachmentCount() - 1 : messageInfo.attachmentCount()));
|
||||
|
||||
uint8_t* messageBody = messageData;
|
||||
- if (messageInfo.isMessageBodyIsOutOfLine())
|
||||
+ if (messageInfo.isBodyOutOfLine())
|
||||
messageBody = reinterpret_cast<uint8_t*>(oolMessageBody->data());
|
||||
|
||||
auto decoder = std::make_unique<Decoder>(messageBody, messageInfo.bodySize(), nullptr, WTFMove(attachments));
|
||||
@@ -365,8 +332,7 @@ bool Connection::open()
|
||||
RefPtr<Connection> protectedThis(this);
|
||||
m_isConnected = true;
|
||||
#if PLATFORM(GTK)
|
||||
- GRefPtr<GSocket> socket = adoptGRef(g_socket_new_from_fd(m_socketDescriptor, nullptr));
|
||||
- m_socketMonitor.start(socket.get(), G_IO_IN, m_connectionQueue->runLoop(), [protectedThis] (GIOCondition condition) -> gboolean {
|
||||
+ m_readSocketMonitor.start(m_socket.get(), G_IO_IN, m_connectionQueue->runLoop(), [protectedThis] (GIOCondition condition) -> gboolean {
|
||||
if (condition & G_IO_HUP || condition & G_IO_ERR || condition & G_IO_NVAL) {
|
||||
protectedThis->connectionDidClose();
|
||||
return G_SOURCE_REMOVE;
|
||||
@@ -392,22 +358,21 @@ bool Connection::open()
|
||||
|
||||
bool Connection::platformCanSendOutgoingMessages() const
|
||||
{
|
||||
- return m_isConnected;
|
||||
+ return !m_pendingOutputMessage;
|
||||
}
|
||||
|
||||
bool Connection::sendOutgoingMessage(std::unique_ptr<Encoder> encoder)
|
||||
{
|
||||
COMPILE_ASSERT(sizeof(MessageInfo) + attachmentMaxAmount * sizeof(size_t) <= messageMaxSize, AttachmentsFitToMessageInline);
|
||||
|
||||
- Vector<Attachment> attachments = encoder->releaseAttachments();
|
||||
- if (attachments.size() > (attachmentMaxAmount - 1)) {
|
||||
+ UnixMessage outputMessage(encoder.get());
|
||||
+ if (outputMessage.attachments().size() > (attachmentMaxAmount - 1)) {
|
||||
ASSERT_NOT_REACHED();
|
||||
return false;
|
||||
}
|
||||
|
||||
- MessageInfo messageInfo(encoder->bufferSize(), attachments.size());
|
||||
- size_t messageSizeWithBodyInline = sizeof(messageInfo) + (attachments.size() * sizeof(AttachmentInfo)) + encoder->bufferSize();
|
||||
- if (messageSizeWithBodyInline > messageMaxSize && encoder->bufferSize()) {
|
||||
+ size_t messageSizeWithBodyInline = sizeof(MessageInfo) + (outputMessage.attachments().size() * sizeof(AttachmentInfo)) + outputMessage.bodySize();
|
||||
+ if (messageSizeWithBodyInline > messageMaxSize && outputMessage.bodySize()) {
|
||||
RefPtr<WebKit::SharedMemory> oolMessageBody = WebKit::SharedMemory::allocate(encoder->bufferSize());
|
||||
if (!oolMessageBody)
|
||||
return false;
|
||||
@@ -416,13 +381,21 @@ bool Connection::sendOutgoingMessage(std::unique_ptr<Encoder> encoder)
|
||||
if (!oolMessageBody->createHandle(handle, WebKit::SharedMemory::Protection::ReadOnly))
|
||||
return false;
|
||||
|
||||
- messageInfo.setMessageBodyIsOutOfLine();
|
||||
+ outputMessage.messageInfo().setBodyOutOfLine();
|
||||
|
||||
- memcpy(oolMessageBody->data(), encoder->buffer(), encoder->bufferSize());
|
||||
+ memcpy(oolMessageBody->data(), outputMessage.body(), outputMessage.bodySize());
|
||||
|
||||
- attachments.append(handle.releaseAttachment());
|
||||
+ outputMessage.appendAttachment(handle.releaseAttachment());
|
||||
}
|
||||
|
||||
+ return sendOutputMessage(outputMessage);
|
||||
+}
|
||||
+
|
||||
+bool Connection::sendOutputMessage(UnixMessage& outputMessage)
|
||||
+{
|
||||
+ ASSERT(!m_pendingOutputMessage);
|
||||
+
|
||||
+ auto& messageInfo = outputMessage.messageInfo();
|
||||
struct msghdr message;
|
||||
memset(&message, 0, sizeof(message));
|
||||
|
||||
@@ -438,6 +411,7 @@ bool Connection::sendOutgoingMessage(std::unique_ptr<Encoder> encoder)
|
||||
std::unique_ptr<AttachmentInfo[]> attachmentInfo;
|
||||
MallocPtr<char> attachmentFDBuffer;
|
||||
|
||||
+ auto& attachments = outputMessage.attachments();
|
||||
if (!attachments.isEmpty()) {
|
||||
int* fdPtr = 0;
|
||||
|
||||
@@ -488,9 +462,9 @@ bool Connection::sendOutgoingMessage(std::unique_ptr<Encoder> encoder)
|
||||
++iovLength;
|
||||
}
|
||||
|
||||
- if (!messageInfo.isMessageBodyIsOutOfLine() && encoder->bufferSize()) {
|
||||
- iov[iovLength].iov_base = reinterpret_cast<void*>(encoder->buffer());
|
||||
- iov[iovLength].iov_len = encoder->bufferSize();
|
||||
+ if (!messageInfo.isBodyOutOfLine() && outputMessage.bodySize()) {
|
||||
+ iov[iovLength].iov_base = reinterpret_cast<void*>(outputMessage.body());
|
||||
+ iov[iovLength].iov_len = outputMessage.bodySize();
|
||||
++iovLength;
|
||||
}
|
||||
|
||||
@@ -500,6 +474,25 @@ bool Connection::sendOutgoingMessage(std::unique_ptr<Encoder> encoder)
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
||||
+#if PLATFORM(GTK)
|
||||
+ m_pendingOutputMessage = std::make_unique<UnixMessage>(WTFMove(outputMessage));
|
||||
+ m_writeSocketMonitor.start(m_socket.get(), G_IO_OUT, m_connectionQueue->runLoop(), [this, protectedThis = makeRef(*this)] (GIOCondition condition) -> gboolean {
|
||||
+ if (condition & G_IO_OUT) {
|
||||
+ ASSERT(m_pendingOutputMessage);
|
||||
+ // We can't stop the monitor from this lambda, because stop destroys the lambda.
|
||||
+ m_connectionQueue->dispatch([this, protectedThis = makeRef(*this)] {
|
||||
+ m_writeSocketMonitor.stop();
|
||||
+ auto message = WTFMove(m_pendingOutputMessage);
|
||||
+ if (m_isConnected) {
|
||||
+ sendOutputMessage(*message);
|
||||
+ sendOutgoingMessages();
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ return G_SOURCE_REMOVE;
|
||||
+ });
|
||||
+ return false;
|
||||
+#else
|
||||
struct pollfd pollfd;
|
||||
|
||||
pollfd.fd = m_socketDescriptor;
|
||||
@@ -507,6 +500,7 @@ bool Connection::sendOutgoingMessage(std::unique_ptr<Encoder> encoder)
|
||||
pollfd.revents = 0;
|
||||
poll(&pollfd, 1, -1);
|
||||
continue;
|
||||
+#endif
|
||||
}
|
||||
|
||||
if (m_isConnected)
|
||||
diff --git a/Source/WebKit2/Platform/IPC/unix/UnixMessage.h b/Source/WebKit2/Platform/IPC/unix/UnixMessage.h
|
||||
new file mode 100644
|
||||
index 0000000..e99a0a4
|
||||
--- /dev/null
|
||||
+++ b/Source/WebKit2/Platform/IPC/unix/UnixMessage.h
|
||||
@@ -0,0 +1,113 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
|
||||
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
|
||||
+ * Copyright (C) 2011,2017 Igalia S.L.
|
||||
+ *
|
||||
+ * Redistribution and use in source and binary forms, with or without
|
||||
+ * modification, are permitted provided that the following conditions
|
||||
+ * are met:
|
||||
+ * 1. Redistributions of source code must retain the above copyright
|
||||
+ * notice, this list of conditions and the following disclaimer.
|
||||
+ * 2. Redistributions in binary form must reproduce the above copyright
|
||||
+ * notice, this list of conditions and the following disclaimer in the
|
||||
+ * documentation and/or other materials provided with the distribution.
|
||||
+ *
|
||||
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
|
||||
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
|
||||
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
+ * THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+ */
|
||||
+
|
||||
+#pragma once
|
||||
+
|
||||
+#include "Attachment.h"
|
||||
+#include <wtf/Vector.h>
|
||||
+
|
||||
+namespace IPC {
|
||||
+
|
||||
+class MessageInfo {
|
||||
+public:
|
||||
+ MessageInfo() = default;
|
||||
+
|
||||
+ MessageInfo(size_t bodySize, size_t initialAttachmentCount)
|
||||
+ : m_bodySize(bodySize)
|
||||
+ , m_attachmentCount(initialAttachmentCount)
|
||||
+ {
|
||||
+ }
|
||||
+
|
||||
+ void setBodyOutOfLine()
|
||||
+ {
|
||||
+ ASSERT(!isBodyOutOfLine());
|
||||
+
|
||||
+ m_isBodyOutOfLine = true;
|
||||
+ m_attachmentCount++;
|
||||
+ }
|
||||
+
|
||||
+ bool isBodyOutOfLine() const { return m_isBodyOutOfLine; }
|
||||
+ size_t bodySize() const { return m_bodySize; }
|
||||
+ size_t attachmentCount() const { return m_attachmentCount; }
|
||||
+
|
||||
+private:
|
||||
+ size_t m_bodySize { 0 };
|
||||
+ size_t m_attachmentCount { 0 };
|
||||
+ bool m_isBodyOutOfLine { false };
|
||||
+};
|
||||
+
|
||||
+class UnixMessage {
|
||||
+ WTF_MAKE_FAST_ALLOCATED;
|
||||
+public:
|
||||
+ UnixMessage(Encoder* encoder)
|
||||
+ : m_attachments(encoder->releaseAttachments())
|
||||
+ , m_messageInfo(encoder->bufferSize(), m_attachments.size())
|
||||
+ , m_body(encoder->buffer())
|
||||
+ {
|
||||
+ }
|
||||
+
|
||||
+ UnixMessage(UnixMessage&& other)
|
||||
+ {
|
||||
+ m_attachments = WTFMove(other.m_attachments);
|
||||
+ m_messageInfo = WTFMove(other.m_messageInfo);
|
||||
+ if (other.m_bodyOwned) {
|
||||
+ std::swap(m_body, other.m_body);
|
||||
+ std::swap(m_bodyOwned, other.m_bodyOwned);
|
||||
+ } else if (!m_messageInfo.isBodyOutOfLine()) {
|
||||
+ m_body = static_cast<uint8_t*>(fastMalloc(m_messageInfo.bodySize()));
|
||||
+ memcpy(m_body, other.m_body, m_messageInfo.bodySize());
|
||||
+ m_bodyOwned = true;
|
||||
+ other.m_body = nullptr;
|
||||
+ other.m_bodyOwned = false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ~UnixMessage()
|
||||
+ {
|
||||
+ if (m_bodyOwned)
|
||||
+ fastFree(m_body);
|
||||
+ }
|
||||
+
|
||||
+ const Vector<Attachment>& attachments() const { return m_attachments; }
|
||||
+ MessageInfo& messageInfo() { return m_messageInfo; }
|
||||
+
|
||||
+ uint8_t* body() const { return m_body; }
|
||||
+ size_t bodySize() const { return m_messageInfo.bodySize(); }
|
||||
+
|
||||
+ void appendAttachment(Attachment&& attachment)
|
||||
+ {
|
||||
+ m_attachments.append(WTFMove(attachment));
|
||||
+ }
|
||||
+
|
||||
+private:
|
||||
+ Vector<Attachment> m_attachments;
|
||||
+ MessageInfo m_messageInfo;
|
||||
+ uint8_t* m_body { nullptr };
|
||||
+ bool m_bodyOwned { false };
|
||||
+};
|
||||
+
|
||||
+} // namespace IPC
|
||||
diff --git a/Source/WebKit2/PlatformGTK.cmake b/Source/WebKit2/PlatformGTK.cmake
|
||||
index ebede75..2c6bc5f 100644
|
||||
--- a/Source/WebKit2/PlatformGTK.cmake
|
||||
+++ b/Source/WebKit2/PlatformGTK.cmake
|
||||
@@ -850,6 +850,7 @@ list(APPEND WebKit2_INCLUDE_DIRECTORIES
|
||||
"${WEBKIT2_DIR}/NetworkProcess/soup"
|
||||
"${WEBKIT2_DIR}/NetworkProcess/unix"
|
||||
"${WEBKIT2_DIR}/Platform/IPC/glib"
|
||||
+ "${WEBKIT2_DIR}/Platform/IPC/unix"
|
||||
"${WEBKIT2_DIR}/Shared/API/c/gtk"
|
||||
"${WEBKIT2_DIR}/Shared/Plugins/unix"
|
||||
"${WEBKIT2_DIR}/Shared/glib"
|
||||
--
|
||||
2.11.1
|
||||
|
||||
111
0001-GTK-Require-woff2-1.0.2-and-drop-direct-brotli-depen.patch
Normal file
111
0001-GTK-Require-woff2-1.0.2-and-drop-direct-brotli-depen.patch
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
From aacbb7501a1c9b16a73211a8a67ff5b028e92988 Mon Sep 17 00:00:00 2001
|
||||
From: "mcatanzaro@igalia.com"
|
||||
<mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
|
||||
Date: Tue, 14 Nov 2017 00:42:20 +0000
|
||||
Subject: [PATCH] [GTK] Require woff2 1.0.2 and drop direct brotli dependency
|
||||
https://bugs.webkit.org/show_bug.cgi?id=179630
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Reviewed by Frédéric Wang.
|
||||
|
||||
.:
|
||||
|
||||
* Source/cmake/FindBrotliDec.cmake: Removed.
|
||||
* Source/cmake/OptionsGTK.cmake:
|
||||
|
||||
Tools:
|
||||
|
||||
* gtk/jhbuild.modules:
|
||||
|
||||
|
||||
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@224793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
|
||||
---
|
||||
ChangeLog | 10 ++++++++
|
||||
Source/cmake/FindBrotliDec.cmake | 53 ----------------------------------------
|
||||
Source/cmake/OptionsGTK.cmake | 6 +----
|
||||
Tools/ChangeLog | 9 +++++++
|
||||
Tools/gtk/jhbuild.modules | 2 +-
|
||||
5 files changed, 21 insertions(+), 59 deletions(-)
|
||||
delete mode 100644 Source/cmake/FindBrotliDec.cmake
|
||||
|
||||
diff --git a/Source/cmake/FindBrotliDec.cmake b/Source/cmake/FindBrotliDec.cmake
|
||||
deleted file mode 100644
|
||||
index 3a8cf90357f..00000000000
|
||||
--- a/Source/cmake/FindBrotliDec.cmake
|
||||
+++ /dev/null
|
||||
@@ -1,53 +0,0 @@
|
||||
-# - Try to find BrotliDec.
|
||||
-# Once done, this will define
|
||||
-#
|
||||
-# BROTLIDEC_FOUND - system has BrotliDec.
|
||||
-# BROTLIDEC_INCLUDE_DIRS - the BrotliDec include directories
|
||||
-# BROTLIDEC_LIBRARIES - link these to use BrotliDec.
|
||||
-#
|
||||
-# Copyright (C) 2017 Igalia S.L.
|
||||
-#
|
||||
-# Redistribution and use in source and binary forms, with or without
|
||||
-# modification, are permitted provided that the following conditions
|
||||
-# are met:
|
||||
-# 1. Redistributions of source code must retain the above copyright
|
||||
-# notice, this list of conditions and the following disclaimer.
|
||||
-# 2. Redistributions in binary form must reproduce the above copyright
|
||||
-# notice, this list of conditions and the following disclaimer in the
|
||||
-# documentation and/or other materials provided with the distribution.
|
||||
-#
|
||||
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
|
||||
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
|
||||
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
-
|
||||
-find_package(PkgConfig)
|
||||
-pkg_check_modules(PC_BROTLIDEC libbrotlidec)
|
||||
-
|
||||
-find_path(BROTLIDEC_INCLUDE_DIRS
|
||||
- NAMES brotli/decode.h
|
||||
- HINTS ${PC_BROTLIDEC_INCLUDEDIR}
|
||||
-)
|
||||
-
|
||||
-find_library(BROTLIDEC_LIBRARIES
|
||||
- NAMES brotlidec
|
||||
- HINTS ${PC_BROTLIDEC_LIBDIR}
|
||||
-)
|
||||
-
|
||||
-include(FindPackageHandleStandardArgs)
|
||||
-find_package_handle_standard_args(BrotliDec
|
||||
- REQUIRED_VARS BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES
|
||||
- FOUND_VAR BROTLIDEC_FOUND
|
||||
- VERSION_VAR PC_BROTLIDEC_VERSION)
|
||||
-
|
||||
-mark_as_advanced(
|
||||
- BROTLIDEC_INCLUDE_DIRS
|
||||
- BROTLIDEC_LIBRARIES
|
||||
-)
|
||||
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
|
||||
index ba7e134c7cc..39c3a9be47e 100644
|
||||
--- a/Source/cmake/OptionsGTK.cmake
|
||||
+++ b/Source/cmake/OptionsGTK.cmake
|
||||
@@ -365,11 +365,7 @@ if (USE_UPOWER)
|
||||
endif ()
|
||||
|
||||
if (USE_WOFF2)
|
||||
- find_package(BrotliDec 1.0.1)
|
||||
- if (NOT BROTLIDEC_FOUND)
|
||||
- message(FATAL_ERROR "libbrotlidec is needed for USE_WOFF2.")
|
||||
- endif ()
|
||||
- find_package(WOFF2Dec 1.0.1)
|
||||
+ find_package(WOFF2Dec 1.0.2)
|
||||
if (NOT WOFF2DEC_FOUND)
|
||||
message(FATAL_ERROR "libwoff2dec is needed for USE_WOFF2.")
|
||||
endif ()
|
||||
--
|
||||
2.16.2
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
From ecbb859d88eacad10bf556044abaeaed6c9b32fc Mon Sep 17 00:00:00 2001
|
||||
From: "berto@igalia.com"
|
||||
<berto@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
|
||||
Date: Thu, 2 Nov 2017 13:41:16 +0000
|
||||
Subject: [PATCH] Unreviewed, fix typos in library names for the GTK+ port.
|
||||
|
||||
* Source/cmake/OptionsGTK.cmake:
|
||||
|
||||
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@224329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
|
||||
---
|
||||
ChangeLog | 6 ++++++
|
||||
Source/cmake/OptionsGTK.cmake | 4 ++--
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
|
||||
index 2b440a27376..6c99868ae86 100644
|
||||
--- a/Source/cmake/OptionsGTK.cmake
|
||||
+++ b/Source/cmake/OptionsGTK.cmake
|
||||
@@ -367,11 +367,11 @@ endif ()
|
||||
if (USE_WOFF2)
|
||||
find_package(BrotliDec 1.0.1)
|
||||
if (NOT BROTLIDEC_FOUND)
|
||||
- message(FATAL_ERROR "librotlidec is needed for USE_WOFF2.")
|
||||
+ message(FATAL_ERROR "libbrotlidec is needed for USE_WOFF2.")
|
||||
endif ()
|
||||
find_package(WOFF2Dec 1.0.1)
|
||||
if (NOT WOFF2DEC_FOUND)
|
||||
- message(FATAL_ERROR "liwoff2dec is needed for USE_WOFF2.")
|
||||
+ message(FATAL_ERROR "libwoff2dec is needed for USE_WOFF2.")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
--
|
||||
2.16.2
|
||||
|
||||
30
cloop-big-endians.patch
Normal file
30
cloop-big-endians.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
diff -up webkitgtk-2.14.7/Source/JavaScriptCore/bytecode/CodeBlock.cpp.b132333 webkitgtk-2.14.7/Source/JavaScriptCore/bytecode/CodeBlock.cpp
|
||||
--- webkitgtk-2.14.7/Source/JavaScriptCore/bytecode/CodeBlock.cpp.b132333 2017-02-07 09:05:07.000000000 +0100
|
||||
+++ webkitgtk-2.14.7/Source/JavaScriptCore/bytecode/CodeBlock.cpp 2017-06-16 10:34:57.859748036 +0200
|
||||
@@ -2186,7 +2186,12 @@ void CodeBlock::finishCreation(VM& vm, S
|
||||
instructions[i + 5].u.watchpointSet = op.watchpointSet;
|
||||
else if (op.structure)
|
||||
instructions[i + 5].u.structure.set(vm, this, op.structure);
|
||||
- instructions[i + 6].u.pointer = reinterpret_cast<void*>(op.operand);
|
||||
+
|
||||
+ if (op.type == ClosureVar || op.type == ClosureVarWithVarInjectionChecks || op.type == GlobalProperty || op.type == GlobalPropertyWithVarInjectionChecks || op.type == ModuleVar)
|
||||
+ instructions[i + 6].u.operand = op.operand;
|
||||
+ else
|
||||
+ instructions[i + 6].u.pointer = reinterpret_cast<void*>(op.operand);
|
||||
+
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2222,7 +2227,11 @@ void CodeBlock::finishCreation(VM& vm, S
|
||||
op.watchpointSet->invalidate(vm, PutToScopeFireDetail(this, ident));
|
||||
} else if (op.structure)
|
||||
instructions[i + 5].u.structure.set(vm, this, op.structure);
|
||||
- instructions[i + 6].u.pointer = reinterpret_cast<void*>(op.operand);
|
||||
+
|
||||
+ if (op.type == ClosureVar || op.type == ClosureVarWithVarInjectionChecks || op.type == GlobalProperty || op.type == GlobalPropertyWithVarInjectionChecks || op.type == ModuleVar)
|
||||
+ instructions[i + 6].u.operand = op.operand;
|
||||
+ else
|
||||
+ instructions[i + 6].u.pointer = reinterpret_cast<void*>(op.operand);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -1,39 +1,24 @@
|
|||
From e583c6f7deb86406f7e0375c560503858f4831ca Mon Sep 17 00:00:00 2001
|
||||
From: Michael Catanzaro <mcatanzaro@igalia.com>
|
||||
Date: Sun, 19 Jun 2016 21:10:03 -0500
|
||||
Subject: [PATCH] https://fedoraproject.org/wiki/Packaging:CryptoPolicies
|
||||
|
||||
---
|
||||
Source/WebKit2/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp | 2 +-
|
||||
Source/WebKit2/WebProcess/EntryPoint/unix/WebProcessMain.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Source/WebKit2/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp b/Source/WebKit2/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
|
||||
index b282e16..ed8bbbd 100644
|
||||
--- a/Source/WebKit2/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
|
||||
+++ b/Source/WebKit2/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
|
||||
@@ -39,7 +39,7 @@ int main(int argc, char** argv)
|
||||
diff -up webkitgtk-2.17.92/Source/WebKit/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp.fedora-crypto-policy webkitgtk-2.17.92/Source/WebKit/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
|
||||
--- webkitgtk-2.17.92/Source/WebKit/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp.fedora-crypto-policy 2017-09-05 13:39:59.294426661 +0200
|
||||
+++ webkitgtk-2.17.92/Source/WebKit/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp 2017-09-05 13:40:09.144389997 +0200
|
||||
@@ -43,7 +43,7 @@ int main(int argc, char** argv)
|
||||
// overwrite this priority string if it's already set by the user.
|
||||
// https://bugzilla.gnome.org/show_bug.cgi?id=738633
|
||||
// WARNING: This needs to be KEPT IN SYNC with WebProcessMain.cpp.
|
||||
- setenv("G_TLS_GNUTLS_PRIORITY", "NORMAL:%COMPAT:%LATEST_RECORD_VERSION:!VERS-SSL3.0:!ARCFOUR-128", 0);
|
||||
+ setenv("G_TLS_GNUTLS_PRIORITY", "@SYSTEM:%COMPAT:%LATEST_RECORD_VERSION:!VERS-SSL3.0:!ARCFOUR-128", 0);
|
||||
- setenv("G_TLS_GNUTLS_PRIORITY", "NORMAL:%COMPAT:!VERS-SSL3.0:!ARCFOUR-128", 0);
|
||||
+ setenv("G_TLS_GNUTLS_PRIORITY", "@SYSTEM:%COMPAT:!VERS-SSL3.0:!ARCFOUR-128", 0);
|
||||
|
||||
return NetworkProcessMainUnix(argc, argv);
|
||||
}
|
||||
diff --git a/Source/WebKit2/WebProcess/EntryPoint/unix/WebProcessMain.cpp b/Source/WebKit2/WebProcess/EntryPoint/unix/WebProcessMain.cpp
|
||||
index 5f45d01..2b34ead 100644
|
||||
--- a/Source/WebKit2/WebProcess/EntryPoint/unix/WebProcessMain.cpp
|
||||
+++ b/Source/WebKit2/WebProcess/EntryPoint/unix/WebProcessMain.cpp
|
||||
@@ -39,7 +39,7 @@ int main(int argc, char** argv)
|
||||
#if USE(GCRYPT)
|
||||
PAL::GCrypt::initialize();
|
||||
diff -up webkitgtk-2.17.92/Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp.fedora-crypto-policy webkitgtk-2.17.92/Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp
|
||||
--- webkitgtk-2.17.92/Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp.fedora-crypto-policy 2017-09-05 13:40:28.558317735 +0200
|
||||
+++ webkitgtk-2.17.92/Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp 2017-09-05 13:40:56.057215378 +0200
|
||||
@@ -43,7 +43,7 @@ int main(int argc, char** argv)
|
||||
// overwrite this priority string if it's already set by the user.
|
||||
// https://bugzilla.gnome.org/show_bug.cgi?id=738633
|
||||
// WARNING: This needs to be KEPT IN SYNC with WebProcessMain.cpp.
|
||||
- setenv("G_TLS_GNUTLS_PRIORITY", "NORMAL:%COMPAT:%LATEST_RECORD_VERSION:!VERS-SSL3.0:!ARCFOUR-128", 0);
|
||||
+ setenv("G_TLS_GNUTLS_PRIORITY", "@SYSTEM:%COMPAT:%LATEST_RECORD_VERSION:!VERS-SSL3.0:!ARCFOUR-128", 0);
|
||||
- setenv("G_TLS_GNUTLS_PRIORITY", "NORMAL:%COMPAT:!VERS-SSL3.0:!ARCFOUR-128", 0);
|
||||
+ setenv("G_TLS_GNUTLS_PRIORITY", "@SYSTEM:%COMPAT:!VERS-SSL3.0:!ARCFOUR-128", 0);
|
||||
|
||||
return WebProcessMainUnix(argc, argv);
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
|
||||
#if USE(GCRYPT)
|
||||
PAL::GCrypt::initialize();
|
||||
|
|
|
|||
12
gcc7.patch
12
gcc7.patch
|
|
@ -1,12 +0,0 @@
|
|||
diff -up webkitgtk-2.15.90/Source/cmake/OptionsCommon.cmake.gcc7 webkitgtk-2.15.90/Source/cmake/OptionsCommon.cmake
|
||||
--- webkitgtk-2.15.90/Source/cmake/OptionsCommon.cmake.gcc7 2017-02-21 09:57:13.168916004 +0100
|
||||
+++ webkitgtk-2.15.90/Source/cmake/OptionsCommon.cmake 2017-02-21 09:58:12.811563156 +0100
|
||||
@@ -41,6 +41,8 @@ if (COMPILER_IS_GCC_OR_CLANG)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-exceptions -fno-strict-aliasing")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-strict-aliasing -fno-rtti")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
|
||||
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-expansion-to-defined")
|
||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-expansion-to-defined")
|
||||
endif ()
|
||||
|
||||
if (COMPILER_IS_CLANG AND CMAKE_GENERATOR STREQUAL "Ninja")
|
||||
12
page-size.patch
Normal file
12
page-size.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up webkitgtk-2.19.91/Source/JavaScriptCore/heap/MarkedBlock.h.page_size webkitgtk-2.19.91/Source/JavaScriptCore/heap/MarkedBlock.h
|
||||
--- webkitgtk-2.19.91/Source/JavaScriptCore/heap/MarkedBlock.h.page_size 2018-02-21 09:55:37.388754142 +0100
|
||||
+++ webkitgtk-2.19.91/Source/JavaScriptCore/heap/MarkedBlock.h 2018-02-21 09:55:51.789690916 +0100
|
||||
@@ -67,7 +67,7 @@ private:
|
||||
friend class Handle;
|
||||
public:
|
||||
static constexpr size_t atomSize = 16; // bytes
|
||||
- static constexpr size_t blockSize = 16 * KB;
|
||||
+ static constexpr size_t blockSize = 64 * KB;
|
||||
static constexpr size_t blockMask = ~(blockSize - 1); // blockSize must be a power of two.
|
||||
|
||||
static constexpr size_t atomsPerBlock = blockSize / atomSize;
|
||||
12853
remove_brotli.patch
Normal file
12853
remove_brotli.patch
Normal file
File diff suppressed because one or more lines are too long
5289
remove_woff2.patch
Normal file
5289
remove_woff2.patch
Normal file
File diff suppressed because it is too large
Load diff
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (webkitgtk-2.15.90.tar.xz) = f06bbde9ed06fb7ba426629e130d2a1a9f9d137a864d5f6874f1a0c14dde043a51ffe9ea31f3be5252f852621ddcef5385f75f8624cdc2e1f357cd14c839a4cc
|
||||
SHA512 (webkitgtk-2.20.2.tar.xz) = 8b8078994d0fe9a759d7062e6fe528edbe8931a3a0a198b4d9b9459417ee0521d964746341bfa5813469129bfa4c52d648d7016481f9e57c4f7355931c93a847
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
diff -up webkitgtk-2.14.1/Source/WebCore/platform/gtk/UserAgentGtk.cpp.orig webkitgtk-2.14.1/Source/WebCore/platform/gtk/UserAgentGtk.cpp
|
||||
--- webkitgtk-2.14.1/Source/WebCore/platform/gtk/UserAgentGtk.cpp.orig 2016-10-12 07:59:25.670057792 +0200
|
||||
+++ webkitgtk-2.14.1/Source/WebCore/platform/gtk/UserAgentGtk.cpp 2016-10-12 08:01:06.251878684 +0200
|
||||
diff -up webkitglib-2.14.1/Source/WebCore/platform/glib/UserAgentGLib.cpp.orig webkitglib-2.14.1/Source/WebCore/platform/glib/UserAgentGLib.cpp
|
||||
--- webkitglib-2.14.1/Source/WebCore/platform/glib/UserAgentGLib.cpp.orig 2016-10-12 07:59:25.670057792 +0200
|
||||
+++ webkitglib-2.14.1/Source/WebCore/platform/glib/UserAgentGLib.cpp 2016-10-12 08:01:06.251878684 +0200
|
||||
@@ -85,6 +85,9 @@ static String buildUserAgentString(const UserAgentQuirks& quirks)
|
||||
else {
|
||||
uaString.append(platformForUAString());
|
||||
128
webkitgtk4.spec
128
webkitgtk4.spec
|
|
@ -6,8 +6,8 @@
|
|||
cp -p %1 _license_files/$(echo '%1' | sed -e 's!/!.!g')
|
||||
|
||||
Name: webkitgtk4
|
||||
Version: 2.15.90
|
||||
Release: 2%{?dist}
|
||||
Version: 2.20.2
|
||||
Release: 1%{?dist}
|
||||
Summary: GTK+ Web content engine library
|
||||
|
||||
License: LGPLv2
|
||||
|
|
@ -15,14 +15,26 @@ URL: http://www.webkitgtk.org/
|
|||
Source0: http://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz
|
||||
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=162611
|
||||
Patch0: webkitgtk-2.14.1-user-agent-branding.patch
|
||||
Patch0: user-agent-branding.patch
|
||||
# https://fedoraproject.org/wiki/Packaging:CryptoPolicies
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=158785
|
||||
Patch1: fedora-crypto-policy.patch
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=167643
|
||||
Patch2: gcc7.patch
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=168699
|
||||
Patch3: 0001-GTK-Hangs-when-showing-Google-search-results.patch
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=132333
|
||||
Patch2: cloop-big-endians.patch
|
||||
# Silly workaround for
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=182923
|
||||
Patch3: page-size.patch
|
||||
|
||||
# Revert woff2 and brotli removal to bundle them again, as they are not
|
||||
# included in F26 and F27.
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=179630
|
||||
Patch4: 0001-GTK-Require-woff2-1.0.2-and-drop-direct-brotli-depen.patch
|
||||
# https://trac.webkit.org/changeset/224329
|
||||
Patch5: 0001-Unreviewed-fix-typos-in-library-names-for-the-GTK-po.patch
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=177862
|
||||
Patch6: remove_woff2.patch
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=177804
|
||||
Patch7: remove_brotli.patch
|
||||
|
||||
BuildRequires: at-spi2-core-devel
|
||||
BuildRequires: bison
|
||||
|
|
@ -39,6 +51,7 @@ BuildRequires: gobject-introspection-devel
|
|||
BuildRequires: gperf
|
||||
BuildRequires: gstreamer1-devel
|
||||
BuildRequires: gstreamer1-plugins-base-devel
|
||||
BuildRequires: gstreamer1-plugins-bad-free-devel
|
||||
BuildRequires: gtk2-devel
|
||||
BuildRequires: gtk3-devel
|
||||
BuildRequires: gtk-doc
|
||||
|
|
@ -55,7 +68,9 @@ BuildRequires: libXt-devel
|
|||
BuildRequires: libwayland-client-devel
|
||||
BuildRequires: libwayland-egl-devel
|
||||
BuildRequires: libwayland-server-devel
|
||||
BuildRequires: mesa-libEGL-devel
|
||||
BuildRequires: mesa-libGL-devel
|
||||
BuildRequires: mesa-libGLES-devel
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: perl-Switch
|
||||
BuildRequires: perl-JSON-PP
|
||||
|
|
@ -98,6 +113,7 @@ This package contains WebKitGTK+ for GTK+ 3.
|
|||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-jsc%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-jsc-devel%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
|
|
@ -129,18 +145,38 @@ files for developing applications that use JavaScript engine from %{name}.
|
|||
%package plugin-process-gtk2
|
||||
Summary: GTK+ 2 based NPAPI plugins support for %{name}
|
||||
Obsoletes: %{name} < 2.12.0-3
|
||||
Requires: %{name}-jsc%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description plugin-process-gtk2
|
||||
Support for the GTK+ 2 based NPAPI plugins (such as Adobe Flash) for %{name}.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n webkitgtk-%{version}
|
||||
%setup -q -n webkitgtk-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%ifarch ppc %{power64} s390 %{s390x}
|
||||
%patch3 -p1
|
||||
%endif
|
||||
%patch4 -R -p1 -b .woff2_1.0.2
|
||||
%patch5 -R -p1 -b .typos
|
||||
%patch6 -p1 -b .remove_woff2
|
||||
%patch7 -p1 -b .remove_brotli
|
||||
|
||||
# Remove bundled libraries
|
||||
rm -rf Source/ThirdParty/gtest/
|
||||
rm -rf Source/ThirdParty/qunit/
|
||||
|
||||
%build
|
||||
# Increase the DIE limit so our debuginfo packages could be size optimized.
|
||||
# Decreases the size for x86_64 from ~5G to ~1.1G.
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1456261
|
||||
%global _dwz_max_die_limit 250000000
|
||||
# The _dwz_max_die_limit is being overridden by the arch specific ones from the
|
||||
# redhat-rpm-config so we need to set the arch specific ones as well - now it
|
||||
# is only needed for x86_64.
|
||||
%global _dwz_max_die_limit_x86_64 250000000
|
||||
|
||||
%ifarch s390 aarch64
|
||||
# Use linker flags to reduce memory consumption - on other arches the ld.gold is
|
||||
# used and also it doesn't have the --reduce-memory-overheads option
|
||||
|
|
@ -175,10 +211,8 @@ pushd %{_target_platform}
|
|||
%ifarch s390 aarch64
|
||||
-DUSE_LD_GOLD=OFF \
|
||||
%endif
|
||||
%ifarch s390 s390x ppc %{power64} aarch64 %{mips}
|
||||
%ifarch s390 s390x ppc %{power64}
|
||||
-DENABLE_JIT=OFF \
|
||||
%endif
|
||||
%ifarch s390 s390x ppc %{power64} aarch64 %{mips}
|
||||
-DUSE_SYSTEM_MALLOC=ON \
|
||||
%endif
|
||||
..
|
||||
|
|
@ -195,14 +229,19 @@ make %{?_smp_mflags} -C %{_target_platform}
|
|||
%add_to_license_files Source/JavaScriptCore/COPYING.LIB
|
||||
%add_to_license_files Source/JavaScriptCore/icu/LICENSE
|
||||
%add_to_license_files Source/ThirdParty/ANGLE/LICENSE
|
||||
%add_to_license_files Source/ThirdParty/ANGLE/src/common/third_party/smhasher/LICENSE
|
||||
%add_to_license_files Source/ThirdParty/ANGLE/src/third_party/compiler/LICENSE
|
||||
%add_to_license_files Source/ThirdParty/ANGLE/src/third_party/murmurhash/LICENSE
|
||||
%add_to_license_files Source/ThirdParty/ANGLE/src/third_party/libXNVCtrl/LICENSE
|
||||
%add_to_license_files Source/ThirdParty/brotli/LICENSE
|
||||
%add_to_license_files Source/ThirdParty/woff2/LICENSE
|
||||
%add_to_license_files Source/WebCore/icu/LICENSE
|
||||
%add_to_license_files Source/WebCore/LICENSE-APPLE
|
||||
%add_to_license_files Source/WebCore/LICENSE-LGPL-2
|
||||
%add_to_license_files Source/WebCore/LICENSE-LGPL-2.1
|
||||
%add_to_license_files Source/WebInspectorUI/UserInterface/External/CodeMirror/LICENSE
|
||||
%add_to_license_files Source/WebInspectorUI/UserInterface/External/ESLint/LICENSE
|
||||
%add_to_license_files Source/WebInspectorUI/UserInterface/External/Esprima/LICENSE
|
||||
%add_to_license_files Source/WebInspectorUI/UserInterface/External/three.js/LICENSE
|
||||
%add_to_license_files Source/WTF/icu/LICENSE
|
||||
%add_to_license_files Source/WTF/wtf/dtoa/COPYING
|
||||
%add_to_license_files Source/WTF/wtf/dtoa/LICENSE
|
||||
|
|
@ -222,6 +261,7 @@ make %{?_smp_mflags} -C %{_target_platform}
|
|||
%{_libdir}/girepository-1.0/WebKit2WebExtension-4.0.typelib
|
||||
%{_libdir}/webkit2gtk-4.0/
|
||||
%{_libexecdir}/webkit2gtk-4.0/
|
||||
%{_bindir}/WebKitWebDriver
|
||||
%exclude %{_libexecdir}/webkit2gtk-4.0/WebKitPluginProcess2
|
||||
|
||||
%files devel
|
||||
|
|
@ -257,6 +297,70 @@ make %{?_smp_mflags} -C %{_target_platform}
|
|||
%{_datadir}/gtk-doc/html/webkitdomgtk-4.0/
|
||||
|
||||
%changelog
|
||||
* Wed May 09 2018 Tomas Popela <tpopela@redhat.com> - 2.20.2-1
|
||||
- Update to 2.20.2
|
||||
|
||||
* Tue Apr 10 2018 Tomas Popela <tpopela@redhat.com> - 2.20.1-1
|
||||
- Update to 2.20.1
|
||||
|
||||
* Mon Mar 12 2018 Tomas Popela <tpopela@redhat.com> - 2.20.0-1
|
||||
- Update to 2.20.0
|
||||
|
||||
* Wed Jan 24 2018 Tomas Popela <tpopela@redhat.com> - 2.18.6-1
|
||||
- Update to 2.18.6
|
||||
|
||||
* Wed Jan 10 2018 Tomas Popela <tpopela@redhat.com> - 2.18.5-1
|
||||
- Update to 2.18.5
|
||||
|
||||
* Tue Dec 19 2017 Tomas Popela <tpopela@redhat.com> - 2.18.4-1
|
||||
- Update to 2.18.4
|
||||
|
||||
* Mon Nov 13 2017 Tomas Popela <tpopela@redhat.com> - 2.18.3-1
|
||||
- Update to 2.18.3
|
||||
|
||||
* Fri Oct 27 2017 Tomas Popela <tpopela@redhat.com> - 2.18.2-1
|
||||
- Update to 2.18.2
|
||||
|
||||
* Wed Oct 18 2017 Tomas Popela <tpopela@redhat.com> - 2.18.1-1
|
||||
- Update to 2.18.1
|
||||
|
||||
* Mon Sep 11 2017 Tomas Popela <tpopela@redhat.com> - 2.18.0-1
|
||||
- Update to 2.18.0
|
||||
|
||||
* Mon Jul 24 2017 Tomas Popela <tpopela@redhat.com> - 2.16.6-1
|
||||
- Update to 2.16.6
|
||||
|
||||
* Tue Jun 27 2017 Tomas Popela <tpopela@redhat.com> - 2.16.5-1
|
||||
- Update to 2.16.5
|
||||
|
||||
* Tue Jun 20 2017 Tomas Popela <tpopela@redhat.com> - 2.16.4-1
|
||||
- Update to 2.16.4
|
||||
- Fix CLoop crashes on big endian arches
|
||||
|
||||
* Wed May 24 2017 Tomas Popela <tpopela@redhat.com> - 2.16.3-1
|
||||
- Update to 2.16.3
|
||||
|
||||
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.16.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
|
||||
|
||||
* Tue May 09 2017 Michael Catanzaro <mcatanzaro@igalia.com> - 2.16.2-1
|
||||
- Update to 2.16.2
|
||||
|
||||
* Thu Apr 06 2017 Tomas Popela <tpopela@redhat.com> - 2.16.1-2
|
||||
- Add patch for freezing regression
|
||||
|
||||
* Tue Apr 04 2017 Tomas Popela <tpopela@redhat.com> - 2.16.1-1
|
||||
- Update to 2.16.1
|
||||
|
||||
* Mon Mar 20 2017 Tomas Popela <tpopela@redhat.com> - 2.16.0-1
|
||||
- Update to 2.16.0
|
||||
|
||||
* Tue Mar 14 2017 Tomas Popela <tpopela@redhat.com> - 2.15.92-1
|
||||
- Update to 2.15.92
|
||||
|
||||
* Wed Mar 01 2017 Tomas Popela <tpopela@redhat.com> - 2.15.91-1
|
||||
- Update to 2.15.91
|
||||
|
||||
* Fri Feb 24 2017 Bastien Nocera <bnocera@redhat.com> - 2.15.90-2
|
||||
- Add patch to fix hangs when showing the Google search page
|
||||
|
||||
|
|
|
|||
Reference in a new issue