Closed Bug 832831 Opened 11 years ago Closed 11 years ago

Make NS_ASSERT_OWNINGTHREAD_AND_NOT_CCTHREAD fatal

Categories

(Core :: XPCOM, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: bjacob, Assigned: bjacob)

Details

Attachments

(1 file, 1 obsolete file)

NS_ASSERT_OWNINGTHREAD is fatal since bug 753659.

NS_ASSERT_OWNINGTHREAD_AND_NOT_CCTHREAD seems like it should be, too. That catches the mistake of accidentally pasting a UNLINK macro in one class's TRAVERSE block.
Attachment #704413 - Flags: review?(khuey)
Comment on attachment 704413 [details] [diff] [review]
make NS_ASSERT_OWNINGTHREAD_AND_NOT_CCTHREAD fatal

Review of attachment 704413 [details] [diff] [review]:
-----------------------------------------------------------------

::: xpcom/glue/nsISupportsImpl.h
@@ +66,5 @@
>    do { \
>      if (NS_IsCycleCollectorThread()) { \
>        NS_ERROR("Changing refcount of " #_class " object during Traverse is " \
>                 "not permitted!"); \
> +      NS_ABORT(); \

Why can't this just be

MOZ_NOT_REACHED("Changing refcount ...");

?
> Why can't this just be
> 
> MOZ_NOT_REACHED("Changing refcount ...");
> 
> ?

Because... BECAUSE!
Attachment #704413 - Attachment is obsolete: true
Attachment #704413 - Flags: review?(khuey)
Attachment #704516 - Flags: review?(khuey)
https://hg.mozilla.org/mozilla-central/rev/bdfca6aa9742
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: