Closed
Bug 422794
Opened 17 years ago
Closed 15 years ago
reduce narrow windows API calls in xpcom
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: blassey, Assigned: crowderbt)
References
Details
Attachments
(1 file, 3 obsolete files)
(deleted),
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
this doesn't include the changes in xpcom glue
Attachment #309242 -
Flags: review?(benjamin)
Comment 1•16 years ago
|
||
Comment on attachment 309242 [details] [diff] [review] directy from "other" patch on bug 418703 >Index: xpcom/windbgdlg/windbgdlg.cpp > int WINAPI > WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, > LPSTR lpszCmdLine, int nCmdShow) >- wsprintf(msg, >- "%s\n\nClick Abort to exit the Application.\n" >- "Click Retry to Debug the Application..\n" >- "Click Ignore to continue running the Application.", >+ wsprintfW(msg, >+ L"%s\n\nClick Abort to exit the Application.\n" >+ L"Click Retry to Debug the Application..\n" >+ L"Click Ignore to continue running the Application.", > lpszCmdLine); You're passing lpszCmdLine as %s, which I think is incorrect for wsprintf... although I can't find a reference to wsprintfW docs. Can you clarify?
Attachment #309242 -
Flags: review?(benjamin) → review-
Assignee | ||
Comment 2•16 years ago
|
||
You are correct in asserting that %s is wrong for wsprintf(), which wants %S for narrow strings. I have fixed that. I also fixed a mixup/typo in nsDriveEnumerator (mLetter was swapped for mDrives). I checked over the rest of the patch for spacing and sizeof/cast issues, but it's possible I've missed some, please double-check me again?
Assignee: nobody → crowder
Attachment #309242 -
Attachment is obsolete: true
Attachment #337982 -
Flags: superreview?(benjamin)
Attachment #337982 -
Flags: review?(benjamin)
Assignee | ||
Comment 3•16 years ago
|
||
Comment on attachment 337982 [details] [diff] [review] v2 Bah, I hate how MSVC's search leaves things highlighted, and therefore easily deleted/replaced.
Attachment #337982 -
Flags: superreview?(benjamin)
Attachment #337982 -
Flags: superreview-
Attachment #337982 -
Flags: review?(benjamin)
Attachment #337982 -
Flags: review-
Assignee | ||
Comment 4•16 years ago
|
||
Attachment #337982 -
Attachment is obsolete: true
Attachment #337984 -
Flags: superreview?(benjamin)
Attachment #337984 -
Flags: review?(benjamin)
Assignee | ||
Comment 5•16 years ago
|
||
Bernard: I'd love to have you give this patch the same scrutiny as you've given others, if you have time.
Comment 6•16 years ago
|
||
Brian: You changed: + wsprintfW(msg, + L"%S\n\nClick Abort to exit the Application.\n" + L"Click Retry to Debug the Application..\n" + L"Click Ignore to continue running the Application.", + lpszCmdLine); but lpszCmdLine is still ANSI, you need to use GetCommandLineW() here. Please note that you are supposed to use LocalFree() to free the array returned by "CommandLineToArgvW".
Assignee | ||
Comment 7•16 years ago
|
||
%S is the right format-specifier for ANSI strings in wsprintf, according to MSDN
Comment 8•16 years ago
|
||
> %S is the right format-specifier for ANSI strings in wsprintf, according to
> MSDN
oops, I'm confused (I couldn't find the documentation). It should be ok then.
Assignee | ||
Comment 9•16 years ago
|
||
Added a LocalFree(argv)
Attachment #337984 -
Attachment is obsolete: true
Attachment #338144 -
Flags: superreview?(benjamin)
Attachment #338144 -
Flags: review?(benjamin)
Attachment #337984 -
Flags: superreview?(benjamin)
Attachment #337984 -
Flags: review?(benjamin)
Updated•16 years ago
|
Attachment #338144 -
Attachment is patch: true
Attachment #338144 -
Attachment mime type: application/octet-stream → text/plain
Comment 10•16 years ago
|
||
Comment on attachment 338144 [details] [diff] [review] v4 r=me for everything *except* nsProcessCommon. The conversion in there currently 0-extends argv coming in, which is unacceptable.
Attachment #338144 -
Flags: superreview?(benjamin)
Attachment #338144 -
Flags: review?(benjamin)
Attachment #338144 -
Flags: review+
Reporter | ||
Comment 11•16 years ago
|
||
crowder did you land this?
Assignee | ||
Comment 12•16 years ago
|
||
Nope, it needed another spin.
Assignee | ||
Updated•15 years ago
|
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•