The default bug view has changed. See this FAQ.

"ASSERTION: Element without owner document" with createDocumentType

RESOLVED FIXED

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Jesse Ruderman, Assigned: smaug)

Tracking

(Blocks: 1 bug, {assertion, testcase})

Trunk
x86
Mac OS X
assertion, testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
Created attachment 556361 [details]
testcase

###!!! ASSERTION: Element without owner document: 'Error', file content/base/src/nsGenericElement.cpp, line 1372

Updated

6 years ago
Depends on: 675166
(Assignee)

Updated

6 years ago
Assignee: nobody → Olli.Pettay
(Assignee)

Comment 1

6 years ago
Created attachment 556386 [details] [diff] [review]
patch

The NS_ERROR is just wrong, but to get right behavior after bug 675166 is fixed,
we should use GetOwnerDocument.
(Assignee)

Updated

6 years ago
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.
(Assignee)

Comment 3

6 years ago
Because after bug 675166 GetOwnerDoc() will actually return something in this case, 
and we don't actually want that something but null.
(Assignee)

Comment 4

6 years ago
But ok, if DOM Core has changed, this patch is wrong.
(Assignee)

Comment 5

6 years ago
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)
(Assignee)

Comment 6

6 years ago
Fixed in bug 675166
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.