Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…bug is not a function while ...
  • Loading branch information...
commit f95f305741fcb067e1ec72355a5d127f0c1e0708 1 parent 2b06d80
Jan Odvarko authored September 05, 2012

Showing 1 changed file with 24 additions and 9 deletions. Show diff stats Hide diff stats

  1. 33  extension/content/firebug/firebug.js
33  extension/content/firebug/firebug.js
@@ -861,11 +861,11 @@ window.Firebug =
861 861
             // TODO reattach
862 862
 
863 863
             // window is closing in detached mode
864  
-            if (Firebug.chrome.window.top)
  864
+            var parent = this.getFirebugFrameParent();
  865
+            if (parent)
865 866
             {
866  
-                topWindow = Firebug.chrome.window.top;
867  
-                topWindow.exportFirebug();
868  
-                topWindow.close();
  867
+                parent.exportFirebug();
  868
+                parent.close();
869 869
             }
870 870
 
871 871
             Firebug.setPlacement("minimized");
@@ -906,9 +906,9 @@ window.Firebug =
906 906
         //detached -> inbrowser
907 907
         if (!forceOpen && Firebug.isDetached())
908 908
         {
909  
-            var topWin = Firebug.chrome.window.top;
910  
-            topWin.exportFirebug();
911  
-            topWin.close();
  909
+            var parent = this.getFirebugFrameParent();
  910
+            parent.exportFirebug();
  911
+            parent.close();
912 912
 
913 913
             if (reopenInBrowser)
914 914
             {
@@ -953,7 +953,6 @@ window.Firebug =
953 953
         Firebug.StartButton.resetTooltip();
954 954
     },
955 955
 
956  
-
957 956
     detachBar: function()
958 957
     {
959 958
         if (Firebug.isDetached())  // can be set true attachBrowser
@@ -964,8 +963,8 @@ window.Firebug =
964 963
 
965 964
         if (Firebug.chrome.waitingForDetach)
966 965
             return null;
967  
-        Firebug.chrome.waitingForDetach = true;
968 966
 
  967
+        Firebug.chrome.waitingForDetach = true;
969 968
         Firebug.chrome.toggleOpen(false);  // don't show in browser.xul now
970 969
 
971 970
         if (FBTrace.DBG_ACTIVATION)
@@ -996,6 +995,22 @@ window.Firebug =
996 995
     },
997 996
 
998 997
     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
  998
+
  999
+    /**
  1000
+     * Returns parent of the firebugFrame.xul frame. The actual parent depends on whether
  1001
+     * Firebug is attached or detached.
  1002
+     *
  1003
+     * attached -> browser.xul
  1004
+     * detached -> firebug.xul
  1005
+     */
  1006
+    getFirebugFrameParent: function()
  1007
+    {
  1008
+        // We need firebug.xul in case of detached state. So, don't use 'top' since
  1009
+        // it references browser.xul
  1010
+        return Firebug.chrome.window.parent;
  1011
+    },
  1012
+
  1013
+    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
999 1014
     // deprecated
1000 1015
 
1001 1016
     resetAllOptions: function(confirm)

0 notes on commit f95f305

Please sign in to comment.
Something went wrong with that request. Please try again.