Closed Bug 941739 Opened 11 years ago Closed 11 years ago

Add current process ID to assertion failures

Categories

(Core :: XPCOM, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: jorendorff, Assigned: ehsan.akhgari)

Details

Attachments

(1 file)

Ideally thread ids too. Bug 931444 triggered this, because in the log there are two "Assertion failed" messages, and either one alone should have been fatal.

(I'd be happy if every line of the log had a pid and threadid on it. I hear concurrency is the future.)
Please file another bug for the second paragraph :)
Filed bug 941742.
Assignee: nobody → ehsan
Attachment #8336193 - Flags: review?(nfroyd)
Comment on attachment 8336193 [details] [diff] [review]
Print the current process and thread information on XPCOM assertions and string leaks stats; r=froydnj

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

::: xpcom/string/src/nsSubstring.cpp
@@ +29,5 @@
> +#ifdef XP_WIN
> +#include <windows.h>
> +#include <process.h>
> +#define getpid() _getpid()
> +#define pthread_self() GetCurrentThreadId()

Ugh.  Can you file a followup bug for XPCOM on adding GetProcessId/GetThreadId (or whatever names won't conflict with windows headers) so we can not do this here?  (Other places do similar things, too, and those should be fixed as well.)
Attachment #8336193 - Flags: review?(nfroyd) → review+
Sure, filed bug 941801.
https://hg.mozilla.org/mozilla-central/rev/bad7c90bb630
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: