зеркало из https://github.com/mozilla/pjs.git
better hack for crash due to recent versions of gcc's poor optimization + inlining skills. bug 106891. patch from simm0@ii.net. r=pavlov sr=brendan
This commit is contained in:
Родитель
f408343dc0
Коммит
47f8a32574
|
@ -60,18 +60,6 @@ imgContainer::~imgContainer()
|
|||
mFrames.Clear();
|
||||
}
|
||||
|
||||
#ifdef CANT_INLINE_GETTER
|
||||
// This should be inlined but inlining it breaks on recent versions of
|
||||
// gcc (2.96-85, 3.0.1) with -O2.
|
||||
nsresult imgContainer::inlinedGetFrameAt(PRUint32 index,
|
||||
gfxIImageFrame **_retval)
|
||||
{
|
||||
*_retval = NS_STATIC_CAST(gfxIImageFrame*, mFrames.ElementAt(index));
|
||||
if (!*_retval) return NS_ERROR_FAILURE;
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
//******************************************************************************
|
||||
/* void init (in nscoord aWidth, in nscoord aHeight, in imgIContainerObserver aObserver); */
|
||||
NS_IMETHODIMP imgContainer::Init(nscoord aWidth, nscoord aHeight, imgIContainerObserver *aObserver)
|
||||
|
|
|
@ -42,10 +42,6 @@
|
|||
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define CANT_INLINE_GETTER
|
||||
#endif
|
||||
|
||||
#define NS_IMGCONTAINER_CID \
|
||||
{ /* 5e04ec5e-1dd2-11b2-8fda-c4db5fb666e0 */ \
|
||||
0x5e04ec5e, \
|
||||
|
@ -77,15 +73,12 @@ private:
|
|||
return nframes;
|
||||
}
|
||||
|
||||
#ifdef CANT_INLINE_GETTER
|
||||
nsresult inlinedGetFrameAt(PRUint32 index, gfxIImageFrame **_retval);
|
||||
#else
|
||||
inline nsresult inlinedGetFrameAt(PRUint32 index, gfxIImageFrame **_retval) {
|
||||
*_retval = NS_STATIC_CAST(gfxIImageFrame*, mFrames.ElementAt(index));
|
||||
if (!*_retval) return NS_ERROR_FAILURE;
|
||||
nsISupports *_elem = mFrames.ElementAt(index);
|
||||
if (!_elem) return NS_ERROR_FAILURE;
|
||||
*_retval = NS_STATIC_CAST(gfxIImageFrame*, _elem);
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
inline nsresult inlinedGetCurrentFrame(gfxIImageFrame **_retval) {
|
||||
if (mCompositingFrame) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче