diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index d471bb1eb3c..19850e6a146 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -1691,17 +1691,12 @@ AccumulateIntersectionsIntoDirtyRegion(nsView* aTargetView, } } -// This gets around an internal compiler error C1001 -// (compiler file 'E:\8799\vc98\p2\src\P2\main.c', line 494) -#ifdef WINCE -#pragma optimize( "", off ) -#endif -void +nsresult nsViewManager::WillBitBlit(nsView* aView, nsPoint aScrollAmount) { if (!IsRootVM()) { RootViewManager()->WillBitBlit(aView, aScrollAmount); - return; + return NS_OK; } NS_PRECONDITION(aView, "Must have a view"); @@ -1712,11 +1707,8 @@ nsViewManager::WillBitBlit(nsView* aView, nsPoint aScrollAmount) // Since the view is actually moving the widget by -aScrollAmount, that's the // offset we want to use when accumulating dirty rects. AccumulateIntersectionsIntoDirtyRegion(aView, GetRootView(), -aScrollAmount); + return NS_OK; } -#ifdef WINCE -#pragma optimize( "", on ) -#endif - // Invalidate all widgets which overlap the view, other than the view's own widgets. void diff --git a/view/src/nsViewManager.h b/view/src/nsViewManager.h index 55755ed1976..f610af8e995 100644 --- a/view/src/nsViewManager.h +++ b/view/src/nsViewManager.h @@ -468,8 +468,24 @@ public: // NOT in nsIViewManager, so private to the view module * Called to inform the view manager that a view is about to bit-blit. * @param aView the view that will bit-blit * @param aScrollAmount how much aView will scroll by + * @return always returns NS_OK + * @note + * This method used to return void, but MSVC 6.0 SP5 (without the + * Processor Pack) and SP6, and the MS eMbedded Visual C++ 4.0 SP4 + * (for WINCE) hit an internal compiler error when compiling this + * method: + * + * @par + * fatal error C1001: INTERNAL COMPILER ERROR + * (compiler file 'E:\8966\vc98\p2\src\P2\main.c', line 494) + * + * @par + * Making the method return nsresult worked around the internal + * compiler error. See Bugzilla bug 281158. (The WINCE internal + * compiler error was addressed by the patch in bug 291229 comment + * 14 although the bug report did not mention the problem.) */ - void WillBitBlit(nsView* aView, nsPoint aScrollAmount); + nsresult WillBitBlit(nsView* aView, nsPoint aScrollAmount); /** * Called to inform the view manager that a view has scrolled.