Switch over to the new name for compilation trace native function (#25594)
* Switch over to the new name for compilation trace native function. Also see: https://github.com/flutter/engine/pull/7256 * rename * roll the engine
This commit is contained in:
committed by
GitHub
parent
b6248e26b3
commit
eb7a59b6d7
@@ -1 +1 @@
|
||||
dbdb5e6f8c9fc8add75d7b5a19bdaa1144a9332e
|
||||
e859296b71def257f021ff8bd225e82209558cea
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'dart:async';
|
||||
import 'dart:convert' show json;
|
||||
import 'dart:developer' as developer;
|
||||
import 'dart:io' show exit;
|
||||
import 'dart:ui' show dumpCompilationTrace;
|
||||
import 'dart:ui' show saveCompilationTrace;
|
||||
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
@@ -119,10 +119,10 @@ abstract class BindingBase {
|
||||
callback: _exitApplication,
|
||||
);
|
||||
registerServiceExtension(
|
||||
name: 'dumpCompilationTrace',
|
||||
name: 'saveCompilationTrace',
|
||||
callback: (Map<String, String> parameters) async {
|
||||
return <String, dynamic> {
|
||||
'value': dumpCompilationTrace(),
|
||||
'value': saveCompilationTrace(),
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
@@ -527,9 +527,9 @@ void main() {
|
||||
expect(binding.frameScheduled, isFalse);
|
||||
});
|
||||
|
||||
test('Service extensions - dumpCompilationTrace', () async {
|
||||
test('Service extensions - saveCompilationTrace', () async {
|
||||
Map<String, dynamic> result;
|
||||
result = await binding.testExtension('dumpCompilationTrace', <String, String>{});
|
||||
result = await binding.testExtension('saveCompilationTrace', <String, String>{});
|
||||
final String trace = String.fromCharCodes(result['value']);
|
||||
expect(trace, contains('dart:core,Object,Object.\n'));
|
||||
expect(trace, contains('package:test_api/test_api.dart,::,test\n'));
|
||||
|
||||
@@ -490,7 +490,7 @@ abstract class ResidentRunner {
|
||||
Future<void> stop() async {
|
||||
_stopped = true;
|
||||
if (saveCompilationTrace)
|
||||
await _saveCompilationTrace();
|
||||
await _debugSaveCompilationTrace();
|
||||
await stopEchoingDeviceLog();
|
||||
await preStop();
|
||||
return stopApp();
|
||||
@@ -595,7 +595,7 @@ abstract class ResidentRunner {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _saveCompilationTrace() async {
|
||||
Future<void> _debugSaveCompilationTrace() async {
|
||||
if (!supportsServiceProtocol)
|
||||
return;
|
||||
|
||||
@@ -607,7 +607,7 @@ abstract class ResidentRunner {
|
||||
|
||||
List<int> buffer;
|
||||
try {
|
||||
buffer = await view.uiIsolate.flutterDumpCompilationTrace();
|
||||
buffer = await view.uiIsolate.flutterDebugSaveCompilationTrace();
|
||||
assert(buffer != null);
|
||||
} catch (error) {
|
||||
printError('Error communicating with Flutter on the device: $error');
|
||||
|
||||
@@ -1312,9 +1312,9 @@ class Isolate extends ServiceObjectOwner {
|
||||
);
|
||||
}
|
||||
|
||||
Future<List<int>> flutterDumpCompilationTrace() async {
|
||||
Future<List<int>> flutterDebugSaveCompilationTrace() async {
|
||||
final Map<String, dynamic> result =
|
||||
await invokeFlutterExtensionRpcRaw('ext.flutter.dumpCompilationTrace');
|
||||
await invokeFlutterExtensionRpcRaw('ext.flutter.saveCompilationTrace');
|
||||
if (result != null && result['value'] is List<dynamic>)
|
||||
return result['value'].cast<int>();
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user