Open Bug 1700190 Opened 2 months ago Updated 9 days ago

Session restore fails when there are gaps in data for embedded frames

Categories

(Firefox :: Session Restore, defect, P2)

defect

Tracking

()

ASSIGNED

People

(Reporter: kashav, Assigned: kashav)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [not-a-fission-bug])

Attachments

(1 file, 1 obsolete file)

STR

  1. Visit https://kashav.ca/bugs/1700190/top.html
  2. Type something into the second frame (and only the second frame)
  3. Close the tab
  4. Restore that closed tab (Ctrl-Shift-T)

Expected: the second frame restores its form data correctly.
Actual: the typed data either ends up in the first frame or sometimes is lost completely.

This repros both with and without the new collection code from bug 1572084.

What's happening is that:

  • we've only typed data into the second frame, so we're only collecting data from that frame
  • we use a placeholder null in the collected data children list for the first frame. For the above STR, the collected data looks something like: { ..., children: [null, { url: ".../form.html", ... }] }.
  • in the final flush, we copy all data from the cache here. As part of that process, we run our form data through PrivacyFilter.filterFormData here, and that function explicitly filters out null children objects.

A quick solution could be to replace the null placeholders with some special placeholder object ({isplaceholder: true}?), which the restore code will know how to deal with.

This is causing the test added in D108989 to fail.

Attached file top.html (obsolete) —
Attachment #9210836 - Attachment is obsolete: true
Summary: Session restore fails to collect data for embedded frames → Session restore fails when there are gaps in data for embedded frames
Assignee: nobody → kmadan
Severity: -- → S2
Status: NEW → ASSIGNED
Fission Milestone: --- → M7a
Priority: -- → P2
See Also: → 1704189

This fails for non-SHIP or non-Fission also.

Fission Milestone: M7a → M8
Fission Milestone: M8 → ---
Whiteboard: [not-a-fission-bug]
You need to log in before you can comment on or make changes to this bug.