Avoid loss of ninja_deps events
Previously, writeDepFile was passed a copy of the main EventHandler to which it then added an event. Adding an event requires appending information to slices in the EventHandler structure. As the slices are a copy the addition only affects the copy and are not present in the EventHandler which is written out as part of the metrics. This change fixes that by passing a pointer to an EventHandler into writeDepFile. For consistency it also replaces a few other uses of EventHandler with *EventHandler instead. Bug: 257590265 Test: m nothing # Check generated text metrics to make sure they don't contain ninja_deps. # Apply this change. m nothing # Check generated text metrics to make sure they do contain ninja_deps. Change-Id: I0fa0f2b08844cb7c7b4e99b37602703deb43ad20
Loading
Please register or sign in to comment