Comment 10 for bug 1412660

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Ah, so I guess I get it now. In retrospective, it's pretty logical:

1) Job definitions are either generated (and thus bound to a session) or not (and thus bound to a provider)
2) The .via property was previously a mutable state on a job. Now it is something one can access from session-bound JobState.
2a) this means that .via cannot be accessed before a session exists
2b) this means that .via cannot be accessed if a session doesn't contain a given job (despite that job existing).

In the past, via was always accessible, perhaps holding nothing or perhaps holding stale data (from previous session run).
Currently when 2[ab] happen, we crash.

The fix is to simply return "" when there is no session or there is no corresponding JobState in the session.