Closed Bug 950360 Opened 10 years ago Closed 10 years ago

nsWindowsShellService.cpp: error C2660: 'imgIContainer::GetFrame' : function does not take 3 arguments (Fallout from Bug 944442)

Categories

(SeaMonkey :: OS Integration, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.26

People

(Reporter: philip.chee, Assigned: philip.chee)

References

Details

Attachments

(1 file)

c:/t1/hg/comm-central/suite/shell/src/nsWindowsShellService.cpp(648) : error C2660: 'imgIContainer::GetFrame' : function does not take 3 arguments
c:/t1/hg/comm-central/config/rules.mk:998: recipe for target 'nsWindowsShellService.obj' failed
mozmake[6]: *** [nsWindowsShellService.obj] Error 2
mozmake[6]: Leaving directory 'c:/t1/hg/objdir-sm/suite/shell/src'
c:/t1/hg/comm-central/config/recurse.mk:44: recipe for target 'shell/src_libs' failed

Bug 944442 (DeCOMify imgIContainer::GetFrame) changed the function signature
Depends on: 944442
Summary: nsWindowsShellService.cpp: error C2660: 'imgIContainer::GetFrame' : function does not take 3 arguments → nsWindowsShellService.cpp: error C2660: 'imgIContainer::GetFrame' : function does not take 3 arguments (Fallout from Bug 944442)
Straight copy from Bug 944442 rs=bustage fix.
Attachment #8347630 - Flags: review+
Comment on attachment 8347630 [details] [diff] [review]
Patch v1.0 Fix build bustage. rs=me.

># HG changeset patch
># User Philip Chee <philip.chee@gmail.com>
># Date 1387036767 -28800
>#      Sat Dec 14 23:59:27 2013 +0800
># Node ID f240b1039ef4f6bd6359eb92873a61f293ff5bdf
># Parent  6c2671a5f541be9d5941fe7900f57684536516f4
>Bustage fix for Bug 950360 nsWindowsShellService.cpp: error C2660: 'imgIContainer::GetFrame' : function does not take 3 arguments (Fallout from Bug 944442).
>
>diff --git a/suite/shell/src/nsWindowsShellService.cpp b/suite/shell/src/nsWindowsShellService.cpp
>--- a/suite/shell/src/nsWindowsShellService.cpp
>+++ b/suite/shell/src/nsWindowsShellService.cpp
>@@ -637,20 +637,19 @@ nsWindowsShellService::GetCanSetDesktopB
>   return NS_OK;
> }
> 
> static nsresult
> WriteBitmap(nsIFile* aFile, imgIContainer* aImage)
> {
>   nsresult rv;
> 
>-  nsRefPtr<gfxASurface> surface;
>-  aImage->GetFrame(imgIContainer::FRAME_CURRENT,
>-                   imgIContainer::FLAG_SYNC_DECODE,
>-                   getter_AddRefs(surface));
>+  nsRefPtr<gfxASurface> surface =
>+    aImage->GetFrame(imgIContainer::FRAME_CURRENT,
>+                     imgIContainer::FLAG_SYNC_DECODE);
>   NS_ENSURE_TRUE(surface, NS_ERROR_FAILURE);
> 
>   nsRefPtr<gfxImageSurface> image(surface->GetAsReadableARGB32ImageSurface());
>   NS_ENSURE_TRUE(image, NS_ERROR_FAILURE);
> 
>   int32_t width = image->Width();
>   int32_t height = image->Height();
>
Attachment #8347630 - Attachment description: Patch v1.0 Fix build bustage. → Patch v1.0 Fix build bustage. rs=me.
Comment on attachment 8347630 [details] [diff] [review]
Patch v1.0 Fix build bustage. rs=me.

Patch has been pushed but asking for post-facto review from Neil
Attachment #8347630 - Flags: feedback?(neil)
Comment on attachment 8347630 [details] [diff] [review]
Patch v1.0 Fix build bustage. rs=me.

>+  nsRefPtr<gfxASurface> surface =
>+    aImage->GetFrame(imgIContainer::FRAME_CURRENT,
>+                     imgIContainer::FLAG_SYNC_DECODE);
>   NS_ENSURE_TRUE(surface, NS_ERROR_FAILURE);
> 
>   nsRefPtr<gfxImageSurface> image(surface->GetAsReadableARGB32ImageSurface());
[When I originally wrote nsWindowsShellService.cpp I used constructor syntax throughout. Initialiser syntax is creeping in though. MXR finds 8 = do_GetService or = do_QueryInterface although there are still 42 (do_GetService or do_QueryInterface or do_CreateInstance). The difference between the two is a C++ technicality that's not relevant here.]
Attachment #8347630 - Flags: feedback?(neil) → feedback+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.26
You need to log in before you can comment on or make changes to this bug.