-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX release] Avoid creating event dispatcher in FastBoot with Eng…
…ines Prior to this commit, the `event_dispatcher:main` was always being instantiated so that it can be injected eagerly into child engines. In general, this is good (we should only ever have a single event dispatcher going) but in the FastBoot case the event dispatcher should not have been created at all (since there is no DOM or interactivity booting the event dispatcher to listen to DOM events is wasteful and error prone). This commit updates the EventDispatcher base class to properly look for the `isInteractive` flag (which is what it should have been doing all along) on the `-environment:main` that is injected from the `Application.visit` API. When `isInteractive` is falsey and the event dispatcher is instantiated we will issue an assertion. We also avoid eagerly looking up (and therefore forcing to initialize) the EventDispatcher if `.visit` API is passed `isInteractive: false`. This avoids the specifically reported issue of triggering an assertion in FastBoot mode.
- Loading branch information
Showing
3 changed files
with
56 additions
and
3 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