Bug 833964 - Don't keep a dangling pointer to a task that is about to get deleted. r=drs