c83eeac5b8
Calling `postEvent()` or `registerExtension()` from the dart:developer library now sends messages via global functions that can be set by the development infrastructure. For example, these hooks are set by package:dwds. When there is no debugger attached to the app, calling `postEvent()` or `registerExtension()` will produce a warning once each to avoid spamming the debug log with messages that do nothing. For backwards compatibility, when a debugger is attached but the hooks have not defined continue to write the events to the console.debug log. This support will be removed when package:dwds no longer reads from the log. https://github.com/dart-lang/webdev/issues/1342 Change-Id: I126446666b5a85c68424546b8b1198d1582bba74 Issue: https://github.com/flutter/flutter/issues/75225 Fixes: https://github.com/dart-lang/sdk/issues/36143 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202540 Commit-Queue: Nicholas Shahan <nshahan@google.com> Reviewed-by: Gary Roumanis <grouma@google.com> Reviewed-by: Mark Zhou <markzipan@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>