Closed Bug 488669 Opened 17 years ago Closed 17 years ago

Port Bug 488238 [Blank about:sessionrestore] to SeaMonkey

Categories

(SeaMonkey :: Session Restore, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.0b1

People

(Reporter: misak.bugzilla, Assigned: misak.bugzilla)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch ported patch (obsolete) — — Splinter Review
it doesn't make much sense to display about:sessionrestore when we don't have data for any open windows at all.
Attachment #373080 - Flags: superreview?(neil)
Attachment #373080 - Flags: review?(neil)
Comment on attachment 373080 [details] [diff] [review] ported patch >+ let winData = aState.windows || null; >+ if (!winData || winData.length == 0) >+ return false; >+ > // don't wrap a single about:sessionrestore page >- let winData = aState.windows || null; >- if (winData && winData.length == 1 && winData[0].tabs && >+ if (winData.length == 1 && winData[0].tabs && > winData[0].tabs.length == 1 && winData[0].tabs[0].entries && > winData[0].tabs[0].entries.length == 1 && > winData[0].tabs[0].entries[0].url == "about:sessionrestore") Does this work if rewritten as: if (!aState.windows || !aState.windows.length) return false; let winData = aState.windows; if (winData.length == 1 && winData[0].tabs &&
Attached patch as suggested (obsolete) — — Splinter Review
I don't have test for this case, but can't see any reason why not.
Attachment #373080 - Attachment is obsolete: true
Attachment #373093 - Flags: superreview?(neil)
Attachment #373093 - Flags: review?(neil)
Attachment #373080 - Flags: superreview?(neil)
Attachment #373080 - Flags: review?(neil)
(In reply to comment #1) > (From update of attachment 373080 [details] [diff] [review]) > >+ let winData = aState.windows || null; > >+ if (!winData || winData.length == 0) > >+ return false; > >+ > > // don't wrap a single about:sessionrestore page > >- let winData = aState.windows || null; > >- if (winData && winData.length == 1 && winData[0].tabs && > >+ if (winData.length == 1 && winData[0].tabs && > > winData[0].tabs.length == 1 && winData[0].tabs[0].entries && > > winData[0].tabs[0].entries.length == 1 && > > winData[0].tabs[0].entries[0].url == "about:sessionrestore") > Does this work if rewritten as: > if (!aState.windows || !aState.windows.length) > return false; > > let winData = aState.windows; > if (winData.length == 1 && winData[0].tabs && I don't see any benefit of doing it this way. "|| null" seems unnecessary in the original patch, though.
Comment on attachment 373093 [details] [diff] [review] as suggested >+ if (winData.length == 1 && winData[0].tabs && Nit: trailing spaces [there were some on the previous patch too, so maybe they moved ;-) ]
Attachment #373093 - Flags: superreview?(neil)
Attachment #373093 - Flags: superreview+
Attachment #373093 - Flags: review?(neil)
Attachment #373093 - Flags: review+
carrying forward r+ sr+ from Neil.
Attachment #373093 - Attachment is obsolete: true
Attachment #373101 - Flags: superreview+
Attachment #373101 - Flags: review+
Keywords: checkin-needed
OS: All → Mac OS X
Attachment #373101 - Attachment description: nits fixed, for checkin → nits fixed, for checkin [Checkin: Comment 6]
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.0b1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: