[macos] Revert check on FlutterCodecs and refactor message function]#10009
[macos] Revert check on FlutterCodecs and refactor message function]#10009franciscojma86 merged 3 commits intoflutter:masterfrom
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.
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).
| 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.
Sorry, missed this: use static_cast, not a C-style cast.
|
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.