Bug 167642

Summary: Compilation error in JSArrayBufferView.h
Product: WebKit Reporter: Tomas Popela <tpopela>
Component: JavaScriptCoreAssignee: Tomas Popela <tpopela>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, fpizlo, keith_miller, mark.lam, mcatanzaro, msaboff, sbarati
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Tomas Popela 2017-01-31 07:18:45 PST
In file included from /builddir/build/BUILD/webkitgtk-2.15.4/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h:33:0,
                 from /builddir/build/BUILD/webkitgtk-2.15.4/Source/JavaScriptCore/API/JSTypedArray.cpp:37:
/builddir/build/BUILD/webkitgtk-2.15.4/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h: In member function 'const typename Adaptor::Type* JSC::JSGenericTypedArrayView<Adaptor>::typedVector() const':
/builddir/build/BUILD/webkitgtk-2.15.4/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h:119:67: error: no matching function for call to 'JSC::JSGenericTypedArrayView<Adaptor>::vector() const'
         return bitwise_cast<const typename Adaptor::Type*>(vector());
                                                                   ^
In file included from /builddir/build/BUILD/webkitgtk-2.15.4/Source/JavaScriptCore/runtime/JSArrayBufferViewInlines.h:29:0,
                 from /builddir/build/BUILD/webkitgtk-2.15.4/Source/JavaScriptCore/API/JSTypedArray.cpp:34:


/builddir/build/BUILD/webkitgtk-2.15.4/Source/JavaScriptCore/runtime/JSArrayBufferView.h:170:11: note: candidate: void* JSC::JSArrayBufferView::vector() <nearmatch>
     void* vector() { return m_vector.get(); }
           ^~~~~~
/builddir/build/BUILD/webkitgtk-2.15.4/Source/JavaScriptCore/runtime/JSArrayBufferView.h:170:11: note:   passing 'const JSC::JSGenericTypedArrayView<Adaptor>*' as 'this' argument discards qualifiers
Comment 1 Tomas Popela 2017-01-31 07:20:30 PST
Created attachment 300218 [details]
Patch
Comment 2 Michael Catanzaro 2017-01-31 07:53:06 PST
No clue whether this is a WebKit bug or a GCC 7 bug.
Comment 3 Alex Christensen 2017-01-31 08:51:15 PST
Comment on attachment 300218 [details]
Patch

const should definitely be there
Comment 4 Tomas Popela 2017-01-31 08:53:29 PST
Comment on attachment 300218 [details]
Patch

Clearing flags on attachment: 300218

Committed r211434: <http://trac.webkit.org/changeset/211434>
Comment 5 Tomas Popela 2017-01-31 08:53:38 PST
All reviewed patches have been landed.  Closing bug.