WebKit Bugzilla
Attachment 370563 Details for
Bug 198214
: Update messages_unittest.py after r245715
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198214-20190523223324.patch (text/plain), 4.42 KB, created by
youenn fablet
on 2019-05-23 22:33:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-05-23 22:33:25 PDT
Size:
4.42 KB
patch
obsolete
>Subversion Revision: 245568 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 4aa433e0d1bcf16045385936a2feec79459c6018..9bb316436e62a3c4e6fe882df6f5fd63148d17a6 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2019-05-23 Youenn Fablet <youenn@apple.com> >+ >+ Update messages_unittest.py after https://trac.webkit.org/changeset/245715 >+ https://bugs.webkit.org/show_bug.cgi?id=198214 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Update expected results for messages.py output. >+ Small update to messages.py so that cancelReply is called in case of decoding error. >+ >+ * Scripts/webkit/MessageReceiverSuperclass-expected.cpp: >+ (Messages::WebPage::TestAsyncMessage::callReply): >+ (Messages::WebPage::TestAsyncMessage::cancelReply): >+ (Messages::WebPage::TestAsyncMessageWithMultipleArguments::callReply): >+ (Messages::WebPage::TestAsyncMessageWithMultipleArguments::cancelReply): >+ * Scripts/webkit/messages.py: >+ > 2019-05-22 Youenn Fablet <youenn@apple.com> > > CacheStorageConnection callbacks should be completed on network connection close >diff --git a/Source/WebKit/Scripts/webkit/MessageReceiverSuperclass-expected.cpp b/Source/WebKit/Scripts/webkit/MessageReceiverSuperclass-expected.cpp >index e2f962f21aff92b21a0278290688316abcbe2d90..14212d5c8aa512805600afac9ba277bd531fa370 100644 >--- a/Source/WebKit/Scripts/webkit/MessageReceiverSuperclass-expected.cpp >+++ b/Source/WebKit/Scripts/webkit/MessageReceiverSuperclass-expected.cpp >@@ -49,6 +49,7 @@ void TestAsyncMessage::callReply(IPC::Decoder& decoder, CompletionHandler<void(u > decoder >> result; > if (!result) { > ASSERT_NOT_REACHED(); >+ cancelReply(WTFMove(completionHandler)); > return; > } > completionHandler(WTFMove(*result)); >@@ -56,7 +57,7 @@ void TestAsyncMessage::callReply(IPC::Decoder& decoder, CompletionHandler<void(u > > void TestAsyncMessage::cancelReply(CompletionHandler<void(uint64_t&&)>&& completionHandler) > { >- completionHandler({ }); >+ completionHandler(IPC::AsyncReplyError<uint64_t>::create()); > } > > void TestAsyncMessage::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, uint64_t result) >@@ -94,12 +95,14 @@ void TestAsyncMessageWithMultipleArguments::callReply(IPC::Decoder& decoder, Com > decoder >> flag; > if (!flag) { > ASSERT_NOT_REACHED(); >+ cancelReply(WTFMove(completionHandler)); > return; > } > Optional<uint64_t> value; > decoder >> value; > if (!value) { > ASSERT_NOT_REACHED(); >+ cancelReply(WTFMove(completionHandler)); > return; > } > completionHandler(WTFMove(*flag), WTFMove(*value)); >@@ -107,7 +110,7 @@ void TestAsyncMessageWithMultipleArguments::callReply(IPC::Decoder& decoder, Com > > void TestAsyncMessageWithMultipleArguments::cancelReply(CompletionHandler<void(bool&&, uint64_t&&)>&& completionHandler) > { >- completionHandler({ }, { }); >+ completionHandler(IPC::AsyncReplyError<bool>::create(), IPC::AsyncReplyError<uint64_t>::create()); > } > > void TestAsyncMessageWithMultipleArguments::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, bool flag, uint64_t value) >diff --git a/Source/WebKit/Scripts/webkit/messages.py b/Source/WebKit/Scripts/webkit/messages.py >index 52514902abbe1cc7146b43be7cd8c46bab490588..9e6e93206bdc1b01022dea5044d2833bd5e94edc 100644 >--- a/Source/WebKit/Scripts/webkit/messages.py >+++ b/Source/WebKit/Scripts/webkit/messages.py >@@ -594,9 +594,7 @@ def generate_message_handler(file): > for x in message.reply_parameters: > result.append(' Optional<%s> %s;\n' % (x.type, x.name)) > result.append(' decoder >> %s;\n' % x.name) >- result.append(' if (!%s) {\n ASSERT_NOT_REACHED();\n completionHandler(' % x.name) >- result.append(', '.join(['IPC::AsyncReplyError<' + x.type + '>::create()' for x in message.reply_parameters])) >- result.append(');\n return;\n }\n') >+ result.append(' if (!%s) {\n ASSERT_NOT_REACHED();\n cancelReply(WTFMove(completionHandler));\n return;\n }\n' % x.name) > result.append(' completionHandler(') > if len(message.reply_parameters): > result.append('WTFMove(*%s)' % ('), WTFMove(*'.join(x.name for x in message.reply_parameters)))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198214
:
370563
|
370577