Closed Bug 530354 Opened 15 years ago Closed 15 years ago

No need to check for navigator:browser before initializing SessionStore

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3.7a1

People

(Reporter: zpao, Assigned: mkohler)

Details

Attachments

(1 file, 1 obsolete file)

In browser.js (delayedStartup) we initialize SessionStore & init a window only if windowtype is navigator:browser. We don't need to do that. Perhaps this is just left over from a time we did? Or maybe a Seamonkey compatibility thing.
Attached patch patch v1 (obsolete) — Splinter Review
I don't know if this is a Seamonkey compatibility thing, so before we land the patch, we should be sure. Otherwise we'd perhaps break Seamonkey.
Assignee: nobody → michaelkohler
Status: NEW → ASSIGNED
Attachment #413925 - Flags: review?(dao)
Comment on attachment 413925 [details] [diff] [review]
patch v1

>-  // initialize the session-restore service (in case it's not already running)
>+  // initialize the session-restore service

What was wrong with the comment as it was? I think this isn't really needed for subsequent windows, so the comment seems correct.

>+  try {
>+    var ss = Cc["@mozilla.org/browser/sessionstore;1"].
>+             getService(Ci.nsISessionStore);
>+    ss.init(window);

I'd prefer this:

Cc["@mozilla.org/browser/sessionstore;1"]
  .getService(Ci.nsISessionStore)
  .init(window);

>+  } catch(ex) {

nit: catch (
Attachment #413925 - Flags: review?(dao) → review+
Component: Session Restore → General
QA Contact: session.restore → general
Attached patch patch v2Splinter Review
nits addressed
Attachment #413925 - Attachment is obsolete: true
Attachment #413927 - Flags: review+
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/10c98bccd40b
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: