-
Notifications
You must be signed in to change notification settings - Fork 6k
[macos] Revert check on FlutterCodecs and refactor message function] #10009
Conversation
| FlutterEngineResult result = FlutterEngineSendPlatformMessage(_engine, &platformMessage); | ||
| if (result != kSuccess) { | ||
| NSLog(@"Failed to send message to Flutter engine on channel '%@' (%d).", channel, result); | ||
| if (!callback) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This moves the code duplication into the same method, rather than removing it. We should have a single copy of the code that calls FlutterEngineSendPlatformMessage, checks the return value, and logs. The conditional part should be populating the reply in the message (and then cleaning it up).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| captures->reply = callback; | ||
| auto message_reply = [](const uint8_t* data, size_t data_size, void* user_data) { | ||
| auto captures = reinterpret_cast<Captures*>(user_data); | ||
| NSData* reply_data = [NSData dataWithBytes:(void*)data length:data_size]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, missed this: use static_cast, not a C-style cast.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
This broke channels_integration_test_ios test on flutter engine roll. |
|
It looks like the FlutterCodecs.mm change was restoring the old behavior, but the FlutterChannels.mm change isn't; I missed that in review. Maybe that's the reason for failures. Do you have links to the failure details? |
|
Given that those are flutter build dashboard failures you should be able to get to the logs from https://flutter-dashboard.appspot.com/build.html for red box on channels_integration_test_ios column. |
…nction] (flutter#10009)" This reverts commit bd38702.
No description provided.