Closed Bug 396767 Opened 17 years ago Closed 17 years ago

OS/2 build break due to move from nsAutobuffer to nsTArray

Categories

(Core :: XPCOM, defect)

Other
OS/2
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: wuno, Unassigned)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.9a8pre) Gecko/2007091920 SeaMonkey/2.0a1pre
Build Identifier: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.9a8pre) Gecko/2007091920 SeaMonkey/2.0a1pre

reported first in the news group
http://groups.google.com/group/mozilla.dev.ports.os2/browse_thread/thread/7cb6e5fa9bce68d0/93f9a5fdc62356dc#93f9a5fdc62356dc
see for error there

Reproducible: Always

Steps to Reproduce:
1.
2.
3.



patch coming up
In the patch of bug394691 I found in https://bugzilla.mozilla.org/attachment.cgi?id=281128
that buffer.get was exchanged by buffer.Elements
Thus, I'm pretty sure that nsClipboard.cpp and nsFilePicker.cpp are fixed correctly with the attached patch. However, after introduction of these changes, the build failed also in nsWindow.cpp and nsDeviceContextSpecOS2.cpp. Using s/.get/.Elements/ I successfully build and post with this build, but I'm unsure, if the fixes for the 2 latter files are correct.
Attachment #281521 - Flags: review?(mozilla)
Depends on: 394691
I wonder if we should instead get rid of the nsAutoChar16Buffer type completely, if that is possible at all. One of the standard nsString derived types should do what this obsolete type (it's only used inside OS/2 code and dead Windows code) does.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Looks ok to me, just a style comment, in widget/src/os2/nsWindow.cpp you could change:

-    pressEvent.charCode = outbuf.get()[0];
+    pressEvent.charCode = outbuf.Elements()[0];

To:
-    pressEvent.charCode = outbuf.get()[0];
+    pressEvent.charCode = outbuf[0];

There are another couple of uses of that in the file too. Both ways will work fine though, I just think that the second way is a bit cleaner.
Comment on attachment 281521 [details] [diff] [review]
s/.get/.Elements/

OK, looks good to me. The implementation of MultiByteToWideChar() obviously doesn't work with nsXPIDL(C)Strings as other stuff does.
Attachment #281521 - Flags: review?(mozilla) → review+
OK, checked it in already, following Chris' recommendation and adding two more of the same changes in nsDragService.cpp. So we should be building again.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
(In reply to comment #5)
> adding two more of the same changes in nsDragService.cpp. So we should be building again.
thanks for catching this. Actually, I had these changes in the tree, but obviously have overseen to add them to the final patch :-(.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: