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

Fix #2162 - Fixes a crash when javascript's window.open creates a new tab. #2161

Merged
merged 1 commit into from
Jan 8, 2020

Conversation

Brandon-T
Copy link
Collaborator

@Brandon-T Brandon-T commented Jan 8, 2020

There is no need to nil the persistent store when a webView of a different kind is created. We only need to nil it in removeNonPersistentStore when all tabs or all private tabs are killed.

Steps To Reproduce

  1. On a real device, enter Private Browsing Mode
  2. Open https://www.w3schools.com/jsref/met_win_open.asp
  3. Open settings, and enable block all cookies
  4. Confirm blocking all cookies.
  5. Disable block all cookies from settings.
  6. Tap on the try it yourself button on the w3 website
  7. It crashes when a new tab is opened from the old tab (popup).

Summary of Changes

This pull request fixes issue #2162
Related to: #1237

Submitter Checklist:

  • Unit Tests are updated to cover new or changed functionality
  • User-facing strings use NSLocalizableString()

Test Plan:

Screenshots:

Reviewer Checklist:

  • Issues include necessary QA labels:
    • QA/(Yes|No)
    • release-notes/(include|exclude)
    • bug / enhancement
  • Necessary security reviews have taken place.
  • Adequate unit test coverage exists to prevent regressions.
  • Adequate test plan exists for QA to validate (if applicable).
  • Issue is assigned to a milestone (should happen at merge time).

…erent kind is created. We only need to nil it in `removeNonPersistentStore` when all tabs or all private tabs are killed.
Copy link
Contributor

@iccub iccub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

I will make separate ticket for it, to easier track all our crash problems

@iccub iccub changed the title Fix #1144 - Fixes a crash when javascript's window.open creates a new tab. Fix #2162 - Fixes a crash when javascript's window.open creates a new tab. Jan 8, 2020
@iccub
Copy link
Contributor

iccub commented Jan 8, 2020

To whoever merges this: please include the new ticket number(2162) in commit message.

@iccub
Copy link
Contributor

iccub commented Jan 8, 2020

testAllShieldsOff still failing.. merging anyway

@iccub iccub merged commit 6134483 into development Jan 8, 2020
@iccub iccub deleted the feature/SessionBugFix branch January 8, 2020 19:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants