Closed Bug 1572872 Opened 1 year ago Closed 1 year ago

Return NS_ERROR_NOT_INITIALIZED instead of NS_ERROR_ILLEGAL_VALUE when the message manager isn't initialized

Categories

(Core :: DOM: Core & HTML, task)

task
Not set

Tracking

()

RESOLVED FIXED
mozilla70
Fission Milestone M4
Tracking Status
firefox70 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

If the mMessageManager field is null, then various message manager functions return NS_ERROR_NULL_POINTER, which gets printed out as NS_ERROR_ILLEGAL_VALUE. When I came across this in bug 1572781, I thought it meant that an invalid argument was being passed in. I think NS_ERROR_NOT_INITIALIZED better reflects that the message manager global isn't actually set up properly. In this particular case, it was actually after it was shutdown instead of before it was initialized, but I think that's close enough.

If the mMessageManager field is null, then various message manager
functions return NS_ERROR_NULL_POINTER, which gets printed out as
NS_ERROR_ILLEGAL_VALUE, which is confusing. NS_ERROR_NOT_INITIALIZED
will better indicate the problem is that that the message manager
itself isn't set up correctly, rather than that the arguments are
invalid.

Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1815f6ac0dd2
Return NS_ERROR_NOT_INITIALIZED if the message manager isn't initialized. r=smaug
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Fission Milestone: --- → M4
You need to log in before you can comment on or make changes to this bug.