Closed
Bug 1181395
Opened 10 years ago
Closed 10 years ago
Make kClassName* constants in nsWindowsDef.h use wchar_t[] to avoid runtime conversion
Categories
(Core :: Widget: Win32, defect)
Tracking
()
RESOLVED
FIXED
mozilla42
| Tracking | Status | |
|---|---|---|
| firefox42 | --- | fixed |
People
(Reporter: xidorn, Assigned: xidorn)
References
Details
Attachments
(2 files)
|
8.08 KB,
patch
|
jimm
:
review-
|
Details | Diff | Splinter Review |
|
6.80 KB,
patch
|
jimm
:
review+
|
Details | Diff | Splinter Review |
Currently, the kClass* constants in nsWindowsDef.h use `const char[]` type. However, we are currently using the Unicode version of Windows API, which means we have to do runtime conversion every time when we use those constants.
We should change them to type `const wchar_t[]` instead.
| Assignee | ||
Updated•10 years ago
|
Assignee: nobody → quanxunzhen
Summary: Make kClass* constants in nsWindowsDef.h use wchar_t[] to avoid runtime conversion → Make kClassName* constants in nsWindowsDef.h use wchar_t[] to avoid runtime conversion
| Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8630823 -
Flags: review?(jmathies)
| Assignee | ||
Comment 2•10 years ago
|
||
This patch removes nsWindow::sDefaultMainWindowClass so that we can pass the literal strings everywhere without wrapping them in nsString in advance.
You can r+ either one as you like. I prefer this patch, though, because I don't see the static field makes any sense.
Attachment #8630827 -
Flags: review?(jmathies)
Comment 3•10 years ago
|
||
Comment on attachment 8630827 [details] [diff] [review]
another patch
I like this one too. Thanks!
Attachment #8630827 -
Flags: review?(jmathies) → review+
Updated•10 years ago
|
Attachment #8630823 -
Flags: review?(jmathies) → review-
Comment 5•10 years ago
|
||
After this, I got errors. I use vc14rc.
widget/windows/nsWindow.cpp(757): error C2660: “nsAString_internal::AssignLiteral”: function does not take one parameters
| Assignee | ||
Comment 6•10 years ago
|
||
(In reply to zhoubcfan from comment #5)
> After this, I got errors. I use vc14rc.
> widget/windows/nsWindow.cpp(757): error C2660:
> “nsAString_internal::AssignLiteral”: function does not take one parameters
Could you please file a bug blocking this bug and bug 1119082 and provide more detailed information there? Since we haven't officially started supporting VC14, this error shouldn't block landing of this bug anyway.
Flags: needinfo?(zhoubcfan)
Comment 8•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•