Closed Bug 897386 Opened 13 years ago Closed 13 years ago

swapDocShells is not a function

Categories

(Core :: XUL, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla25
Tracking Status
firefox24 --- unaffected
firefox25 + verified

People

(Reporter: Honza, Assigned: mrbkap)

References

Details

(Whiteboard: [firebug-p1])

Attachments

(1 file)

I am seeing an exception "swapDocShells is not a function" when detaching Firebug from the browser window. The exception appears only in Nightly (started 07/19), Aurora works fine. STR: 1) Install Firebug in Nightly https://getfirebug.com/releases/firebug/1.12/firebug-1.12.0b4.xpi 2) Start the browser, open Firebug (F12) 3) Detach Firebug (Open Firebug in New Window) -> There is an exception "swapDocShells is not a function" Here is the swapDocShells API usage in Firebug source: https://github.com/firebug/firebug/blob/master/extension/content/firebug/chrome/chrome.js#L1201 Honza
I am not sure if the Component for this bug report is properly set. Honza
> The exception appears only in Nightly (started 07/19) What are the changeset IDs for the last working and first broken nightly?
According to Firebug Test bot: https://getfirebug.com/testresults Last working: 0cef7fe1f04b5124680e4fd2e4c459bcc29629e4 (App Changeset af4e3ce8c487) First broken: 91aec080bc917ae3bb78b0a39ea7f30189706910 (App Changeset 0d0263a58f06) Honza
OK, so http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=af4e3ce8c487&tochange=0d0263a58f06 Blake, anything in there that might have affected XBL binding teardown? Jan, are you able to bisect builds to narrow this down further?
Flags: needinfo?(mrbkap)
Version: 20 Branch → Trunk
It's possible that this is a regression from bug 796061.
Flags: needinfo?(mrbkap)
Blocks: 896900
wchen and I debugged this yesterday and found that the Firebug code works because of two distinct bugs: * nsIDocument::AdoptNode doesn't tear down XBL bindings on nodes that weren't in a document. * Once we'd updated the <browser>'s nodeinfo and it was in the new document, we could no longer find the XBL binding because it wasn't in OwnerDoc()->GetBindingManager()! That meant that we were perfectly happy to bind a new binding in the new document, making things mostly work. With the patch in bug 796061, the second bug no longer happens -- we now track the XBL binding across the node adoption and badness ensues. Unfortunately, we can't fix this by simply calling into the binding manager from Adopt because that can run script that needs to run off of a scriptrunner and the scriptrunner in this case will run too late (after we need to re-attach the binding once the node is in the new document).
Attachment #783456 - Flags: review?(jonas)
Blocks: 897043
Assignee: nobody → mrbkap
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Just updated to latest Nightly and the problem is gone. Built from http://hg.mozilla.org/mozilla-central/rev/a0dd80f800e2 Thanks! Honza
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: