Closed Bug 422793 Opened 17 years ago Closed 16 years ago

reduce narrow windows API calls in xpfe

Categories

(Core :: General, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla1.9.1b2

People

(Reporter: blassey, Assigned: crowderbt)

References

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Attachment #309240 - Flags: review?(neil)
Blocks: 418703
Comment on attachment 309240 [details] [diff] [review] directy from "other" patch on bug 418703 Sorry, but this file is deprecated, although I think Camino (Mac) hasn't migrated off it yet.
Attachment #309240 - Flags: review?(neil)
Neil: re: comment #1: shouldn't that make a patch here easy to accept? :)
Comment on attachment 309240 [details] [diff] [review] directy from "other" patch on bug 418703 So, it turns out that this gets copied into toolkit... >+ NS_ConvertUTF8toUTF16 msg_str(aMessage, copy_len); >+ PRUnichar* message_copy = (PRUnichar*)msg_str.get(); >+ MessageBoxW(NULL, message_copy, NULL, MB_OK | MB_ICONERROR | MB_SETFOREGROUND ); You can write this all on one line: MessageBoxW(NULL, NS_ConvertUTF8toUTF16(aMessage).get(), ...); > const PRInt32 max_len = 255; >- char message_copy[max_len+1] = { 0 }; > PRInt32 input_len = strlen(aMessage); > PRInt32 copy_len = (input_len > max_len) ? max_len : input_len; > strncpy(message_copy, aMessage, copy_len); > message_copy[copy_len] = 0; So, it turns out that this copy is only needed on the Mac. And we're using XP_MAC instead of XP_MACOSX :-( I don't know what to recommend here (ask josh or someone) but unless you get told to delete it, please move this code into the XP_MAC block. (Fix OS/2 to use aMessage too.)
Attachment #309240 - Flags: review-
Looks like you were right the first time, Neil.
Assignee: nobody → crowder
Attachment #309240 - Attachment is obsolete: true
Attachment #342333 - Flags: review?(neil)
The removal patch survived a try-server run, also.
Comment on attachment 342333 [details] [diff] [review] remove it [Checkin: Comment 7] I trawled CVS history and discovered that it was part of the old JS-based xpinstall mechanism that got dropped at the end of January.
Attachment #342333 - Flags: review?(neil) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Attachment #342333 - Attachment description: remove it → remove it [Checkin: Comment 7]
Severity: normal → trivial
Flags: in-testsuite-
Keywords: checkin-needed
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → mozilla1.9.1b2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: