<chrome://global/content/bindings/browser.xml>, "Error: this.docShell has no properties", still triggered by some extensions when closing a tab

NEW
Unassigned

Status

SeaMonkey
Tabbed Browser
12 years ago
9 years ago

People

(Reporter: Henrik Gemal, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
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
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.
(Reporter)

Comment 2

12 years ago
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

(Reporter)

Comment 3

12 years ago
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

(Reporter)

Comment 4

12 years ago
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.
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.
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.
(Reporter)

Comment 7

12 years ago
But it's not only a bug in the extension since it's a firefox chrome error
message that we get.
(Reporter)

Comment 8

12 years ago
Chris: do you have any idea what in Link Toolbar that can cause this to happen?
Same happens for me with Webdeveloper enabled. Deactivating the extension
doesn't show up the javascript error anymore.
OS: Windows XP → All
Hardware: PC → All

Comment 10

12 years ago
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.
Depends on: 412171
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 ?
Summary: still getting <chrome://global/content/bindings/browser.xml>, "Error: this.docShell has no properties"; → <chrome://global/content/bindings/browser.xml>, "Error: this.docShell has no properties", still triggered by some extensions when closing a tab
(Assignee)

Updated

9 years ago
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.