mirror of
https://github.com/angular/angular.git
synced 2026-11-23 07:05:14 -05:00
When a later frame has a directive that the first selected frame doesn't, `mergeFrames` added that frame's directive object to the merged result by reference. Merging the next frame then added its timings into the recorded frame, so selecting three or more frames inflated the stored change detection and lifecycle times, and they grew each time the range was selected again. Copy the directive before adding it to the merged result. Tested by adding a spec that merges three frames and checks that the input frames are unchanged.