Closed Bug 1166491 Opened 9 years ago Closed 9 years ago

Session encoding unsafely unwraps web view's URL

Categories

(Firefox for iOS :: General, defect)

All
iOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1164160
Tracking Status
fennec + ---
fxios + ---

People

(Reporter: bnicholson, Unassigned)

Details

This line:

> coder.encodeObject(tab.url!, forKey: "tab-\(i)-url")

is unsafe since it assumes the tab URL is non-nil. We know that tab URLs can be nil in at least one situation: when the web view is disposed (see comments and fix in bug 1145402).

At minimum, we should check for nil URLs and exclude them. A more robust alternative would be to keep a copy of the URL around in Browser that stays in sync with the web view, rather than thinly wrapping the web view URL. That would allow us to determine the web view's URL even if it's not currently loaded.
Summary: Session unsafely unwraps web view's URL → Session encoding unsafely unwraps web view's URL
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
tracking-fennec: ? → +
tracking-fxios: --- → +
You need to log in before you can comment on or make changes to this bug.