sidebar contentWindow NS_NOINTERFACE exception after re-opening

RESOLVED INCOMPLETE

Status

()

Firefox
General
RESOLVED INCOMPLETE
10 years ago
7 years ago

People

(Reporter: Tony Cassandra, Unassigned)

Tracking

3.0 Branch
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [CLOSEME 2010-07-30])

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b4) Gecko/2008030318 Firefox/3.0b4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b4) Gecko/2008030318 Firefox/3.0b4

From an extension's chrome code, the following javascript works until you close the (overlayed) sidebar and re-open it:

	   var sbNode = document.getElementById("sidebar"); 
	   if ( ! sbNode.contentWindow )
		  return null;
	   return sbNode.contentWindow;

As long as the sidebar has not been closed and re-opened, the contentWindow is returned.

Once the sidebar is closed and re-opened, just the check for "( ! sbNode.contentWindow )" throws an exception which I catch and print as:

Exception trying to get sidebar: locally MSG=[Exception... "Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsIInterfaceRequestor.getInterface]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: chrome://global/content/bindings/browser.xml :: get_contentWindow :: line 0"  data: no]

This problem does not seem to exist in pre-FF 3.0 versions.



Reproducible: Always

Steps to Reproduce:
1. Open custom/overlayed sidebar
2. Close custom/overlayed sidebar
3. Open custom/overlayed sidebar
4. Attempt to get sidebar contentWindow via chrome code with:
     var sbNode = document.getElementById("sidebar"); 
     if ( ! sbNode.contentWindow )
         return null;
     return sbNode.contentWindow;

Actual Results:  
The 'if' condition throws an exception.

Expected Results:  
Content window should exist and no exception should be thrown.


This is reproducible in the FF extension I am working on, and does not happen on pre-FF 3.0 versions.  I don't think there is anything peculiar about my extension in regards to this bug, but I have not attempted to reproduce this bug outside my extension.
Reporter, are you still seeing this issue with Firefox 3.6.x or later in safe mode? If not, please close. These links can help you in your testing.
http://support.mozilla.com/kb/Safe+Mode
http://support.mozilla.com/kb/Managing+profiles
Whiteboard: [CLOSEME 2010-07-30]
Version: unspecified → 3.0 Branch
No reply, INCOMPLETE. Please retest with Firefox 3.6.8 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.