[gnome-continuous] task: Fix uninitialized variable
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] task: Fix uninitialized variable
- Date: Thu, 10 Oct 2013 15:42:27 +0000 (UTC)
commit 7c54565a6ca342036b31a6e5f312084dcdccfeda
Author: Colin Walters <walters verbum org>
Date: Thu Oct 10 11:42:13 2013 -0400
task: Fix uninitialized variable
src/js/task.js | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/js/task.js b/src/js/task.js
index 5b595ce..477f4a1 100644
--- a/src/js/task.js
+++ b/src/js/task.js
@@ -284,6 +284,7 @@ const TaskMaster = new Lang.Class({
},
_onComplete: function(success, error, runner) {
+ let taskName = runner.taskData.name;
let idx = -1;
for (let i = 0; i < this._executing.length; i++) {
let executingRunner = this._executing[i];
@@ -293,14 +294,13 @@ const TaskMaster = new Lang.Class({
break;
}
if (idx == -1)
- throw new Error("TaskMaster: Internal error - Failed to find completed task:" +
runner.taskData.name);
+ throw new Error("TaskMaster: Internal error - Failed to find completed task:" + taskName);
this._executing.splice(idx, 1);
let link = this.tasksPath.get_child(taskName);
BuildUtil.atomicSymlinkSwap(link, runner.buildPath, this.cancellable);
if (success && runner.changed) {
- let taskName = runner.taskData.name;
let taskDef = runner.taskData.taskDef;
let after = this._taskset.getTasksAfter(taskName);
for (let i = 0; i < after.length; i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]