Heh. The comment on line [Http2Session.cpp#2040](https://searchfox.org/mozilla-central/source/netwerk/protocol/http/Http2Session.cpp#2040): ``` // Another nifty trick! Even though this is using nsIURIs (which are not // generally ok off the main thread), since we're not using the protocol // handler to create any URIs, this will work just fine here. Don't try this // at home, though, kids. I'm a trained professional. ``` In the second stack trace it looks like the call to AsyncOpenURI leads to us finding the URI in the cache on line [Http2Session.cpp#2224](https://searchfox.org/mozilla-central/source/netwerk/protocol/http/Http2Session.cpp#2224), and subsequently removing the item from the hashtable at [Http2Session.cpp#1243](https://searchfox.org/mozilla-central/source/netwerk/protocol/http/Http2Session.cpp#1243): ``` // removing from the stream transaction hash will // delete the Http2Stream and drop the reference to // its transaction ``` So I guess that deletes the Http2PushedStream that the (pushedStream*)[https://searchfox.org/mozilla-central/source/netwerk/protocol/http/Http2Session.cpp#1913] points to, prior to trying to use it on line 2061. Not sure if the assumption from the comment is wrong, or something else is at play here. (or I might also be totally wrong, I've never seen this code before).
Bug 1528481 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Heh. The comment on line [Http2Session.cpp#2040](https://searchfox.org/mozilla-central/source/netwerk/protocol/http/Http2Session.cpp#2040): ``` // Another nifty trick! Even though this is using nsIURIs (which are not // generally ok off the main thread), since we're not using the protocol // handler to create any URIs, this will work just fine here. Don't try this // at home, though, kids. I'm a trained professional. ``` In the second stack trace it looks like the call to AsyncOpenURI leads to us finding the URI in the cache on line [Http2Session.cpp#2224](https://searchfox.org/mozilla-central/source/netwerk/protocol/http/Http2Session.cpp#2224), and subsequently removing the item from the hashtable at [Http2Session.cpp#1243](https://searchfox.org/mozilla-central/source/netwerk/protocol/http/Http2Session.cpp#1243): ``` // removing from the stream transaction hash will // delete the Http2Stream and drop the reference to // its transaction ``` So I guess that deletes the Http2PushedStream that the (pushedStream)[https://searchfox.org/mozilla-central/source/netwerk/protocol/http/Http2Session.cpp#1913] points to, prior to trying to use it on line 2061. Not sure if the assumption from the comment is wrong, or something else is at play here. (or I might also be totally wrong, I've never seen this code before).
Heh. The comment on line [Http2Session.cpp#2040](https://searchfox.org/mozilla-central/source/netwerk/protocol/http/Http2Session.cpp#2040): ``` // Another nifty trick! Even though this is using nsIURIs (which are not // generally ok off the main thread), since we're not using the protocol // handler to create any URIs, this will work just fine here. Don't try this // at home, though, kids. I'm a trained professional. ``` In the second stack trace it looks like the call to AsyncOpenURI leads to us finding the URI in the cache on line [Http2Session.cpp#2224](https://searchfox.org/mozilla-central/source/netwerk/protocol/http/Http2Session.cpp#2224), and subsequently removing the item from the hashtable at [Http2Session.cpp#1243](https://searchfox.org/mozilla-central/source/netwerk/protocol/http/Http2Session.cpp#1243): ``` // removing from the stream transaction hash will // delete the Http2Stream and drop the reference to // its transaction ``` So I guess that deletes the Http2PushedStream that the [pushedStream*](https://searchfox.org/mozilla-central/source/netwerk/protocol/http/Http2Session.cpp#1913) points to, prior to trying to use it on line 2061. Not sure if the assumption from the comment is wrong, or something else is at play here. (or I might also be totally wrong, I've never seen this code before).