 		protected var relevantContext:Object;
 		private var result:* = undefined;
 		private var error:* = undefined;
-		private var handlers:Array = []; // array of Handler objects
-		private var dependencies:Array = [];
+		private const handlers:Array = []; // array of Handler objects
+		private const dependencies:Array = [];
 		
 		/**
 		 * @return This WeavePromise
 		 */
 		public function setResult(result:Object):WeavePromise
 		{
+			if (Weave.wasDisposed(relevantContext))
+				return this;
+			
 			if (WeaveAPI.debugAsyncStack)
 				stackTrace_resolved = new Error("WeavePromise resolved");
-			
-			if (Weave.wasDisposed(relevantContext))
-			{
-				setBusy(false);
-				return this;
-			}
 			
 			this.result = undefined;
 			this.error = undefined;

			return error;
		}
		
		private function setBusy(busy:Boolean):void
		{
			if (busy)
			{
				WeaveAPI.ProgressIndicator.addTask(rootPromise, relevantContext as ILinkableObject);
			}
			else
			{
				WeaveAPI.ProgressIndicator.removeTask(rootPromise);
			}
		}
		
		private function callHandlers(newHandlersOnly:Boolean = false):void
		{
			if (dependencies.some(Weave.isBusy))
			{
				if (handlers.length)
					setBusy(true);
				return;
			}
			
			// if there are no more handlers, remove the task
			if (handlers.length == 0)
				setBusy(false);
			
			if (Weave.wasDisposed(relevantContext))
			{
				setBusy(false);
				return;
			}
			
			for (var i:int = 0; i < handlers.length; i++)
			{

				var_resolve = resolve;
				var_reject = reject;
			});
			promise._WeavePromise = this; // for debugging
			then(var_resolve, var_reject);
			return promise;
		}
		
		public function dispose():void
		{
			dependencies.length = 0;
			handlers.length = 0;
		}
	}
}
