This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Fixes hot restart correctly reset the browser history#24377
Merged
fluttergithubbot merged 2 commits intoFeb 17, 2021
Conversation
chunhtai
commented
Feb 12, 2021
| // This extension does not need to clean-up Dart statics. Those are cleaned | ||
| // up by the compiler. | ||
| developer.registerExtension('ext.flutter.disassemble', (_, __) { | ||
| window.resetHistory(); |
Contributor
Author
There was a problem hiding this comment.
Hi @mdebbar is there a way to test this? I couldn't find an example to trigger hard reload during the test.
Contributor
There was a problem hiding this comment.
I don't think there's a way to test hot restart yet. Maybe @yjbanov has some thoughts?
mdebbar
approved these changes
Feb 13, 2021
| // This extension does not need to clean-up Dart statics. Those are cleaned | ||
| // up by the compiler. | ||
| developer.registerExtension('ext.flutter.disassemble', (_, __) { | ||
| window.resetHistory(); |
Contributor
There was a problem hiding this comment.
I don't think there's a way to test hot restart yet. Maybe @yjbanov has some thoughts?
| // This extension does not need to clean-up Dart statics. Those are cleaned | ||
| // up by the compiler. | ||
| developer.registerExtension('ext.flutter.disassemble', (_, __) { | ||
| window.resetHistory(); |
Contributor
There was a problem hiding this comment.
The pattern that we use in the web engine is to call registerHotRestartListener and pass a callback. The callback will be invoked when hot restart is requested.
So somewhere near the code that initializes the history, you could do:
registerHotRestartListener(() {
window.resetHistory();
});
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 17, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 17, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 17, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 17, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 17, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 17, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 17, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 17, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 17, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 18, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 18, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 18, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 18, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 18, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 18, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 18, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 18, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 18, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 18, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 18, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 18, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 18, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 19, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 19, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 19, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 19, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 19, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Feb 19, 2021
hjfreyer
pushed a commit
to hjfreyer/engine
that referenced
this pull request
Mar 22, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
web engine hot restart does not tear down the browser history. When the app restarted, it confused itself with the existing browser history, thus causes error in flutter/flutter#73793.
fixes flutter/flutter#73793
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.