Closed Bug 682651 Opened 14 years ago Closed 14 years ago

"ASSERTION: Element without owner document" with createDocumentType

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: smaug)

References

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached file testcase
###!!! ASSERTION: Element without owner document: 'Error', file content/base/src/nsGenericElement.cpp, line 1372
Depends on: 675166
Assignee: nobody → Olli.Pettay
Attached patch patchSplinter Review
The NS_ERROR is just wrong, but to get right behavior after bug 675166 is fixed, we should use GetOwnerDocument.
Attachment #556386 - Flags: review?(jonas)
Comment on attachment 556386 [details] [diff] [review] patch Review of attachment 556386 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/base/src/nsGenericElement.cpp @@ +1364,5 @@ > > already_AddRefed<nsIURI> > nsIContent::GetBaseURI() const > { > + nsIDocument* doc = GetOwnerDocument(); Why this change? This is slightly slower. Not that it matters perf wise, but doesn't seem like a win either.
Because after bug 675166 GetOwnerDoc() will actually return something in this case, and we don't actually want that something but null.
But ok, if DOM Core has changed, this patch is wrong.
Comment on attachment 556386 [details] [diff] [review] patch So, the spec has changed and this will be fixed in the bug which makes GetOwnerDoc to return always a valid value.
Attachment #556386 - Flags: review?(jonas)
Fixed in bug 675166
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
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: