Register reload sources call and make 'r' restart for web (#39950)
This commit is contained in:
@@ -43,11 +43,6 @@ class DwdsWebRunnerFactory extends WebRunnerFactory {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(jonahwilliams): remove this constant when the error message is removed.
|
||||
// The web engine is currently spamming this message on certain pages. Filter it out
|
||||
// until we remove it entirely. See flutter/flutter##37625.
|
||||
const String _kBadError = 'WARNING: 3D transformation matrix was passed to BitmapCanvas.';
|
||||
|
||||
/// A hot-runner which handles browser specific delegation.
|
||||
class ResidentWebRunner extends ResidentRunner {
|
||||
ResidentWebRunner(this.device, {
|
||||
@@ -207,11 +202,9 @@ class ResidentWebRunner extends ResidentRunner {
|
||||
if (supportsServiceProtocol) {
|
||||
_stdOutSub = _debugConnection.vmService.onStdoutEvent.listen((vmservice.Event log) {
|
||||
final String message = utf8.decode(base64.decode(log.bytes)).trim();
|
||||
// TODO(jonahwilliams): remove this error once it is gone from the engine #37625.
|
||||
if (!message.contains(_kBadError)) {
|
||||
printStatus(message);
|
||||
}
|
||||
printStatus(message);
|
||||
});
|
||||
unawaited(_debugConnection.vmService.registerService('reloadSources', 'FlutterTools'));
|
||||
websocketUri = Uri.parse(_debugConnection.uri);
|
||||
}
|
||||
if (websocketUri != null) {
|
||||
@@ -232,9 +225,6 @@ class ResidentWebRunner extends ResidentRunner {
|
||||
String reason,
|
||||
bool benchmarkMode = false,
|
||||
}) async {
|
||||
if (!fullRestart) {
|
||||
return OperationResult(1, 'hot reload not supported on the web.');
|
||||
}
|
||||
final Stopwatch timer = Stopwatch()..start();
|
||||
final Status status = logger.startProgress(
|
||||
'Performing hot restart...',
|
||||
|
||||
Reference in New Issue
Block a user