Closed Bug 1575479 Opened 5 years ago Closed 5 years ago

nsBaseHashtable should be a C++ Range

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: sg, Assigned: sg)

References

Details

Attachments

(2 files)

nsBaseHashtable should be a C++ Range, i.e. it should be usable in a range-based for loop, iterating over the key-value pairs (like a std::unordered_map).

Assignee: nobody → sgiesecke
Status: NEW → ASSIGNED
Keywords: checkin-needed

Pushed by ccoroiu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6d54a8115393
Encapsulate mBaseHashtableET::mData. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/dcbc7c69fb64
Add support for STL iterators and range-based for to nsBaseHashtable. r=froydnj

Keywords: checkin-needed

Backed out 2 changesets (bug 1575479) for build bustage at build/src/gfx/thebes/gfxFT2Fonts.h

Backout: https://hg.mozilla.org/integration/autoland/rev/f15fdf668a68cf42133e098f8edf7975096e649f

Failure push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=dcbc7c69fb6450f79cc7f3743fe88a57b2e826e6

Failure log: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=dcbc7c69fb6450f79cc7f3743fe88a57b2e826e6

task 2019-09-10T11:53:22.948Z] 11:53:22 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/image/encoders/jpeg'
[task 2019-09-10T11:53:22.948Z] 11:53:22 INFO - image/encoders/jpeg/nsJPEGEncoder.o
[task 2019-09-10T11:53:22.949Z] 11:53:22 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/image/encoders/jpeg'
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/gfx/thebes'
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ --target=arm-linux-androideabi -o gfxFT2Fonts.o -c -flto=thin -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DMOZ_ENABLE_FREETYPE -DGRAPHITE2_STATIC -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/gfx/thebes -I/builds/worker/workspace/build/src/obj-firefox/gfx/thebes -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/ipdlheaders -I/builds/worker/workspace/build/src/ipc/chromium/src -I/builds/worker/workspace/build/src/ipc/glue -I/builds/worker/workspace/build/src/dom/base -I/builds/worker/workspace/build/src/dom/xml -I/builds/worker/workspace/build/src/gfx/skia -I/builds/worker/workspace/build/src/gfx/skia/skia/include/config -I/builds/worker/workspace/build/src/gfx/skia/skia/include/core -I/builds/worker/workspace/build/src/gfx/skia/skia/include/docs -I/builds/worker/workspace/build/src/gfx/skia/skia/include/gpu -I/builds/worker/workspace/build/src/gfx/skia/skia/include/utils -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -isystem /builds/worker/fetches/android-ndk/sysroot/usr/include/arm-linux-androideabi -isystem /builds/worker/fetches/android-ndk/sysroot/usr/include -gcc-toolchain /builds/worker/fetches/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -D__ANDROID_API_=16 -fstack-protector-strong -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -mno-unaligned-access -fno-sized-deallocation -fno-aligned-new -fno-short-enums -fno-exceptions -stdlib=libstdc++ -I/builds/worker/fetches/android-ndk/sources/cxx-stl/llvm-libc++/include -I/builds/worker/fetches/android-ndk/sources/android/support/include -I/builds/worker/fetches/android-ndk/sources/cxx-stl/llvm-libc++abi/include -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=softfp -fstack-protector-strong -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -Oz -fno-omit-frame-pointer -funwind-tables -Werror -I/builds/worker/workspace/build/src/obj-firefox/dist/include/cairo -I/builds/worker/workspace/build/src/obj-firefox/dist/include/cairo -I/builds/worker/workspace/build/src/modules/freetype2/include -MD -MP -MF .deps/gfxFT2Fonts.o.pp /builds/worker/workspace/build/src/gfx/thebes/gfxFT2Fonts.cpp
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - In file included from /builds/worker/workspace/build/src/gfx/thebes/gfxFT2Fonts.cpp:18:
[task 2019-09-10T11:53:22.996Z] 11:53:22 ERROR - /builds/worker/workspace/build/src/gfx/thebes/gfxFT2Fonts.h:54:16: error: 'mData' is a private member of 'nsBaseHashtableET<nsUint32HashKey, gfxFT2Font::CachedGlyphData>'
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - if (entry->mData.glyphIndex == 0xffffffffU) {
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - ^
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/nsBaseHashtable.h:34:12: note: declared private here
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - DataType mData;
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - ^
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - In file included from /builds/worker/workspace/build/src/gfx/thebes/gfxFT2Fonts.cpp:18:
[task 2019-09-10T11:53:22.996Z] 11:53:22 ERROR - /builds/worker/workspace/build/src/gfx/thebes/gfxFT2Fonts.h:56:47: error: 'mData' is a private member of 'nsBaseHashtableET<nsUint32HashKey, gfxFT2Font::CachedGlyphData>'
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - FillGlyphDataForChar(aFace, ch, &entry->mData);
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - ^
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/nsBaseHashtable.h:34:12: note: declared private here
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - DataType mData;
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - ^
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - In file included from /builds/worker/workspace/build/src/gfx/thebes/gfxFT2Fonts.cpp:18:
[task 2019-09-10T11:53:22.996Z] 11:53:22 ERROR - /builds/worker/workspace/build/src/gfx/thebes/gfxFT2Fonts.h:59:20: error: 'mData' is a private member of 'nsBaseHashtableET<nsUint32HashKey, gfxFT2Font::CachedGlyphData>'
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - return &entry->mData;
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - ^
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/nsBaseHashtable.h:34:12: note: declared private here
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - DataType mData;
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - ^
[task 2019-09-10T11:53:22.996Z] 11:53:22 INFO - 3 errors generated.
[task 2019-09-10T11:53:22.999Z] 11:53:22 INFO - /builds/worker/workspace/build/src/config/rules.mk:785: recipe for target 'gfxFT2Fonts.o' failed
[task 2019-09-10T11:53:23.000Z] 11:53:22 ERROR - make[4]: *** [gfxFT2Fonts.o] Error 1
[task 2019-09-10T11:53:23.000Z] 11:53:22 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/gfx/thebes'
[task 2019-09-10T11:53:23.000Z] 11:53:22 INFO - make[4]: *** Waiting for unfinished jobs....
[task 2019-09-10T11:53:23.000Z] 11:53:22 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/image'
[task 2019-09-10T11:53:23.000Z] 11:53:22 INFO - image/Unified_cpp_image2.o
[task 2019-09-10T11:53:23.000Z] 11:53:22 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/image'
[task 2019-09-10T11:53:23.163Z] 11:53:23 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/image/encoders/jpeg'
[task 2019-09-10T11:53:23.163Z] 11:53:23 INFO - /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ --target=arm-linux-androideabi -o nsJPEGEncoder.o -c -flto=thin -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/image/encoders/jpeg -I/builds/worker/workspace/build/src/obj-firefox/image/encoders/jpeg -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -isystem /builds/worker/fetches/android-ndk/sysroot/usr/include/arm-linux-androideabi -isystem /builds/worker/fetches/android-ndk/sysroot/usr/include -gcc-toolchain /builds/worker/fetches/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -D__ANDROID_API__=16 -fstack-protector-strong -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -mno-unaligned-access -fno-sized-deallocation -fno-aligned-new -fno-short-enums -fno-exceptions -stdlib=libstdc++ -I/builds/worker/fetches/android-ndk/sources/cxx-stl/llvm-libc++/include -I/builds/worker/fetches/android-ndk/sources/android/support/include -I/builds/worker/fetches/android-ndk/sources/cxx-stl/llvm-libc++abi/include -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=softfp -fstack-protector-strong -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -Oz -fno-omit-frame-pointer -funwind-tables -Werror -MD -MP -MF .deps/nsJPEGEncoder.o.pp /builds/worker/workspace/build/src/image/encoders/jpeg/nsJPEGEncoder.cpp
[task 2019-09-10T11:53:23.163Z] 11:53:23 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/image/encoders/jpeg'
[task 2019-09-10T11:53:23.166Z] 11:53:23 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/image/encoders/bmp'
[task 2019-09-10T11:53:23.166Z] 11:53:23 INFO - mkdir -p '.deps/'

Flags: needinfo?(sgiesecke)

Sorry, I made the mistake again not to update the revision on Phabricator after pushing to try.

Flags: needinfo?(sgiesecke)
Keywords: checkin-needed

Pushed by dluca@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4f6f99cfc655
Encapsulate mBaseHashtableET::mData. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/90d9e9be3713
Add support for STL iterators and range-based for to nsBaseHashtable. r=froydnj

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
See Also: → 1149833
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: