mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Make forward declarations work with nsCOMPtr (bug 107291), r=sicking@bigfoot.com, sr=dbaron@fas.harvard.edu
This commit is contained in:
parent
b83ec4cf48
commit
53ea2dfc93
@ -51,7 +51,6 @@
|
||||
//#define DO_NEW_REFLOW
|
||||
#endif
|
||||
|
||||
#include "nsIDOMMouseListener.h"
|
||||
#include "nsAreaFrame.h"
|
||||
#include "nsIFormControlFrame.h"
|
||||
#include "nsIComboboxControlFrame.h"
|
||||
@ -65,6 +64,7 @@
|
||||
#include "nsIScrollableViewProvider.h"
|
||||
#include "nsIStatefulFrame.h"
|
||||
|
||||
class nsIDOMMouseListener;
|
||||
class nsIView;
|
||||
class nsStyleContext;
|
||||
class nsIHTMLContent;
|
||||
|
@ -51,7 +51,6 @@
|
||||
//#define DO_NEW_REFLOW
|
||||
#endif
|
||||
|
||||
#include "nsIDOMMouseListener.h"
|
||||
#include "nsAreaFrame.h"
|
||||
#include "nsIFormControlFrame.h"
|
||||
#include "nsIComboboxControlFrame.h"
|
||||
@ -65,6 +64,7 @@
|
||||
#include "nsIScrollableViewProvider.h"
|
||||
#include "nsIStatefulFrame.h"
|
||||
|
||||
class nsIDOMMouseListener;
|
||||
class nsIView;
|
||||
class nsStyleContext;
|
||||
class nsIHTMLContent;
|
||||
|
@ -444,17 +444,6 @@ class nsCOMPtr
|
||||
: private nsCOMPtr_base
|
||||
#endif
|
||||
{
|
||||
enum { _force_even_compliant_compilers_to_fail_ = sizeof(T) };
|
||||
/*
|
||||
The declaration above exists specifically to make |nsCOMPtr<T>| _not_ compile with only
|
||||
a forward declaration of |T|. This should prevent Windows and Mac engineers from
|
||||
breaking Solaris and other compilers that naturally have this behavior. Thank
|
||||
<law@netscape.com> for inventing this specific trick.
|
||||
|
||||
Of course, if you're using |nsCOMPtr| outside the scope of wanting to compile on
|
||||
Solaris and old GCC, you probably want to remove the enum so you can exploit forward
|
||||
declarations.
|
||||
*/
|
||||
|
||||
#ifdef NSCAP_FEATURE_DEBUG_PTR_TYPES
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user