Fix restart/reload benchmark synchronization (#11282) Changes introduced in https://github.com/flutter/engine/commit/8ba522eeae35d8c70ada3c7b8e200ca2274f4f95 has removed from the `_flutter.listViews` the thread synchronization side effect used during benchmarks. The thread synchronization is restored via the new `_flutter.flushUIThreadTasks` RPC. Fixes https://github.com/flutter/flutter/issues/11241 Related https://github.com/flutter/engine/pull/3898
diff --git a/packages/flutter_tools/lib/src/vmservice.dart b/packages/flutter_tools/lib/src/vmservice.dart index 8aea4b3..9b255ce 100644 --- a/packages/flutter_tools/lib/src/vmservice.dart +++ b/packages/flutter_tools/lib/src/vmservice.dart
@@ -1230,6 +1230,10 @@ bool get hasIsolate => _uiIsolate != null; + Future<Null> flushUIThreadTasks() async { + await owner.vm.invokeRpcRaw('_flutter.flushUIThreadTasks'); + } + @override String toString() => id; }