Closed Bug 303502 Opened 19 years ago Closed 19 years ago

make DOM "Don't call me!" asserts more meaningful.

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bc, Assigned: bc)

Details

Attachments

(1 file)

When tracking assertions, simple asserts with "Don't call me!" don't really help
in easily determining the location of the problem. While asserts do show the
file/line number, these can change over time making automatic historical
comparisons difficult.
Attached patch patchSplinter Review
Attachment #191660 - Flags: superreview?(jst)
Attachment #191660 - Flags: review?(peterv)
Comment on attachment 191660 [details] [diff] [review]
patch

>Index: content/html/document/src/nsHTMLDocument.cpp
>===================================================================

> nsresult
> nsHTMLDocument::UpdateNameTableEntry(const nsAString& aName,
>                                      nsIContent *aContent)
> {
>-  NS_ASSERTION(!IsXHTML(), "Don't call me on an XHTML document!!!");
>+  NS_ASSERTION(!IsXHTML(), 
>+  "nsHTMLDocument::UpdateNameTableEntry Don't call me on an XHTML document!!!");

I'd really prefer if these were all like this:

"Don't call nsHTMLDocument::UpdateNameTableEntry on an XHTML document!!!"

instead of just prefixing them.
Attachment #191660 - Flags: review?(peterv) → review+
Comment on attachment 191660 [details] [diff] [review]
patch

sr=jst
Attachment #191660 - Flags: superreview?(jst) → superreview+
jst, I don't seem to have permission to check this in, can you take it for me?
The patch still applies cleanly with some offsets.
Assignee: general → jst
I found my cvs horkage. Will check this into trunk later today.
Assignee: jst → bob
Checking in content/html/document/src/nsHTMLDocument.cpp;
/cvsroot/mozilla/content/html/document/src/nsHTMLDocument.cpp,v  <-- 
nsHTMLDocument.cpp
new revision: 3.625; previous revision: 3.624
done
Checking in dom/src/base/nsDOMClassInfo.cpp;
/cvsroot/mozilla/dom/src/base/nsDOMClassInfo.cpp,v  <--  nsDOMClassInfo.cpp
new revision: 1.308; previous revision: 1.307
Status: NEW → RESOLVED
Closed: 19 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

Created:
Updated:
Size: