Commit Graph

178 Commits

Author SHA1 Message Date
Will Wang
d431127978 Bug 1255977 - Resolve promise once flushing timeout or crash observed. r=yoric
MozReview-Commit-ID: Bjd59RPzcw2
2016-10-21 18:23:32 +08:00
Bob Silverberg
5f251b831f Bug 1309702 - Update getClosedTabData and getClosedWindowData in SessionStore.jsm to not return JSON, r=mikedeboer
MozReview-Commit-ID: 9SevLkTp0G7
2016-10-14 07:12:18 -04:00
Mike Conley
bf28a85b69 Bug 1241459 - Background tab crashes should only show about:tabcrashed for first selected tab. r=Felipe,mikedeboer
When a content process crashes for a tab that is not currently visible to the user (which
can occur if the user is looking at only non-remote tabs, or tabs in other content processes),
then we will only show the tab crash page for the first crashed tab that is selected
by the user. The rest of the tabs will restore on demand.

MozReview-Commit-ID: 1JBAp8diHXp
2016-09-30 15:06:49 -04:00
Steven Englehardt
0f14c6f982 Bug 1294866 - Part 2: Storing the loadingPrincipal used to load favicons in SessionStore. r=mikedeboer 2016-09-13 21:18:37 +08:00
Sebastian Hengst
2e47f0965a Backed out changeset 865501b808e3 (bug 1287330) for frequent timeouts in browser_async_remove_tab.js with e10s on Linux debug. r=backout 2016-08-21 16:45:16 +02:00
Allasso Travesser
5a023ca6cd Bug 1287330 - Insert tabs' linkedBrowser lazily into the document. r=dao 2016-08-19 17:46:04 +02:00
Dão Gottwald
fb5382fbfb Bug 1292542 - Remove unused 'window' variable in SessionStoreInternal._resetLocalTabRestoringState. r=dao 2016-08-16 20:36:31 +02:00
Wes Kocher
5b870e1886 Merge m-c to inbound, a=merge 2016-08-15 14:53:49 -07:00
Mike Conley
ec8ee45995 Bug 1290280 - Improve the logic for flipping the remoteness of the initial browser back to non-remote. r=mikedeboer
The code that checks to see whether or not we should flip the remoteness of a browser
before loading the session state into it wasn't accounting for the fact that oftentimes,
restoreImmediately isn't included, so it's undefined, which coerces to "false-y".

This caused us to very quickly destroy a TabParent, very soon after creating it. In
some cases, the IPC layer seems to not like that, and throws an OnChannelError,
which causes the TabParent ActorDestroy method to be called with an abnormal
shutdown reason, which causes the tab crash observer to fire, which bubbles the
tab crash event.

We should probably make the IPC layer more resilient to this sort of thing, but
we should also probably not flip remoteness when we really don't need to.

Now instead, when restoring a tab, we detect whether or not it's going to
be restored automatically in the near future. If it's not going to be
restored automatically, and the browser is remote, we flip its remoteness -
otherwise we leave it alone.

MozReview-Commit-ID: 5AmPHvzDZlX
2016-08-09 13:32:21 -04:00
Sebastian Hengst
6064ec1e6c Backed out changeset 1e57110913fc (bug 1290280) for timeouts of added test and remoteness issues e.g. in cookie tests like browser_423132.js. r=backout 2016-08-13 15:27:48 +02:00
Mike Conley
83fa1cfc69 Bug 1290280 - Improve the logic for flipping the remoteness of the initial browser back to non-remote. r=mikedeboer
The code that checks to see whether or not we should flip the remoteness of a browser
before loading the session state into it wasn't accounting for the fact that oftentimes,
restoreImmediately isn't included, so it's undefined, which coerces to "false-y".

This caused us to very quickly destroy a TabParent, very soon after creating it. In
some cases, the IPC layer seems to not like that, and throws an OnChannelError,
which causes the TabParent ActorDestroy method to be called with an abnormal
shutdown reason, which causes the tab crash observer to fire, which bubbles the
tab crash event.

We should probably make the IPC layer more resilient to this sort of thing, but
we should also probably not flip remoteness when we really don't need to.

