Open Bug 1840809 Opened 1 year ago Updated 1 year ago

Replace nsHttpChannel::mRedirectFuncStack

Categories

(Core :: Networking, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: smayya, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

The listeners of the channel are notified about redirects using the AsyncOnChannelRedirect() interface. The listeners check and signals its approval for redirect using nsIAsyncVerifyRedirectCallback::OnRedirectVerifyCallback interface.
nsHttpChannel::mRedirectFuncStack is an array of callbacks to be called after the listeners signaled their approval for redirect. Storing the callbacks in an array can cause problem while debugging crashes i.e. no proper backtrace.
We need to devise a better solution to store/retrieve the function callbacks to be called upon successful redirect notification from the listener.

My main problem with that code is that it's an array of function pointers.
If it were an array of std::function I think that might help a bit with the readability of stack traces.

You need to log in before you can comment on or make changes to this bug.