Closed
Bug 1167508
Opened 9 years ago
Closed 9 years ago
Use async flushing for LoadInOtherProcess() and remove TabState.flush()
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
RESOLVED
FIXED
Firefox 41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: ttaubert, Assigned: ttaubert)
References
Details
Attachments
(7 files, 5 obsolete files)
2.00 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
3.47 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
2.42 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
2.72 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
6.59 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
13.78 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
2.39 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
LoadInOtherProcess() is the only place still using TabState.flush() outside of tests.
Assignee | ||
Comment 1•9 years ago
|
||
We can remove TabState.flush() with that already but not sync flushing quite yet as we're still using .flushWindow().
Assignee | ||
Comment 2•9 years ago
|
||
I found that we need to reset the epoch when a new frameLoader is created in a <browser>. This mostly works fine currently because when we do that (remoteness switching) we at the same time restore data into the tab, which also restores the old epoch. This doesn't happen when the browser crashes though, so I think the correct way to handle this is to actually reset the epoch and not carry it forward.
Assignee | ||
Comment 3•9 years ago
|
||
TabStateFlusher.flush() currently doesn't support crashed browsers and does never resolve in that case. We shouldn't punish the caller for not checking whether the tab is crashed as the tab state is basically frozen and should simply be accessible.
Attachment #8609826 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 4•9 years ago
|
||
This moves the remoteness switching code from LoadInOtherProcess() to SessionStore and makes it a regular API. Calling browser.loadURI() does now first flush asynchronously to receive all the necessary data and then start navigation. Remoteness switching happens asynchronously now.
Attachment #8609828 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 5•9 years ago
|
||
Let's get rid of TabState.flush(). We still have .flushWindow() though, the last that needs to be removed.
Attachment #8609829 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 6•9 years ago
|
||
This makes SessionStore's promiseBrowserLoaded() simply use BrowserTestUtils.browserLoaded() and fixes that latter to support being called for a browser that may switch its remoteness asynchronously while waiting for the load to happen.
Attachment #8609830 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 7•9 years ago
|
||
All the necessary test fixes.
Attachment #8609831 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 8•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=fc95171b4ab1
Assignee | ||
Comment 9•9 years ago
|
||
Small fix.
Attachment #8609828 -
Attachment is obsolete: true
Attachment #8609828 -
Flags: review?(wmccloskey)
Attachment #8609889 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 10•9 years ago
|
||
Small fix.
Attachment #8609831 -
Attachment is obsolete: true
Attachment #8609831 -
Flags: review?(wmccloskey)
Attachment #8609890 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 11•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=0691fd611e08
Assignee | ||
Comment 12•9 years ago
|
||
One more test fix.
Attachment #8610217 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 13•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=cd29b64f623e
Assignee | ||
Updated•9 years ago
|
Attachment #8609890 -
Attachment is obsolete: true
Attachment #8609890 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 14•9 years ago
|
||
Gah, these customizableui tests are hard, need to do some more work on those.
Attachment #8609824 -
Flags: review?(wmccloskey) → review+
Comment on attachment 8609826 [details] [diff] [review] 0002-Bug-1167508-Support-flushing-crashed-browsers.patch Review of attachment 8609826 [details] [diff] [review]: ----------------------------------------------------------------- This handles the case where the browser crashed before the TabStateFlusher.flush. Even with this patch, we still won't handle a crash after a flush is sent and before the reply is received, right? Should we maybe do resolveAll in that case? We have all the data we're going to get at that time.
Attachment #8609826 -
Flags: review?(wmccloskey) → review+
I'm a little scared looking at the rest of the patches. There's nothing wrong with the patches here. It's just the whole concept of remoteness switching is so broken. I'd like to think a little more about how to make it better. I'll get back to this tomorrow or Friday. Sorry for the delay.
Assignee | ||
Comment 17•9 years ago
|
||
(In reply to Bill McCloskey (:billm) from comment #16) > I'm a little scared looking at the rest of the patches. There's nothing > wrong with the patches here. It's just the whole concept of remoteness > switching is so broken. I'd like to think a little more about how to make it > better. I'll get back to this tomorrow or Friday. Sorry for the delay. No worries, I'm all open to better ideas here :)
Assignee | ||
Comment 18•9 years ago
|
||
(In reply to Bill McCloskey (:billm) from comment #15) > This handles the case where the browser crashed before the > TabStateFlusher.flush. Even with this patch, we still won't handle a crash > after a flush is sent and before the reply is received, right? Should we > maybe do resolveAll in that case? We have all the data we're going to get at > that time. SessionStore.onBrowserCrashed() calls TabStateFlusher.resolveAll() passing the browser that crashed. Added that case in bug 1162871 already :)
Comment on attachment 8609889 [details] [diff] [review] 0003-Bug-1167508-Use-async-flushing-for-LoadInOtherProces.patch, v2 Review of attachment 8609889 [details] [diff] [review]: ----------------------------------------------------------------- OK, let's just do this. I don't see any alternative.
Attachment #8609889 -
Flags: review?(wmccloskey) → review+
Attachment #8609829 -
Flags: review?(wmccloskey) → review+
Attachment #8609830 -
Flags: review?(wmccloskey) → review+
Comment on attachment 8610217 [details] [diff] [review] 0006-Bug-1167508-Fix-tests-that-expect-a-sync-remoteness-.patch, v3 Review of attachment 8610217 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/base/content/test/general/browser_e10s_chrome_process.js @@ +24,5 @@ > let asyncTask = Task.async(transitionTask); > + yield asyncTask(browser, endURL); > + > + if (startProcessIsRemote != endProcessIsRemote) { > + yield BrowserTestUtils.waitForEvent(browser, "XULFrameLoaderCreated"); Rather than encoding this specific event into a bunch of tests, can we add a function to BTU that does it? That way, if we change how this stuff works, we won't have to change a bunch of tests.
Attachment #8610217 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 21•9 years ago
|
||
Attachment #8610217 -
Attachment is obsolete: true
Attachment #8614565 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 22•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ec955be9ccfd
Assignee | ||
Comment 23•9 years ago
|
||
Aha, about:newtab was causing issues when it was preloaded. Shouldn't use that in tests if we're not actually testing about:newtab itself.
Attachment #8614565 -
Attachment is obsolete: true
Attachment #8614565 -
Flags: review?(wmccloskey)
Attachment #8614635 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 24•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=01a14b89656c
Assignee | ||
Comment 25•9 years ago
|
||
Fixing a few more failures on try that weren't there before. Turns out that some tests cause the window to be closed just before flushing completes. We need to check if the window is gone before continuing. https://treeherder.mozilla.org/#/jobs?repo=try&revision=1a4353961665
Attachment #8614739 -
Flags: review?(wmccloskey)
Attachment #8614635 -
Flags: review?(wmccloskey) → review+
Attachment #8614739 -
Flags: review?(wmccloskey) → review+
Assignee | ||
Comment 26•9 years ago
|
||
Was luck enough to hit an existing leak in bug 1172137 with my patches. Pushed to try again with the fixes, hope that's the last try push. https://treeherder.mozilla.org/#/jobs?repo=try&revision=af54e489c668
Assignee | ||
Comment 27•9 years ago
|
||
(Well, I didn't hit it *in* bug 1172137 but I filed that bug to fix the leak.)
Assignee | ||
Comment 28•9 years ago
|
||
*sigh* https://treeherder.mozilla.org/#/jobs?repo=try&revision=9b3959289e4a
Comment 29•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/3a4faf863320 https://hg.mozilla.org/integration/fx-team/rev/b7ed44b4595f https://hg.mozilla.org/integration/fx-team/rev/092037dd209a https://hg.mozilla.org/integration/fx-team/rev/c1a16fd640ae https://hg.mozilla.org/integration/fx-team/rev/00eb943a27b2 https://hg.mozilla.org/integration/fx-team/rev/97b5372b8950 https://hg.mozilla.org/integration/fx-team/rev/5080433ff610
Comment 30•9 years ago
|
||
Backed out because bug 1172137 had to be backed out.
Comment 31•9 years ago
|
||
Backout: https://hg.mozilla.org/integration/fx-team/rev/986f641d87e4
Comment 32•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/929721960685 https://hg.mozilla.org/integration/fx-team/rev/a7bc5772c79c https://hg.mozilla.org/integration/fx-team/rev/0b0b75e8dd0b https://hg.mozilla.org/integration/fx-team/rev/d3de3ab56658 https://hg.mozilla.org/integration/fx-team/rev/ad065623983e https://hg.mozilla.org/integration/fx-team/rev/aead6e4865f9 https://hg.mozilla.org/integration/fx-team/rev/c2437b9b6626
https://hg.mozilla.org/mozilla-central/rev/929721960685 https://hg.mozilla.org/mozilla-central/rev/a7bc5772c79c https://hg.mozilla.org/mozilla-central/rev/0b0b75e8dd0b https://hg.mozilla.org/mozilla-central/rev/d3de3ab56658 https://hg.mozilla.org/mozilla-central/rev/ad065623983e https://hg.mozilla.org/mozilla-central/rev/aead6e4865f9 https://hg.mozilla.org/mozilla-central/rev/c2437b9b6626
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
You need to log in
before you can comment on or make changes to this bug.
Description
•