Closed Bug 1385370 Opened 7 years ago Closed 7 years ago

Do not offer to restore tabs if no crash happened

Categories

(Firefox for iOS :: General, enhancement)

Other
iOS
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios 8.1+ ---

People

(Reporter: st3fan, Assigned: st3fan)

References

Details

Attachments

(1 file)

Here is the thing: we started using Sentry to log database errors. Those events also have a stack trace attached. This all works as expected.

What we did not expect is that these 'user initiated crashes that do not terminate the application' are seen as regular crash reports.

So when we start up, and one of these reports is pending, SentryIntegration.crashedLastLaunch, which calls into KSCrash, returns true because it does not know better.

As a result we show the Restore Tabs dialog in cases where this was not needed.

This patch works around that by keeping track of a persistent flag in the UserDefaults that we use to find out if we succesfully went through app startup and clean backgrounding.

If we crash before we have a chance to update the flag in applicationDidEnterBackground(), we know with more certainty that we have to show the Restore Tabs dialog.
Assignee: nobody → sarentz
Lots of comments in the code.
Attachment #8891439 - Flags: review?(rnewman)
Attachment #8891439 - Flags: review?(jdarcangelo)
Attachment #8891439 - Flags: review?(jdarcangelo) → review+
Landed on v8.x, moved to master.
See Also: → 1385217
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Attachment #8891439 - Flags: review?(rnewman) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: