On 8/25/10 3:31 AM, Ben Lerner wrote:
One more question: Perhaps I'm misunderstanding what you mean by "throw the document away", but if it means the document gets discarded, garbage collected, and the DOM for that page doesn't exist any more... if you had a page that mutated a hibernated document with a *single* DOM call, then no exception would be thrown but the page would vanish and perhaps eventually reload. But if the page mutated a hibernated document with *two* DOM calls, wouldn't the second one fail anyway, because the document was thrown away? So we trade one exception for another...
"throw away" in this context means throw away from the back/forward cache. The document is still there, and can still be mutated, etc, but can no longer become live again.
Hmm, that is tricky, and a timing bug indeed. That points out another potential question -- if the user navigates away from a page with an active XHR/JPEG-push/whatever connection, will Gecko then force that page to stay alive, and continue running script?
No. If it's got an active XHR or JPEG-push we just stop that network load and don't cache the page's DOM.
-Boris
