[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andersca at apple.com
andersca at apple.com
Wed Dec 22 15:18:06 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 88152edc3e837d995f15f4720ea57055d4de89fe
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 29 23:37:17 2010 +0000
Generate a DelayedReply struct for sync messages marked delayed
https://bugs.webkit.org/show_bug.cgi?id=48696
Reviewed by Adam Roben.
* Scripts/webkit2/messages.py:
If we encounter a sync message marked delayed, generate a DelayedReply struct with a send member funciton
that can be used for sending the reply.
* Scripts/webkit2/messages_unittest.py:
Update expected results.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 85a6134..eeff561 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,20 @@
Reviewed by Adam Roben.
+ Generate a DelayedReply struct for sync messages marked delayed
+ https://bugs.webkit.org/show_bug.cgi?id=48696
+
+ * Scripts/webkit2/messages.py:
+ If we encounter a sync message marked delayed, generate a DelayedReply struct with a send member funciton
+ that can be used for sending the reply.
+
+ * Scripts/webkit2/messages_unittest.py:
+ Update expected results.
+
+2010-10-29 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Adam Roben.
+
Use WebPage::send in a couple of more places.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
diff --git a/WebKit2/Scripts/webkit2/messages.py b/WebKit2/Scripts/webkit2/messages.py
index 05b6332..455f9f2 100644
--- a/WebKit2/Scripts/webkit2/messages.py
+++ b/WebKit2/Scripts/webkit2/messages.py
@@ -211,7 +211,30 @@ def message_to_struct_declaration(message):
result.append(' {\n')
result.append(' static const Kind messageID = %s;\n' % message.id())
if message.reply_parameters != None:
- result.append(' typedef %s Reply;\n' % reply_type(message))
+ if message.delayed:
+ send_parameters = [(function_parameter_type(x.type), x.name) for x in message.reply_parameters]
+ result.append(' struct DelayedReply {\n')
+ result.append(' DelayedReply(PassRefPtr<CoreIPC::Connection> connection, PassOwnPtr<CoreIPC::ArgumentDecoder> arguments)\n')
+ result.append(' : m_connection(connection)\n')
+ result.append(' , m_arguments(arguments)\n')
+ result.append(' {\n')
+ result.append(' }\n')
+ result.append('\n')
+ result.append(' bool send(%s)\n' % ', '.join([' '.join(x) for x in send_parameters]))
+ result.append(' {\n')
+ result.append(' ASSERT(m_arguments);\n')
+ result += [' m_arguments->encode(%s);\n' % x.name for x in message.reply_parameters]
+ result.append(' bool result = m_connection->sendSyncReply(m_arguments.release());\n')
+ result.append(' m_connection = nullptr;\n')
+ result.append(' return result;\n')
+ result.append(' }\n')
+ result.append('\n')
+ result.append(' private:\n')
+ result.append(' RefPtr<CoreIPC::Connection> m_connection;\n')
+ result.append(' OwnPtr<CoreIPC::ArgumentDecoder> m_arguments;\n')
+ result.append(' };\n\n')
+ else:
+ result.append(' typedef %s Reply;\n' % reply_type(message))
result.append(' typedef %s DecodeType;\n' % decode_type(message))
if len(function_parameters):
diff --git a/WebKit2/Scripts/webkit2/messages_unittest.py b/WebKit2/Scripts/webkit2/messages_unittest.py
index 8cf7edd..cd5d09d 100644
--- a/WebKit2/Scripts/webkit2/messages_unittest.py
+++ b/WebKit2/Scripts/webkit2/messages_unittest.py
@@ -388,7 +388,27 @@ struct GetPlugins : CoreIPC::Arguments1<bool> {
struct GetPluginProcessConnection : CoreIPC::Arguments1<const WTF::String&> {
static const Kind messageID = GetPluginProcessConnectionID;
- typedef CoreIPC::Arguments1<CoreIPC::Connection::Handle&> Reply;
+ struct DelayedReply {
+ DelayedReply(PassRefPtr<CoreIPC::Connection> connection, PassOwnPtr<CoreIPC::ArgumentDecoder> arguments)
+ : m_connection(connection)
+ , m_arguments(arguments)
+ {
+ }
+
+ bool send(const CoreIPC::Connection::Handle& connectionHandle)
+ {
+ ASSERT(m_arguments);
+ m_arguments->encode(connectionHandle);
+ bool result = m_connection->sendSyncReply(m_arguments.release());
+ m_connection = nullptr;
+ return result;
+ }
+
+ private:
+ RefPtr<CoreIPC::Connection> m_connection;
+ OwnPtr<CoreIPC::ArgumentDecoder> m_arguments;
+ };
+
typedef CoreIPC::Arguments1<const WTF::String&> DecodeType;
explicit GetPluginProcessConnection(const WTF::String& pluginPath)
: CoreIPC::Arguments1<const WTF::String&>(pluginPath)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list