Don't include prtypes.h in base/basictypes.h

RESOLVED FIXED in mozilla18

Status

()

Core
IPC
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

(Blocks: 2 bugs)

Trunk
mozilla18
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 662508 [details] [diff] [review]
Patch v1

We've been trying to avoid including prtypes.h; to my surprise, it didn't actually take much to remove the include from base/basictypes.h. Passes try.
Attachment #662508 - Flags: review?(jones.chris.g)
Comment on attachment 662508 [details] [diff] [review]
Patch v1

>diff --git a/xpcom/glue/nsTraceRefcnt.h b/xpcom/glue/nsTraceRefcnt.h
>--- a/xpcom/glue/nsTraceRefcnt.h
>+++ b/xpcom/glue/nsTraceRefcnt.h
>@@ -11,34 +11,34 @@
> 
> #define NS_LOG_ADDREF(_p, _rc, _type, _size) \
>   NS_LogAddRef((_p), (_rc), (_type), (uint32_t) (_size))
> 
> #define NS_LOG_RELEASE(_p, _rc, _type) \
>   NS_LogRelease((_p), (_rc), (_type))
> 
> #define MOZ_COUNT_CTOR(_type)                                 \
>-PR_BEGIN_MACRO                                                \
>+do {                                                          \
>   NS_LogCtor((void*)this, #_type, sizeof(*this));             \
>-PR_END_MACRO
>+} while (0);

This changes semantics; PR_END_MACRO is

#define PR_END_MACRO    } while (0)

This is important to preserve, so that the macro expansion follows the
same rules as any other C++ statement.

r=me with that and all the ones below fixed.
Attachment #662508 - Flags: review?(jones.chris.g) → review+
(Assignee)

Comment 2

5 years ago
Woops, that should teach me to actually take a closer look at the macro I'm replacing!
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/mozilla-central/rev/50fde7a256f1
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
(Assignee)

Updated

5 years ago
Blocks: 796941
(Assignee)

Updated

4 years ago
Blocks: 785103
You need to log in before you can comment on or make changes to this bug.