Requesting approval for 1.9.1, mostly for SeaMonkey on distributions that build with system cairo.
It's a small patch, but changes semantics a little.
With XPCOM's ref-counting system, objects typically need to be AddRefed and Released to be deleted. Without this patch nsWindow would do this and so the object would get deleted even if the caller did not. With this patch callers must AddRef and Release.
The change actually makes the behavior consistent with cocoa and winnt's GetThebesSurface().
I checked that existing callers (in 1.9.1 mozilla-central) AddRef and Release.
Comment on attachment 481492
minimal branch patch
Requesting approval for 1.9.1, mostly for SeaMonkey on distributions that build with system cairo.
It's a small patch, but changes semantics a little.
With XPCOM's ref-counting system, objects typically need to be AddRefed and Released to be deleted. Without this patch nsWindow would do this and so the object would get deleted even if the caller did not. With this patch callers must AddRef and Release.
The change actually makes the behavior consistent with cocoa and winnt's GetThebesSurface().
I checked that existing callers (in 1.9.1 mozilla-central) AddRef and Release.
nsBaseWidget: :GetRenderingCo ntext() ngContext: :Init(nsIDevice Context* , gfxASurface*)
> nsThebesRenderi
> gfxContext
nsThebesDeviceC ontext: :CreateRenderin gContext( )
nsThebesRenderi ngContext: :Init(nsIDevice Context* , nsIWidget*)
> gfxContext