Closed Bug 1408459 Opened 6 years ago Closed 6 years ago

Remove unused declaration of NS_MeanAndStdDev()


(Core :: XPCOM, enhancement)

Not set



Tracking Status
firefox58 --- fixed


(Reporter: mccr8, Assigned: mccr8)




(2 files)

Despite the comment on this method saying "And now for that utility that you've all been asking for..." this is not used or defined anywhere.
Comment on attachment 8918394 [details]
Bug 1408459, part 1 - Work around compiler problem on Android 4.2 x86 opt.

Attachment #8918394 - Flags: review?(erahm) → review+
Pushed by
Remove unused declaration of NS_MeanAndStdDev(). r=erahm
Backed out for build bustage on Android 4.2 x86 opt: invalid conversion:

Push with failure:
Build log:

task 2017-10-13T17:58:30.624Z] 17:58:30     INFO -  /builds/worker/workspace/build/src/android-ndk/sources/cxx-stl/llvm-libc++/libcxx/include/memory:2598:52:   required from 'std::__ndk1::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = std::__ndk1::__function::__base<void(PRFileDesc*)>; _Dp = std::__ndk1::__allocator_destructor<std::__ndk1::allocator<std::__ndk1::__function::__func<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)>, std::__ndk1::allocator<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)> >, void(PRFileDesc*)> > >]'
[task 2017-10-13T17:58:30.625Z] 17:58:30     INFO -  /builds/worker/workspace/build/src/android-ndk/sources/cxx-stl/llvm-libc++/libcxx/include/functional:1603:72:   required from 'std::__ndk1::function<_Rp(_ArgTypes ...)>::function(_Fp, typename std::__ndk1::enable_if<(std::__ndk1::function<_Rp(_ArgTypes ...)>::__callable<_Fp>::value && (! std::__ndk1::is_same<_Fp, std::__ndk1::function<_Rp(_ArgTypes ...)> >::value))>::type*) [with _Fp = mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)>; _Rp = void; _ArgTypes = {PRFileDesc*}; typename std::__ndk1::enable_if<(std::__ndk1::function<_Rp(_ArgTypes ...)>::__callable<_Fp>::value && (! std::__ndk1::is_same<_Fp, std::__ndk1::function<_Rp(_ArgTypes ...)> >::value))>::type = void]'
[task 2017-10-13T17:58:30.625Z] 17:58:30     INFO -  /builds/worker/workspace/build/src/dom/media/FileBlockCache.cpp:108:59:   required from here
[task 2017-10-13T17:58:30.626Z] 17:58:30     INFO -  /builds/worker/workspace/build/src/android-ndk/sources/cxx-stl/llvm-libc++/libcxx/include/memory:2630:34: error: invalid conversion from 'std::__ndk1::unique_ptr<std::__ndk1::__function::__base<void(PRFileDesc*)>, std::__ndk1::__allocator_destructor<std::__ndk1::allocator<std::__ndk1::__function::__func<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)>, std::__ndk1::allocator<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)> >, void(PRFileDesc*)> > > >::pointer {aka std::__ndk1::__function::__base<void(PRFileDesc*)>*}' to 'std::__ndk1::__allocator_destructor<std::__ndk1::allocator<std::__ndk1::__function::__func<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)>, std::__ndk1::allocator<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)> >, void(PRFileDesc*)> > >::pointer {aka std::__ndk1::__function::__func<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)>, std::__ndk1::allocator<mozilla::FileBlockCache::Init()::<lambda(PRFileDesc*)> >, void(PRFileDesc*)>*}' [-fpermissive]
[task 2017-10-13T17:58:30.626Z] 17:58:30     INFO -               __ptr_.second()(__tmp);
[task 2017-10-13T17:58:30.627Z] 17:58:30     INFO -                                    ^
Flags: needinfo?(continuation)
This is bizarre. Note that it is only Android 4.2 and not other versions. It was in fact fixed by the backout. Maybe I'll figure out which part of my change caused this. Or maybe just WONTFIX this... Though I should add a comment at least. In IRC, botond said that he's seen this before: "basically, we've landed on the conclusion that it's undefined behaviour in the compiler, and subtly shifting code around can trigger it".
Flags: needinfo?(continuation)
See Also: → 1367798
I too have seen problems like this on Android -- inexplicable compile errors involving huge templates containing std::__ndk1::__function.
Disabling unified compilation for CubebUtils.cpp fixes the build:
Part 2 is the same as the previous patch...
Comment on attachment 8918681 [details]
Bug 1408459, part 2 - Remove unused declaration of NS_MeanAndStdDev().
Attachment #8918681 - Flags: review?(erahm) → review+
Comment on attachment 8918394 [details]
Bug 1408459, part 1 - Work around compiler problem on Android 4.2 x86 opt.
Attachment #8918394 - Flags: review?(dglastonbury) → review+
Pushed by
part 1 - Work around compiler problem on Android 4.2 x86 opt. r=erahm,kamidphish
part 2 - Remove unused declaration of NS_MeanAndStdDev(). r=erahm
You need to log in before you can comment on or make changes to this bug.