-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] app: make subroots more robust
This commit fixes two issues with subroots: 1. creating a subroot create a new component node synchronously. This would causes issues if the creation was done in the setup of a component, since in that case, owl would reset the current component to null right after, which would cause all calls to hooks to fail. This is fixed by restoring the previous component node right after creating a root. 2. the destroy method for roots calls the scheduler processTasks. However, the processTasks method was not safe to reentrant calls, which would in some cases crashes owl. For example, if a destroy is done while a new component is mounted, the mount method would be called twice. This is fixed by ignoring the processTasks if we are currently processing tasks. It works because the "for ... of" loop will still process all new tasks in the current iteration.
- Loading branch information
Showing
7 changed files
with
205 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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