Closed Bug 615034 Opened 14 years ago Closed 13 years ago

"ASSERTION: Element without owner document" with GC'd document

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached file testcase
1. Install 'DOM Fuzz Lite' from
    https://www.squarefree.com/extensions/domFuzzLite.xpi
2. Load the testcase.

###!!! ASSERTION: Element without owner document: 'Error', file content/base/src/nsGenericElement.cpp, line 3419
Attached file stack trace
Yeah, this assert is semi-bogus while documents can go away before their elements.

Luckily, we're planning to fix that...
Although I'm not sure whether we will actually force documents to live longer
than elements during unlink.
Sure, but that shouldn't be an issue for this testcase.
Depends on: strongparent
Jesse, this is fixed, right?
Yes.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
So should elements always have an ownerDocument then, ideally? Because I'm seeing currently a js error in one of my GreaseMonkey scripts that says that some element.ownerDocument is undefined.
element.ownerDocument should always point to a valid document.
.ownerDocument is defined in nsIDOMNode, so if ownerDocument is undefined, it sounds like
element isn't actually element object but something else.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: