Closed Bug 583107 Opened 14 years ago Closed 12 years ago

Get rid of FAH_getCurrentContext() method

Categories

(DevTools :: Console, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ddahl, Assigned: msucan)

References

Details

(Whiteboard: [console-2] [fixed by bug 673148 or 688981])

To quote gavin in bug 579954:

> >   getCurrentContext: function FAH_getCurrentContext()
> 
> I'd like to get rid of this function. I don't fully understand the ownership
> models of the various objects involved, though. I assume there is only ever a
> single HUDService instance, and it appears that it keeps track of individual
> content windows. It's easy (though not necessarily cheap) to map content
> windows to their chrome window parent (as the snippet of code above does), so
> there should be no need to ever get the "most recent window".

snippet:

var xulWindow = aContentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIWebNavigation)
                              .QueryInterface(Ci.nsIDocShell)
                              .chromeEventHandler.ownerDocument.defaultView;
Blocks: 529086
Summary: Get rid of currentContext() method → Get rid of FAH_getCurrentContext() method
Whiteboard: [kd4b4]
an email conversation was started, but I'll continue it here:

----- Original Message -----
From: "Kevin Dangoor" <kdangoor@mozilla.com>
To: "david Dahl" <ddahl@mozilla.com>
Sent: Thursday, August 5, 2010 6:31:08 AM
Subject: FAH_getCurrentContext

Hi David,

I don't understand the importance of this bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=583107

Is this just a removal of code, or is there a change in behavior here? (And,
most importantly, is there any user impact?)
-------------------------------

I think gavin means that we need a less "shortcuty" way to identify and get a handle on the dom window or web console that is currently focused. So this is not just a removal of code but also writing a better method that is part of the HUDService.
There's no direct user impact, apart from possible bugs related to using the "focused" window rather than a direct reference. Just a code sanity issue that I think we should fix.
OK, code sanity issue can wait a little bit to get to it. Thanks for the clarification!
Whiteboard: [kd4b4] → [kd4b6]
Whiteboard: [kd4b6] → [kd4b7]
Whiteboard: [kd4b7]
Whiteboard: [console-2]
Component: Developer Tools → Developer Tools: Console
QA Contact: developer.tools → developer.tools.console
Assignee: nobody → mihai.sucan
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [console-2] → [console-2] [fixed by bug 673148 or 688981]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.