mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 896170 - Part 1: Send Session:Restore only on initial onCreate. r=mfinkle
--HG-- extra : rebase_source : bde410dbc3c24210cdf3c92a71c4ef1f25fc5de0
This commit is contained in:
parent
76806f6205
commit
0f9ab7ad73
@ -1387,24 +1387,26 @@ abstract public class GeckoApp
|
||||
initializeChrome();
|
||||
|
||||
// If we are doing a restore, read the session data and send it to Gecko
|
||||
String restoreMessage = null;
|
||||
if (mRestoreMode != RESTORE_NONE && !mIsRestoringActivity) {
|
||||
try {
|
||||
// restoreSessionTabs() will create simple tab stubs with the
|
||||
// URL and title for each page, but we also need to restore
|
||||
// session history. restoreSessionTabs() will inject the IDs
|
||||
// of the tab stubs into the JSON data (which holds the session
|
||||
// history). This JSON data is then sent to Gecko so session
|
||||
// history can be restored for each tab.
|
||||
restoreMessage = restoreSessionTabs(isExternalURL);
|
||||
} catch (SessionRestoreException e) {
|
||||
// If restore failed, do a normal startup
|
||||
Log.e(LOGTAG, "An error occurred during restore", e);
|
||||
mRestoreMode = RESTORE_NONE;
|
||||
if (!mIsRestoringActivity) {
|
||||
String restoreMessage = null;
|
||||
if (mRestoreMode != RESTORE_NONE) {
|
||||
try {
|
||||
// restoreSessionTabs() will create simple tab stubs with the
|
||||
// URL and title for each page, but we also need to restore
|
||||
// session history. restoreSessionTabs() will inject the IDs
|
||||
// of the tab stubs into the JSON data (which holds the session
|
||||
// history). This JSON data is then sent to Gecko so session
|
||||
// history can be restored for each tab.
|
||||
restoreMessage = restoreSessionTabs(isExternalURL);
|
||||
} catch (SessionRestoreException e) {
|
||||
// If restore failed, do a normal startup
|
||||
Log.e(LOGTAG, "An error occurred during restore", e);
|
||||
mRestoreMode = RESTORE_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Session:Restore", restoreMessage));
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Session:Restore", restoreMessage));
|
||||
}
|
||||
|
||||
// External URLs should always be loaded regardless of whether Gecko is
|
||||
// already running.
|
||||
|
Loading…
Reference in New Issue
Block a user