Buggy code:
static final String PREFERENCE_DISABLEOPENDURINGLOAD = "dom.disable_open_during_load" ; static final String PREFERENCE_DISABLEWINDOWSTATUSCHANGE = "dom.disable_window_status_change" ; static final String PREFERENCE_LANGUAGES = "intl.accept_languages" ; static final String PREFERENCE_PROXYHOST_FTP = "network.proxy.ftp" ; static final String PREFERENCE_PROXYPORT_FTP = "network.proxy.ftp_port" ; static final String PREFERENCE_PROXYHOST_HTTP = "network.proxy.http" ; static final String PREFERENCE_PROXYPORT_HTTP = "network.proxy.http_port" ; static final String PREFERENCE_PROXYHOST_SSL = "network.proxy.ssl" ; static final String PREFERENCE_PROXYPORT_SSL = "network.proxy.ssl_port" ; static final String PREFERENCE_PROXYTYPE = "network.proxy.type" ; static final String PROFILE_AFTER_CHANGE = "profile-after-change" ; static final String PROFILE_BEFORE_CHANGE = "profile-before-change" ; static final String PROFILE_DIR = ( ( Mozilla . SEPARATOR_OS ) + "eclipse" ) + ( Mozilla . SEPARATOR_OS ) ; static final String PROFILE_DO_CHANGE = "profile-do-change" ; static final String PROPERTY_PROXYPORT = "network.proxy_port" ; static final String PROPERTY_PROXYHOST = "network.proxy_host" ; static final String SEPARATOR_LOCALE = "-" ; static final String SHUTDOWN_PERSIST = "shutdown-persist" ; static final String STARTUP = "startup" ; static final String TOKENIZER_LOCALE = "," ; static final String URI_FROMMEMORY = "file://////" ; static final String XULRUNNER_PATH = "org.eclipse.swt.browser.XULRunnerPath" ; static final String GRE_INITIALIZED = "org.eclipse.swt.browser.XULRunnerInitialized" ; public void create ( Composite parent , int style ) { } public boolean back ( ) { } void createCOMInterfaces ( ) { } void disposeCOMInterfaces ( ) { } public boolean execute ( String script ) { } static Browser findBrowser ( int handle ) { } public boolean forward ( ) { } public String getText ( ) { } public String getUrl ( ) { } public Object getWebBrowser ( ) { } public boolean isBackEnabled ( ) { } public boolean isForwardEnabled ( ) { } static String error ( int code ) { } void onDispose ( Display display ) { } void Activate ( ) { } void Deactivate ( ) { } void onResize ( ) { } public void refresh ( ) { } public boolean setText ( String html ) { } public boolean setUrl ( String url ) { } public void stop ( ) { } void hookDOMListeners ( nsIDOMEventTarget target , boolean isTop ) { } void unhookDOMListeners ( ) { } void unhookDOMListeners ( nsIDOMEventTarget target ) { } int QueryInterface ( int riid , int ppvObject ) { } int AddRef ( ) { } int Release ( ) { } int QueryReferent ( int riid , int ppvObject ) { } int GetInterface ( int riid , int ppvObject ) { } int GetWeakReference ( int ppvObject ) { } int OnStateChange ( int aWebProgress , int aRequest , int aStateFlags , int aStatus ) { } int OnProgressChange ( int aWebProgress , int aRequest , int aCurSelfProgress , int aMaxSelfProgress , int aCurTotalProgress , int aMaxTotalProgress ) { } int OnLocationChange ( int aWebProgress , int aRequest , int aLocation ) { } int OnStatusChange ( int aWebProgress , int aRequest , int aStatus , int aMessage ) { } int OnSecurityChange ( int aWebProgress , int aRequest , int state ) { } int SetStatus ( int statusType , int status ) { } int GetWebBrowser ( int aWebBrowser ) { } int SetWebBrowser ( int aWebBrowser ) { } int GetChromeFlags ( int aChromeFlags ) { } int SetChromeFlags ( int aChromeFlags ) { } int DestroyBrowserWindow ( ) { } int SizeBrowserTo ( int aCX , int aCY ) { } int ShowAsModal ( ) { } int IsWindowModal ( int retval ) { } int ExitModalEventLoop ( int aStatus ) { } int SetDimensions ( int flags , int x , int y , int cx , int cy ) { } int GetDimensions ( int flags , int x , int y , int cx , int cy ) { } int SetFocus ( ) { } int GetVisibility ( int aVisibility ) { } int SetVisibility ( int aVisibility ) { if ( isChild ) { WindowEvent event = new WindowEvent ( browser ) ; event . display = browser . getDisplay ( ) ; event . widget = browser ; <START_BUG> if ( aVisibility == 1 ) { <END_BUG> if ( ! ( visible ) ) { visible = true ; event . location = location ; event . size = size ; event . addressBar = ( ( chromeFlags ) & ( nsIWebBrowserChrome . CHROME_LOCATIONBAR ) ) != 0 ; event . menuBar = ( ( chromeFlags ) & ( nsIWebBrowserChrome . CHROME_MENUBAR ) ) != 0 ; event . statusBar = ( ( chromeFlags ) & ( nsIWebBrowserChrome . CHROME_STATUSBAR ) ) != 0 ; event . toolBar = ( ( chromeFlags ) & ( nsIWebBrowserChrome . CHROME_TOOLBAR ) ) != 0 ; for ( int i = 0 ; i < ( visibilityWindowListeners . length ) ; i ++ ) { visibilityWindowListeners [ i ] . show ( event ) ; } location = null ; size = null ; } } else { visible = false ; for ( int i = 0 ; i < ( visibilityWindowListeners . length ) ; i ++ ) { visibilityWindowListeners [ i ] . hide ( event ) ; } } } else { visible = aVisibility != 0 ; } return XPCOM . NS_OK ; } int GetTitle ( int aTitle ) { } int SetTitle ( int aTitle ) { } int GetSiteWindow ( int aSiteWindow ) { } int FocusNextElement ( ) { } int FocusPrevElement ( ) { } int OnShowContextMenu ( int aContextFlags , int aEvent , int aNode ) { } int OnStartURIOpen ( int aURI , int retval ) { } int DoContent ( int aContentType , int aIsContentPreferred , int aRequest , int aContentHandler , int retval ) { } int IsPreferred ( int aContentType , int aDesiredContentType , int retval ) { } int CanHandleContent ( int aContentType , int aIsContentPreferred , int aDesiredContentType , int retval ) { } int GetLoadCookie ( int aLoadCookie ) { } int SetLoadCookie ( int aLoadCookie ) { }

Fix:
if ( aVisibility != 0 ) {