[Webkit-unassigned] [Bug 136981] New: ArgumentEncoder::encode does not support long long

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Sep 20 23:58:40 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=136981

           Summary: ArgumentEncoder::encode does not support long long
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Platform
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: lantw44 at gmail.com


This bug causes build failure for both webkitgtk-2.5.90 and trunk on FreeBSD 10 amd64.

In Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp, line 100:
encoder << maximumBufferingTime;

maximumBufferingTime is a std::chrono::milliseconds.


I found std::chrono::milliseconds is a long long in /usr/include/c++/v1/chrono.
https://llvm.org/svn/llvm-project/libcxx/trunk/include/chrono

ArgumentEncoder::encode (in Source/WebKit2/Platform/IPC/ArgumentEncoder.h) supports int32_t and int64_t. Unfortunately, neither of them are a typedef of long long (stdint.h -> sys/_types.h -> machine/_types.h -> x86/_types.h), which causes build failure because the compiler cannot find the matching function.
Here is a copy of x86/_types.h: http://svn.freebsd.org/base/head/sys/x86/include/_types.h
__LP64__ is defined, so int32_t is a int and int64_t is a long.



The following are the error message:
In file included from /home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp:29:
In file included from /home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h:29:
In file included from /home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Platform/IPC/ArgumentDecoder.h:29:
/home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Platform/IPC/ArgumentCoder.h:37:10: error: member reference base type 'const long long' is not a structure
      or union
        t.encode(encoder);
        ~^~~~~~~
/home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Platform/IPC/ArgumentEncoder.h:56:27: note: in instantiation of member function
      'IPC::ArgumentCoder<long long>::encode' requested here
        ArgumentCoder<T>::encode(*this, t);
                          ^
/home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Platform/IPC/ArgumentEncoder.h:61:9: note: in instantiation of function template specialization
      'IPC::ArgumentEncoder::encode<long long>' requested here
        encode(t);
        ^
/home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h:110:17: note: in instantiation of function template specialization
      'IPC::ArgumentEncoder::operator<<<long long>' requested here
        encoder << duration.count();
                ^
/home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Platform/IPC/ArgumentEncoder.h:56:27: note: in instantiation of member function
      'IPC::ArgumentCoder<std::__1::chrono::duration<long long, std::__1::ratio<1, 1000> > >::encode' requested here
        ArgumentCoder<T>::encode(*this, t);
                          ^
/home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Platform/IPC/ArgumentEncoder.h:61:9: note: in instantiation of function template specialization
      'IPC::ArgumentEncoder::encode<std::__1::chrono::duration<long long, std::__1::ratio<1, 1000> > >' requested here
        encode(t);
        ^
/home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp:100:13: note: in instantiation of function template
      specialization 'IPC::ArgumentEncoder::operator<<<std::__1::chrono::duration<long long, std::__1::ratio<1, 1000> > >' requested here
    encoder << maximumBufferingTime;
            ^
In file included from /home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp:29:
In file included from /home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h:29:
In file included from /home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Platform/IPC/ArgumentDecoder.h:29:
/home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Platform/IPC/ArgumentCoder.h:42:16: error: type 'long long' cannot be used prior to '::' because it has no
      members
        return T::decode(decoder, t);
               ^
/home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Platform/IPC/ArgumentDecoder.h:89:34: note: in instantiation of member function
      'IPC::ArgumentCoder<long long>::decode' requested here
        return ArgumentCoder<T>::decode(*this, t);
                                 ^
/home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Platform/IPC/ArgumentCoders.h:116:22: note: in instantiation of function template specialization
      'IPC::ArgumentDecoder::decode<long long>' requested here
        if (!decoder.decode(count))
                     ^
/home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Platform/IPC/ArgumentDecoder.h:89:34: note: in instantiation of member function
      'IPC::ArgumentCoder<std::__1::chrono::duration<long long, std::__1::ratio<1, 1000> > >::decode' requested here
        return ArgumentCoder<T>::decode(*this, t);
                                 ^
/home/lantw44/gnome/source/webkit-trunk/Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp:160:18: note: in instantiation of function template
      specialization 'IPC::ArgumentDecoder::decode<std::__1::chrono::duration<long long, std::__1::ratio<1, 1000> > >' requested here
    if (!decoder.decode(result.maximumBufferingTime))
                 ^
2 errors generated.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list