Fix char16_t/wchar_t mismatch in tollkit/.

RESOLVED FIXED in mozilla28

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jacek, Assigned: jacek)

Tracking

Trunk
mozilla28
x86_64
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(2 attachments, 1 obsolete attachment)

Posted patch patch.diffSplinter Review
This is followup of bug 928351 for toolkit/.
Attachment #8340657 - Flags: review?(ehsan)
Comment on attachment 8340657 [details] [diff] [review]
patch.diff

Review of attachment 8340657 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/xre/nsNativeAppSupportWin.cpp
@@ +642,5 @@
>  
>      // Grab mutex first.
>  
>      // Build mutex name from app name.
> +    ::_snwprintf(reinterpret_cast<wchar_t*>(mMutexName), sizeof mMutexName / sizeof(PRUnichar), L"%s%s%s",

Nit: please add a line break after the first argument.

@@ +1217,5 @@
>      nsAutoString temp;
>      // Ensure result's buffer is sufficiently big.
>      temp.SetLength( argLen );
>      // Now get the string contents.
> +    DdeQueryString( mInstance, args, (wchar_t*)temp.BeginWriting(), temp.Length(), CP_WINUNICODE );

Nit: reinterpret_cast
Attachment #8340657 - Flags: review?(ehsan) → review+
Committed with nits fixed. Thanks for the review.

https://hg.mozilla.org/integration/mozilla-inbound/rev/a41081c1026c
Partial revert due to build bustage on some platforms. That should be easy to fix, I will work on it later.

https://hg.mozilla.org/integration/mozilla-inbound/rev/933c28b72a55
Whiteboard: leave open
Posted patch toolkit/crashreporter part (obsolete) — Splinter Review
It seems like CONVERT_UTF16_TO_XP_CHAR is not worth the problem and confused me in the last try. Here is a new version.

https://tbpl.mozilla.org/?tree=Try&rev=fd327560f46a
Attachment #8342259 - Flags: review?(ehsan)
Fixed a typo:
https://tbpl.mozilla.org/?tree=Try&rev=41a918e92572
Attachment #8342259 - Attachment is obsolete: true
Attachment #8342259 - Flags: review?(ehsan)
Attachment #8342304 - Flags: review?(ehsan)
Attachment #8342304 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/f56bfb99d971
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.