Closed Bug 1244774 Opened 8 years ago Closed 8 years ago

build failure on Windows (VS 2015 update 1) in GeckoChildProcessHost.cpp

Categories

(Core :: Security: Process Sandboxing, defect)

x86
Windows
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: jfkthame, Assigned: bobowen)

References

Details

Attachments

(1 file)

Since bug 1173371 landed, my Windows build fails:

 0:47.51 GeckoChildProcessHost.cpp
 0:47.51 c:/Users/jkew/mozdev/mozilla-central/ipc/glue/GeckoChildProcessHost.cpp(640): error C2672: 'nsAString_internal::InsertLiter
al': no matching overloaded function found
 0:47.51 c:/Users/jkew/mozdev/mozilla-central/ipc/glue/GeckoChildProcessHost.cpp(640): error C2784: 'void nsAString_internal::Insert
Literal(const nsAString_internal::char_type (&)[N],nsAString_internal::index_type)': could not deduce template argument for 'const n
sAString_internal::char_type (&)[N]' from 'const wchar_t [7]'
 0:47.51 c:\users\jkew\mozdev\mozilla-central\obj-i686-pc-mingw32-opt\dist\include\nsTSubstring.h(709): note: see declaration of 'ns
AString_internal::InsertLiteral'
 0:47.51 c:/Users/jkew/mozdev/mozilla-central/ipc/glue/GeckoChildProcessHost.cpp(643): error C2672: 'nsAString_internal::AppendLiter
al': no matching overloaded function found
 0:47.51 c:/Users/jkew/mozdev/mozilla-central/ipc/glue/GeckoChildProcessHost.cpp(643): error C2780: 'bool nsAString_internal::Append
Literal(const char (&)[N],const nsAString_internal::fallible_t &)': expects 2 arguments - 1 provided
 0:47.53 c:\users\jkew\mozdev\mozilla-central\obj-i686-pc-mingw32-opt\dist\include\nsTSubstring.h(646): note: see declaration of 'ns
AString_internal::AppendLiteral'
 0:47.53 c:/Users/jkew/mozdev/mozilla-central/ipc/glue/GeckoChildProcessHost.cpp(643): error C2784: 'void nsAString_internal::Append
Literal(const char (&)[N])': could not deduce template argument for 'const char (&)[N]' from 'const wchar_t [3]'
 0:47.53 c:\users\jkew\mozdev\mozilla-central\obj-i686-pc-mingw32-opt\dist\include\nsTSubstring.h(640): note: see declaration of 'ns
AString_internal::AppendLiteral'
 0:47.53 c:/Users/jkew/mozdev/mozilla-central/ipc/glue/GeckoChildProcessHost.cpp(643): error C2784: 'void nsAString_internal::Append
Literal(const nsAString_internal::char_type (&)[N])': could not deduce template argument for 'const nsAString_internal::char_type (&
)[N]' from 'const wchar_t [3]'
 0:47.55 c:\users\jkew\mozdev\mozilla-central\obj-i686-pc-mingw32-opt\dist\include\nsTSubstring.h(634): note: see declaration of 'ns
AString_internal::AppendLiteral'
 0:47.55 c:/Users/jkew/mozdev/mozilla-central/ipc/glue/GeckoChildProcessHost.cpp(645): error C2664: 'void std::vector<std::wstring,s
td::allocator<_Ty>>::push_back(const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>> &)': cannot conver
t argument 1 from 'char16ptr_t' to 'std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>> &&'
 0:47.55         with
 0:47.55         [
 0:47.56             _Ty=std::wstring
 0:47.56         ]
 0:47.56 c:/Users/jkew/mozdev/mozilla-central/ipc/glue/GeckoChildProcessHost.cpp(645): note: Reason: cannot convert from 'char16ptr_
t' to 'std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>'
 0:47.56 c:/Users/jkew/mozdev/mozilla-central/ipc/glue/GeckoChildProcessHost.cpp(645): note: No user-defined-conversion operator ava
ilable that can perform this conversion, or the operator cannot be called
 0:47.56
 0:47.56 In the directory  /c/Users/jkew/mozdev/mozilla-central/obj-i686-pc-mingw32-opt/ipc/glue
Assignee: nobody → bobowen.code
Just waiting for my VS2015 to install update 1, so I can compile, hitting bug 1244092 at the moment.
Comment on attachment 8714408 [details] [diff] [review]
Correct wchar_t/chat16_t VS2015 compilation problem caused by patches for bug 1173371

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

I would have used Append(NS_LITERAL_STRING()). First time I've run across MOZ_UTF16!
Attachment #8714408 - Flags: review?(jmathies) → review+
I just hit this. Thanks for fixing!
(In reply to Jim Mathies [:jimm] from comment #3)
> Comment on attachment 8714408 [details] [diff] [review]
> Correct wchar_t/chat16_t VS2015 compilation problem caused by patches for
> bug 1173371
> 
> Review of attachment 8714408 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I would have used Append(NS_LITERAL_STRING()). First time I've run across
> MOZ_UTF16!

Actually in this case I would even prefer just using char[] for the literals.
(In reply to Xidorn Quan [:xidorn] (UTC+10) (less responsive until Feb 22) from comment #7)
> (In reply to Jim Mathies [:jimm] from comment #3)
> > Comment on attachment 8714408 [details] [diff] [review]
> > Correct wchar_t/chat16_t VS2015 compilation problem caused by patches for
> > bug 1173371
> > 
> > Review of attachment 8714408 [details] [diff] [review]:
> > -----------------------------------------------------------------
> > 
> > I would have used Append(NS_LITERAL_STRING()). First time I've run across
> > MOZ_UTF16!
> 
> Actually in this case I would even prefer just using char[] for the literals.

Agreed for the AppendLiteral as the added simplicity outweighs the extra conversion effort.
However, that would mean it would differ from the InsertLiteral above as that doesn't have the overload.
https://hg.mozilla.org/mozilla-central/rev/193e5b686629
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Comment on attachment 8714408 [details] [diff] [review]
Correct wchar_t/chat16_t VS2015 compilation problem caused by patches for bug 1173371

If bug 1173371 is uplifted this will also need uplifting, see bug 1173371 comment 21.
Attachment #8714408 - Flags: approval-mozilla-aurora?
Comment on attachment 8714408 [details] [diff] [review]
Correct wchar_t/chat16_t VS2015 compilation problem caused by patches for bug 1173371

This work is staying in 47 so we don't need to uplift it .
Attachment #8714408 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: