Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Fixes #3620 Fixes #3634 Fix private session restore crash #3629

Merged
merged 1 commit into from
Jul 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,11 @@ public void suspend() {
}

private boolean shouldLoadDefaultPage(@NonNull SessionState aState) {
// data:text URLs can not be restored.
if (mState.mSessionState != null && ((mState.mUri == null) || mState.mUri.startsWith("data:text"))) {
return true;
}

if (aState.mUri != null && aState.mUri.length() != 0 && !aState.mUri.equals(mContext.getString(R.string.about_blank))) {
return false;
}
Expand Down Expand Up @@ -468,12 +473,6 @@ private void restore() {

openSession();

// data:text URLs can not be restored.
if (mState.mSessionState != null && ((mState.mUri == null) || mState.mUri.startsWith("data:text"))) {
mState.mSessionState = null;
mState.mUri = null;
}

if (shouldLoadDefaultPage(mState)) {
loadDefaultPage();
} else if (mState.mSessionState != null) {
Expand Down