Closed
Bug 462478
Opened 16 years ago
Closed 16 years ago
Make nsBrowserContentHandler use nsBrowserGlue's getMostRecentBrowserWindow()
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 3.6a1
People
(Reporter: Dolske, Assigned: Dolske)
Details
(Keywords: fixed1.9.1)
Attachments
(1 file)
4.40 KB,
patch
|
Gavin
:
review+
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
Spun off from bug 456439, which added this function to nsBrowserGlue.
Assignee | ||
Comment 1•16 years ago
|
||
Attachment #350712 -
Flags: review?(gavin.sharp)
Assignee | ||
Updated•16 years ago
|
Whiteboard: [needs review gavin]
Comment 2•16 years ago
|
||
Comment on attachment 350712 [details] [diff] [review]
Patch v.1
>diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
+ var browserGlue = Components.classes["@mozilla.org/browser/browserglue;1"]
+ .getService(Components.interfaces.nsIBrowserGlue);
+ return browserGlue.getMostRecentBrowserWindow();
You can use Cc[GLUE_CID].getService(Ci.nsIBrowserGlue) here.
>diff --git a/browser/components/nsBrowserContentHandler.js b/browser/components/nsBrowserContentHandler.js
>- // if we're lucky, this isn't a popup, and we can just return this
>- if (win && win.document.documentElement.getAttribute("chromehidden")) {
Hmm, wonder why this didn't have the "win = null;" line here that the other versions do. I suppose none of its callers handle a null return value... but it's probably not possible for there to be no (non-popup) windows when they call it anyways.
>+ var browserGlue = Components.classes["@mozilla.org/browser/browserglue;1"]
>+ .getService(Components.interfaces.nsIBrowserGlue);
>+ return browserGlue.getMostRecentBrowserWindow();
I was a bit worried that this might force instantiation of browserglue earlier than it normally would, but from reading nsAppRunner, it looks like app-startup is already fired before command line handlers are run, and browserglue's init just sets some observers anyways, so shouldn't be a problem.
Attachment #350712 -
Flags: review?(gavin.sharp) → review+
Updated•16 years ago
|
Whiteboard: [needs review gavin]
Assignee | ||
Updated•16 years ago
|
Attachment #350712 -
Flags: approval1.9.1?
Comment 3•16 years ago
|
||
Comment on attachment 350712 [details] [diff] [review]
Patch v.1
a191=beltzner
Attachment #350712 -
Flags: approval1.9.1? → approval1.9.1+
Assignee | ||
Comment 4•16 years ago
|
||
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: Firefox 3.1 → Firefox 3.2a1
Assignee | ||
Comment 5•16 years ago
|
||
Pushed to branch: http://hg.mozilla.org/releases/mozilla-1.9.1/rev/8128fdf22a41
Keywords: fixed1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•