Now instead, when restoring a tab, we detect whether or not it's going to
be restored automatically in the near future. If it's not going to be
restored automatically, and the browser is remote, we flip its remoteness -
otherwise we leave it alone.

MozReview-Commit-ID: 5AmPHvzDZlX
2016-08-09 13:32:21 -04:00
fiveNinePlusR
26cec6a132 Bug 1289213 - Part 1: Add ability to duplicate tabs lazily from the session store. r=kmag 2016-08-01 16:35:52 -07:00
Wes Kocher
f687037ad0 Backed out changeset 1c7f1b07be44 (bug 1290280) for failures in browser_remoteness_flip_on_restore.js a=backout 2016-08-11 14:43:09 -07:00
Mike Conley
924ab0a955 Bug 1290280 - Improve the logic for flipping the remoteness of the initial browser back to non-remote. r=mikedeboer
The code that checks to see whether or not we should flip the remoteness of a browser
before loading the session state into it wasn't accounting for the fact that oftentimes,
restoreImmediately isn't included, so it's undefined, which coerces to "false-y".

This caused us to very quickly destroy a TabParent, very soon after creating it. In
some cases, the IPC layer seems to not like that, and throws an OnChannelError,
which causes the TabParent ActorDestroy method to be called with an abnormal
shutdown reason, which causes the tab crash observer to fire, which bubbles the
tab crash event.

We should probably make the IPC layer more resilient to this sort of thing, but
we should also probably not flip remoteness when we really don't need to.

Now instead, when restoring a tab, we detect whether or not it's going to
be restored automatically in the near future. If it's not going to be
restored automatically, and the browser is remote, we flip its remoteness -
otherwise we leave it alone.

MozReview-Commit-ID: 5AmPHvzDZlX
2016-08-09 13:32:21 -04:00
Carsten "Tomcat" Book
d2f14b0140 merge fx-team to mozilla-central a=merge 2016-08-05 12:00:16 +02:00
Dão Gottwald
b32713f125 Bug 1292095 - Implement SSWindowRestored event and use it instead of SSWindowStateReady for the Ctrl+Tab panel. r=mdeboer 2016-08-04 18:58:00 +02:00
Mike Conley
4a22f22c55 Bug 1291860 - Don't flip remoteness of pinned tabs on session restore. r=mikedeboer
The initial browser of new windows starts remote now. When restoring a session,
if we're restoring content into the initial tab and it's going to be loaded
on demand, then we would flip it to non-remote so that it can't background crash.

We'd do this for pinned tabs too, which is silly, since pinned tabs load ASAP.

This patch causes us to skip the remoteness flip if the tab we're restoring
is pinned.

MozReview-Commit-ID: 9eQzfLADzlQ
2016-08-03 16:34:20 -04:00
Dão Gottwald
9ddd0e915e Bug 1292049 - Prevent tab.lastAccessed from being set to a discrete value when the tab is selected. r=mdeboer 2016-08-04 14:41:15 +02:00
Dão Gottwald
abc7ceae3a Backed out changeset 510f0b4792de 2016-08-04 14:21:56 +02:00
Dão Gottwald
e37e7e2e5e Bug 1292049 - Prevent tab.lastAccessed from being set to a discrete value when the tab is selected. r=mdeboer 2016-08-04 11:33:15 +02:00
Jonathan Hao
3e43192e96 Bug 1289571 - Set browser's userContextId before updateRemoteness in restoreTabContent. r=mikedeboer 2016-07-28 23:54:00 +02:00
Mike Conley
3573171604 Bug 1261842 - When putting the initial tab into the restored background state, flip it to non-remote. r=mikedeboer
MozReview-Commit-ID: BX8XbYjJHGf
2016-06-03 14:12:21 -04:00
Pushpankar
77a14e357c Bug 1286854 - Replace ownerDocument.defaultView with ownerGlobal in browser/. r=dao 2016-07-16 10:20:04 +02:00
Allasso Travesser
145ed7dab5 Bug 1285789 - Implement TabBrowserCreated event. r=dao 2016-07-15 16:10:27 +02:00
Mike Conley
9f9f65c5e6 Bug 1284687 - Hide windows on shutdown while persisting session instead of closing them. r=billm
We were closing the windows before to improve perceived shutdown
performance, but we end up in a state where we're likely to miss
out on the last ~2 seconds of session activity for most tabs per
window. This is because we were removing the session update
message listeners and resolving the flush Promises once the
domwindowclosed notification fired for the window.

Hiding the window allows us to wait for the messages properly.

What's more, we weren't even collecting the window state after
we had flushed, so we have _always_ been missing (in the worst
case) about 2 seconds of session state per window. This addresses
that.

MozReview-Commit-ID: BEOIHV4EErf
2016-07-07 15:04:52 -04:00
Mike Conley
8ff25826bd Bug 1271607 - Pinned tabs should not restore as non-remote. r=mikedeboer
App tabs load immediately, and so there's no point in causing the remoteness
flipping machinery to kick off by making the pinned tabs non-remote by default.

MozReview-Commit-ID: 48O2mJSHurr
2016-06-29 13:49:57 -04:00
Jonathan Kew
01cccabd3f Bug 1276516 - When restoring window positions from a saved session, allow the window bounds to extend a few pixels beyond the screen edges before deciding to override the saved position and force the window entirely within the screen's visible area. r=mikedeboer 2016-06-02 12:35:56 +01:00
Yoshi Huang
b690c760e7 Bug 1274461 - Part 2: restore tabs should preserve userContextId. r=mikedeboer 2016-06-03 15:01:03 +08:00
Yoshi Huang
40afbc460a Bug 1274461 - Part 1: undoCloseTab should preserve userContextId. r=mikedeboer 2016-06-03 15:01:03 +08:00
Carsten "Tomcat" Book
d72f08e97e Merge mozilla-central to fx-team 2016-06-01 15:09:07 +02:00
Mike de Boer
e4fea8ae6c Bug 1276884 - fix nits in TabAttributes.jsm and TabState.jsm. r=ttaubert 2016-06-01 14:48:18 +02:00
Phil Ringnalda
9ff857db9e Back out changeset b3835efbf422 (bug 1257182) for failures in browser_restoreClosedTabs.js and browser_urlbarPrivateBrowsingWindowChange.js
CLOSED TREE
2016-05-23 19:36:08 -07:00
Blair McBride
b8e4a2f3b0 Bug 1257182 - "Restore All Tabs" can fail when there are pre-existing tabs. r=dao
MozReview-Commit-ID: HZqflYBJfJy
2016-05-24 12:19:31 +12:00
Gijs Kruitbosch
28b580ac4e Bug 1272317 - fix URL bar state when switching to a non-remote browser, r=mconley
MozReview-Commit-ID: 4dmgz6iHfdK
2016-05-16 22:36:35 +01:00
Gijs Kruitbosch
4c76c34e27 Bug 1276117 - part 1: fix URL bar state when loading about:home after about:preferences, r=mikedeboer
MozReview-Commit-ID: D5ecLsiJF3R
2016-05-27 14:06:02 +01:00
Yoshi Huang
a4205c0771 Bug 1250063 - Part 1: Pass userContextId in duplicateTab. r=ttaubert 2016-05-17 19:49:09 +08:00
Gijs Kruitbosch
83d5307a65 Bug 1241085 - fix issues with about:newtab and other initial pages whose URIs now persist after session restore, r=mconley
MozReview-Commit-ID: BbzOSwFucf6
2016-05-06 09:11:33 +01:00
Gijs Kruitbosch
d06478992a Bug 1241085 - part 3: actually fix about:privatebrowsing clearing the URL bar, r=mconley
MozReview-Commit-ID: JB3GPKsfmTs
2016-04-28 20:03:38 +01:00
Gijs Kruitbosch
bb3cc1f15c Bug 1241085 - part 2: rip out userTypedClear and replace it with more self-documenting stuff, r=mconley
userTypedClear was used for two cases:
1) to keep track of whether we were in the middle of a loadURI call. This use is replaced by inLoadURI, which is
more sane when using e10s (though it's hard to be precise there because we're sending all web navigation calls to
the content process and this introduces a degree of asynchronousness that we just have to live with...).
2) to keep track of whether we were between a network start and a corresponding network stop, and whether the user
typed since the load properly started. This is now tracked on a small object on the browser binding, which has
appropriately named method so we're not just incrementing some magic number but actually understand what
we're saying, and so the information we get out (did the user type since this load started or not?) makes sense.

Note that we're keeping userTypedClear in session store information in order to remain backwards compatible.
It becomes a simple boolean-stored-as-int (1 or 0) that indicates whether we quit/crashed/stopped while a load
was pending, or not.

MozReview-Commit-ID: 5NbmVueocC7
2016-04-28 19:51:36 +01:00
Gijs Kruitbosch
a4845b609f Backed out changesets b386e97721cf, 386b9c750bd2, 3c86861912bb (bug 1241085) because the about:newtab URI is now kept across sessions, a=backout-with-approval-from-ryanvm
MozReview-Commit-ID: EVv6M6x9F44
2016-05-05 17:45:58 +01:00
Gijs Kruitbosch
9912012213 Bug 1241085 - part 3: actually fix about:privatebrowsing clearing the URL bar, r=mconley
MozReview-Commit-ID: JB3GPKsfmTs
2016-04-28 20:03:38 +01:00
Gijs Kruitbosch
3e97b45a10 Bug 1241085 - part 2: rip out userTypedClear and replace it with more self-documenting stuff, r=mconley
userTypedClear was used for two cases:
1) to keep track of whether we were in the middle of a loadURI call. This use is replaced by inLoadURI, which is
more sane when using e10s (though it's hard to be precise there because we're sending all web navigation calls to
the content process and this introduces a degree of asynchronousness that we just have to live with...).
2) to keep track of whether we were between a network start and a corresponding network stop, and whether the user
typed since the load properly started. This is now tracked on a small object on the browser binding, which has
appropriately named method so we're not just incrementing some magic number but actually understand what
we're saying, and so the information we get out (did the user type since this load started or not?) makes sense.

Note that we're keeping userTypedClear in session store information in order to remain backwards compatible.
It becomes a simple boolean-stored-as-int (1 or 0) that indicates whether we quit/crashed/stopped while a load
was pending, or not.

MozReview-Commit-ID: 5NbmVueocC7
2016-04-28 19:51:36 +01:00
Gijs Kruitbosch
1f48f5aa92 Bug 1267289 - add more URL bar tests and fix issue with error pages, r=mikedeboer,mconley
This adds tests for issues brought up in bug 231393, bug 264610, bug 302575 and bug 1129564,
all of which fed into the current implementation of userTypedClear/userTypedValue. I intend
to move us away from userTypedClear, but I'm keen not to regress any of these issues, so
I'm adding automated tests to ensure that doesn't happen.

MozReview-Commit-ID: 1up2MIXzkzG
2016-04-25 17:27:35 +01:00
Mike Conley
9b7c02c972 Bug 1260461 - Don't flush windows when shutting down due to a Windows log-out. r=jimm
MozReview-Commit-ID: 3WWgPTxzdcz
2016-04-01 17:15:37 -04:00
Mike Conley
2b0d366f57 Bug 1261657 - Don't record SSTabRestored events in StartupPerformance that are the result of a remoteness flip. r=Yoric
MozReview-Commit-ID: 2pnT2DdKPHV
2016-04-03 00:30:14 -04:00
Jonathan Kew
e9da3d12b0 Bug 1259707 - Fix confusion between desktop and CSS pixels when session-restore is constraining window to the available screen space. r=emk 2016-03-26 13:12:47 +00:00
Mike Conley
f9e835a3d6 Bug 1228652 - Check for window.closed after flushing messages in navigateAndRestore. r=mossop
MozReview-Commit-ID: 9Cgxg9A61O7
2016-02-28 20:36:47 -05:00
Mike Conley
78f75eb1ea Bug 1195295 - Remove SessionStore's SyncHandler since all tab and window flushing is now async. r=ttaubert
MozReview-Commit-ID: 5UrQj1UUKDE
2015-12-01 14:34:25 -05:00
Dão Gottwald
0debf7316f Bug 1014185 - Remove about:customizing and use about:blank for customize mode instead. r=jaws 2016-02-20 14:03:25 +01:00
Carsten "Tomcat" Book
6a9ce8a5af Backed out changeset c34fe673bb97 (bug 1014185) for perma failures in browser_bug1163570.js 2016-02-19 17:19:19 +01:00