Closed Bug 864041 Opened 13 years ago Closed 11 years ago

Remove Firefox 2+3 compat code from about:sessionrestore

Categories

(Firefox :: Session Restore, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
Firefox 34

People

(Reporter: mkohler, Assigned: nyee, Mentored)

Details

(Whiteboard: [good first bug][lang=js])

Attachments

(1 file, 5 obsolete files)

There is Firefox 2 and Firefox 3 compat code in nsSessionStartup. I think we can remove this.
Attached patch Patch v1 (obsolete) — Splinter Review
Assignee: nobody → mkohler
Status: NEW → ASSIGNED
Attachment #739989 - Flags: review?(ttaubert)
Comment on attachment 739989 [details] [diff] [review] Patch v1 Review of attachment 739989 [details] [diff] [review]: ----------------------------------------------------------------- This looks good but we should do the same in browser/components/sessionstore/content/aboutSessionRestore.js. Also, we should remove the test for bug 581593 which is just about this backwards compatibility.
Attachment #739989 - Flags: review?(ttaubert) → feedback+
Attached patch Patch v2 (obsolete) — Splinter Review
Attachment #739989 - Attachment is obsolete: true
Attachment #766359 - Flags: review?(ttaubert)
Comment on attachment 766359 [details] [diff] [review] Patch v2 Review of attachment 766359 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/components/sessionstore/content/aboutSessionRestore.js @@ +24,5 @@ > gStateObject = JSON.parse(sessionData.value); > } > catch (exJSON) { > var s = new Cu.Sandbox("about:blank", {sandboxName: 'aboutSessionRestore'}); > + gStateObject = Cu.evalInSandbox(sessionData.value, s); I think it would be sufficient if we just do "gStateObject = JSON.parse(sessionData.value);" without a try statement. If sessionData.value is invalid we should just throw an error and there is nothing to show on the page anyway.
Attachment #766359 - Flags: review?(ttaubert)
Attached patch Patch v3 (obsolete) — Splinter Review
Attachment #766359 - Attachment is obsolete: true
Attachment #771786 - Flags: review?(ttaubert)
Comment on attachment 771786 [details] [diff] [review] Patch v3 Review of attachment 771786 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #771786 - Flags: review?(ttaubert) → review+
Comment on attachment 771786 [details] [diff] [review] Patch v3 Sorry, revoking my r+ for now. It seems that this breaks browser/components/sessionstore/test/browser_586068-apptabs.js for some reason.
Attachment #771786 - Flags: review+
This does also fail when running the whole test suite: /browser/components/sessionstore/test/browser_601955.js | first tab should not be pinned yet Both tests seem to do fine when run in single mode.
Assignee: mkohler → nobody
The code in nsSessionStartup has been removed already by another patch. What's left is to remove the rest of it in about:sessionrestore, just like Michael's patch did already.
Summary: Delete Firefox 2 and Firefox 3 compat in nsSessionStartup → Remove Firefox 2+3 compat code from about:sessionrestore
Whiteboard: [good first bug][mentor=ttaubert][lang=js]
Mentor: ttaubert
Whiteboard: [good first bug][mentor=ttaubert][lang=js] → [good first bug][lang=js]
Attached patch bug-864041-fix (obsolete) — Splinter Review
This is the fix for the only Firefox 2+3 backwards compatibility code I have managed to find as of now.
Attachment #8454845 - Flags: review?(mak77)
Comment on attachment 8454845 [details] [diff] [review] bug-864041-fix Review of attachment 8454845 [details] [diff] [review]: ----------------------------------------------------------------- Hi, I think you should still remove test browser_581593.js, remove the try/catch (keeping just the JSON.parse call). Basically here we are undoing Bug 581593 (most of http://hg.mozilla.org/mozilla-central/rev/c04353b79cfa), that is what the previous patch attached here was doing, apart from the nsSessionStartup changes. Also, considered the previous attempt failed on some tests, we need a Try server run... Do you have Commit level 1 access? If not, just attach the patch and needinfo me, I will push there for you.
Attachment #8454845 - Flags: review?(mak77) → feedback-
Assignee: nobody → ny.nathan.yee
Attached patch bug-864041-fix (obsolete) — Splinter Review
Attachment #8454845 - Attachment is obsolete: true
Attachment #8457410 - Flags: review?(mak77)
Attached patch bug-864041-fixSplinter Review
Attachment #8457410 - Attachment is obsolete: true
Attachment #8457410 - Flags: review?(mak77)
Attachment #8457416 - Flags: review?(mak77)
I do not currently have Commit level 1 access. Do you happen to know any way I could be granted this?
Flags: needinfo?(mak77)
Reminder comment for someone to push the patch to try server.
Flags: needinfo?(mak77)
Sorry, I totally missed that I'm the mentor for this bug :/ Marco was so kind to take over while I was away. I'll push it to try in a minute, Nathan. Thank you for working on this!
Attachment #771786 - Attachment is obsolete: true
Comment on attachment 8457416 [details] [diff] [review] bug-864041-fix Review of attachment 8457416 [details] [diff] [review]: ----------------------------------------------------------------- Try says it's good to go!
Attachment #8457416 - Flags: review?(mak77) → review+
Is this checkin-needed then?
Keywords: checkin-needed
Whiteboard: [good first bug][lang=js] → [good first bug][lang=js][fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [good first bug][lang=js][fixed-in-fx-team] → [good first bug][lang=js]
Target Milestone: --- → Firefox 34
QA Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: