don't access to gBrowser before it is initialized

This commit is contained in:
SHIMODA Hiroshi 2010-12-08 16:38:00 +09:00
parent 6ad8ff635d
commit f54f673b73
2 changed files with 5 additions and 3 deletions

View File

@ -28,7 +28,7 @@
<script type="application/javascript"><![CDATA[
// for backward compatibility
window.TreeStyleTabBrowserAutoHide = TreeStyleTabService.autoHideWindow;
var TreeStyleTabBrowserAutoHide = TreeStyleTabService.autoHideWindow;
// preload images
TreeStyleTabService.observe(

View File

@ -1426,6 +1426,10 @@ function AutoHideWindow(aWindow)
this.init(aWindow);
}
AutoHideWindow.prototype = {
get browser()
{
return this.treeStyleTab.browser;
},
// mode
@ -1516,13 +1520,11 @@ AutoHideWindow.prototype = {
this.window = aWindow;
this.document = aWindow.document;
this.treeStyleTab = aWindow.TreeStyleTabService;
this.browser = this.treeStyleTab.browser;
},
destroy : function AHB_destroy()
{
delete this.treeStyleTab;
delete this.browser;
delete this.document;
delete this.window;
}