Unverified Commit f1ea4850 authored by Ferhat's avatar Ferhat Committed by GitHub

[web][upstream] Don't register exit/saveCompilationTrace for web platform...

[web][upstream] Don't register exit/saveCompilationTrace for web platform since they are not available (#37812)

* Don't register N/A services exit/saveCompilationTrace for web platform
parent 7a236aed
...@@ -132,7 +132,7 @@ abstract class BindingBase { ...@@ -132,7 +132,7 @@ abstract class BindingBase {
return true; return true;
}()); }());
if (!kReleaseMode) { if (!kReleaseMode && !kIsWeb) {
registerSignalServiceExtension( registerSignalServiceExtension(
name: 'exit', name: 'exit',
callback: _exitApplication, callback: _exitApplication,
......
...@@ -453,7 +453,8 @@ void main() { ...@@ -453,7 +453,8 @@ void main() {
test('Service extensions - exit', () async { test('Service extensions - exit', () async {
// no test for _calling_ 'exit', because that should terminate the process! // no test for _calling_ 'exit', because that should terminate the process!
expect(binding.extensions.containsKey('exit'), isTrue); // Not expecting extension to be available for web platform.
expect(binding.extensions.containsKey('exit'), !isBrowser);
}); });
test('Service extensions - platformOverride', () async { test('Service extensions - platformOverride', () async {
...@@ -671,5 +672,5 @@ void main() { ...@@ -671,5 +672,5 @@ void main() {
expect(trace, contains('dart:core,Object,Object.\n')); expect(trace, contains('dart:core,Object,Object.\n'));
expect(trace, contains('package:test_api/test_api.dart,::,test\n')); expect(trace, contains('package:test_api/test_api.dart,::,test\n'));
expect(trace, contains('service_extensions_test.dart,::,main\n')); expect(trace, contains('service_extensions_test.dart,::,main\n'));
}); }, skip: isBrowser);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment