Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Resolve conflicts when porting Issue 5883: Error topWindow.exportFire…

…bug is not a function while ...
  • Loading branch information...
commit f95f305741fcb067e1ec72355a5d127f0c1e0708 1 parent 2b06d80
@janodvarko janodvarko authored
Showing with 24 additions and 9 deletions.
  1. +24 −9 extension/content/firebug/firebug.js
View
33 extension/content/firebug/firebug.js
@@ -861,11 +861,11 @@ window.Firebug =
// TODO reattach
// window is closing in detached mode
- if (Firebug.chrome.window.top)
+ var parent = this.getFirebugFrameParent();
+ if (parent)
{
- topWindow = Firebug.chrome.window.top;
- topWindow.exportFirebug();
- topWindow.close();
+ parent.exportFirebug();
+ parent.close();
}
Firebug.setPlacement("minimized");
@@ -906,9 +906,9 @@ window.Firebug =
//detached -> inbrowser
if (!forceOpen && Firebug.isDetached())
{
- var topWin = Firebug.chrome.window.top;
- topWin.exportFirebug();
- topWin.close();
+ var parent = this.getFirebugFrameParent();
+ parent.exportFirebug();
+ parent.close();
if (reopenInBrowser)
{
@@ -953,7 +953,6 @@ window.Firebug =
Firebug.StartButton.resetTooltip();
},
-
detachBar: function()
{
if (Firebug.isDetached()) // can be set true attachBrowser
@@ -964,8 +963,8 @@ window.Firebug =
if (Firebug.chrome.waitingForDetach)
return null;
- Firebug.chrome.waitingForDetach = true;
+ Firebug.chrome.waitingForDetach = true;
Firebug.chrome.toggleOpen(false); // don't show in browser.xul now
if (FBTrace.DBG_ACTIVATION)
@@ -996,6 +995,22 @@ window.Firebug =
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ /**
+ * Returns parent of the firebugFrame.xul frame. The actual parent depends on whether
+ * Firebug is attached or detached.
+ *
+ * attached -> browser.xul
+ * detached -> firebug.xul
+ */
+ getFirebugFrameParent: function()
+ {
+ // We need firebug.xul in case of detached state. So, don't use 'top' since
+ // it references browser.xul
+ return Firebug.chrome.window.parent;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// deprecated
resetAllOptions: function(confirm)
Please sign in to comment.
Something went wrong with that request. Please try again.