Last Comment Bug 313048 - <chrome://global/content/bindings/browser.xml>, "Error: this.docShell has no properties", still triggered by some extensions when closing a tab
: <chrome://global/content/bindings/browser.xml>, "Error: this.docShell has no ...
Status: NEW
:
Product: SeaMonkey
Classification: Client Software
Component: Tabbed Browser (show other bugs)
: Trunk
: All All
: -- normal with 3 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on: 412171
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-19 12:59 PDT by Henrik Gemal
Modified: 2008-07-31 04:30 PDT (History)
9 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Henrik Gemal 2005-10-19 12:59:38 PDT
spinoff from bug 104360.

I'm still getting the error using nightly builds of firefox.

I'm traced in down to line:

http://lxr.mozilla.org/mozilla/source/toolkit/content/widgets/browser.xml#229

if I replace the:
<property name="webNavigation" onget="return
this.docShell.QueryInterface(Components.interfaces.nsIWebNavigation);"
readonly="true"/>

with:

<property name="webNavigation" readonly="true">
<getter>
<![CDATA[
var ret;
try {
ret = this.docShell.QueryInterface(Components.interfaces.nsIWebNavigation);
} catch(ex) {
Components.classes['@mozilla.org/consoleservice;1'].getService(Components.interfaces.nsIConsoleService).logStringMessage(ex);
}
return ret;
]]>
</getter>
</property>          

I'm getting:
TypeError: this.docShell has no properties
Comment 1 Alex Vincent [:WeirdAl] 2005-10-19 13:11:43 PDT
Ooh, this is a bit uglier than in the original bug.  webNavigation is used a lot.

gemal, can you get us a complete JavaScript stack?  It would be nice to know
what sequence of functions led to this.
Comment 2 Henrik Gemal 2005-10-19 13:22:22 PDT
get_webNavigation()@chrome://global/content/bindings/browser.xml:234
get_contentDocument()@chrome://global/content/bindings/browser.xml:0
get_contentDocument()@chrome://global/content/bindings/tabbrowser.xml:0
webdeveloper_pageUnload([object
Event])@chrome://webdeveloper/content/webdeveloper.js:1187
removeChild([object XULElement])@:0
([object XULElement])@chrome://sessionsaver/content/sessionsaver.js:560
ssTabPanelUnload([object
XULElement])@chrome://sessionsaver/content/sessionsaver.js:3322
removeTab([object XULElement])@chrome://global/content/bindings/tabbrowser.xml:1282
removeCurrentTab()@chrome://global/content/bindings/tabbrowser.xml:1190
oncommand([object MouseEvent])@chrome://browser/content/browser.xul:1
@:0

Comment 3 Henrik Gemal 2005-10-19 13:23:47 PDT
and a bit different:
get_webNavigation()@chrome://global/content/bindings/browser.xml:234
get_contentDocument()@chrome://global/content/bindings/browser.xml:0
get_contentDocument()@chrome://global/content/bindings/tabbrowser.xml:0
linkToolbarPageClosedHandler([object
Event])@chrome://linktoolbar/content/linkToolbarUI.js:168
removeChild([object XULElement])@:0
([object XULElement])@chrome://sessionsaver/content/sessionsaver.js:560
ssTabPanelUnload([object
XULElement])@chrome://sessionsaver/content/sessionsaver.js:3322
removeTab([object XULElement])@chrome://global/content/bindings/tabbrowser.xml:1282
removeCurrentTab()@chrome://global/content/bindings/tabbrowser.xml:1190
oncommand([object MouseEvent])@chrome://browser/content/browser.xul:1
@:0

Comment 4 Henrik Gemal 2005-10-19 13:29:36 PDT
I think I traced in down to having this extension installed:
http://cdn.mozdev.org/linkToolbar/
http://downloads.mozdev.org/cdn/linkToolbar/linkToolbar.xpi

if I have that extension installed I can get the error. If I remove the
extension I cant get the error.

I'm not sure about the other extensions. Perhaps I can get the same error using
one of those but at least I can reproduce this one.

After you install the extension try opening some sites in new tabs and then
close the tabs and you should see the error.
Comment 5 Alex Vincent [:WeirdAl] 2005-10-19 13:37:28 PDT
Okay, I am a bit skeptical of this being a bug in the toolkit/xpfe products. 
The stack suggests event listeners from outside extensions are improperly trying
to reference a property that has already been wiped out by a browser closing.
Comment 6 Bradley Chapman (not reading bugmail, still gone but not forever) 2005-10-19 14:39:33 PDT
I suspect that this may be a long-standing bug in one of the tab extensions
and/or the Web Developer extension, as I have been getting this error for a very
long time now, and I have had WebDev installed for a long time now.
Comment 7 Henrik Gemal 2005-10-19 22:34:23 PDT
But it's not only a bug in the extension since it's a firefox chrome error
message that we get.
Comment 8 Henrik Gemal 2005-10-20 01:50:09 PDT
Chris: do you have any idea what in Link Toolbar that can cause this to happen?
Comment 9 Henrik Skupin (:whimboo) [away 09/30 - 10/06] 2005-10-20 12:38:27 PDT
Same happens for me with Webdeveloper enabled. Deactivating the extension
doesn't show up the javascript error anymore.
Comment 10 Chris Pederick 2005-10-20 12:59:02 PDT
I'm not sure if this is related, but in a separate bug Phil Ringnalda was
helping me with some issues related to event listener leaking in the Web
Developer extension:

https://bugzilla.mozilla.org/show_bug.cgi?id=309775#c74

I'm fixing this for the next release of the extension and I'm not sure if this
may be causing some of the errors mentioned in this bug.
Comment 11 Serge Gautherie (:sgautherie) 2008-03-31 18:42:31 PDT
Henrik (both), Bradley,

You wrote this error was triggered by LinkToolbar and WebDeveloper extensions, when closing a tab.
Which versions of the application and extensions did you use ?
Can you reproduce with current versions ?

Note You need to log in before you can comment on or make changes to this bug.