diff options
author | 2015-09-25 18:34:42 +0000 | |
---|---|---|
committer | 2015-09-28 11:39:32 +0000 | |
commit | 869605e728d947645db70a9d1eb328d220f97929 (patch) | |
tree | 0e46dbbe4c2ee6207eb144bbb05f4235b2b34d55 /src/main | |
parent | 1d9bc022409e72641ba43069732265509718a74b (diff) |
Inject an EventHandler rather than using the one on SkyframeExecutor.
In preparation for removing SkyframeExecutor.errorEventListener.
--
MOS_MIGRATED_REVID=103960561
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java index bc3d0771e1..7cb524a8b9 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java @@ -1454,7 +1454,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { /** * Returns the generating action of a given artifact ({@code null} if it's a source artifact). */ - private Action getGeneratingAction(Artifact artifact) throws InterruptedException { + private Action getGeneratingAction(EventHandler eventHandler, Artifact artifact) + throws InterruptedException { if (artifact.isSourceArtifact()) { return null; } @@ -1472,7 +1473,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { // this action. We don't expect callers to query generating actions in such cases. EvaluationResult<ActionLookupValue> result = buildDriver.evaluate( ImmutableList.of(actionLookupKey), false, ResourceUsage.getAvailableProcessors(), - errorEventListener); + eventHandler); return result.hasError() ? null : result.get(actionLookupKey).getGeneratingAction(artifact); @@ -1484,7 +1485,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { * * <p>For legacy compatibility only. */ - public ActionGraph getActionGraph() { + public ActionGraph getActionGraph(final EventHandler eventHandler) { return new ActionGraph() { @Override public Action getGeneratingAction(final Artifact artifact) { @@ -1492,7 +1493,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { return callUninterruptibly(new Callable<Action>() { @Override public Action call() throws InterruptedException { - return SkyframeExecutor.this.getGeneratingAction(artifact); + return SkyframeExecutor.this.getGeneratingAction(eventHandler, artifact); } }); } catch (Exception e) { |