mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
840c375255
Grabbing and saving the references to global `setTimeout` and `rAF` implementations at a certain point in time can be problematic, espcially in tests. Tests might call something like `jasmine.clock().install();` and `jasmine.clock().uninstall();`. If the install happens before we grab the implementation and then the uninstall happens after, our scheduling function will be broken because it would have saved a reference to the jasmine `setTimeout` implementation, which would have since been cleaned up and will throw an error when attempting to access `delayedFunctionScheduler`. There are other scenarios that may apply, not even just for tests, when patches are applied and removed to the globals. PR Close #55124