Merge inbound to mozilla-central r=merge a=merge
authorAttila Craciun <acraciun@mozilla.com>
Fri, 20 Oct 2017 12:03:48 +0300
changeset 683834 be030533c5afe73f222918809d03b1b5f08f7ef3
parent 683752 e2d00910855b5059f92e765097c90dd0f55db7d0 (current diff)
parent 683821 9adb0bc561c3c5d16f8c31640a4ff2570feb2cf3 (diff)
child 683863 d1e995c8640a191cd127e87273ec96cb2fabffa9
push id85474
push userbmo:emilio@crisal.io
push dateFri, 20 Oct 2017 10:02:12 +0000
reviewersmerge, merge
milestone58.0a1
Merge inbound to mozilla-central r=merge a=merge
testing/web-platform/meta/assumptions/ahem.html.ini
testing/web-platform/meta/html/webappapis/idle-callbacks/callback-timeout-with-raf.html.ini
testing/web-platform/meta/webrtc/RTCDTMFSender-ontonechange.html.ini
testing/web-platform/meta/webrtc/RTCPeerConnection-addTrack.html.ini
testing/web-platform/meta/webrtc/RTCPeerConnection-getStats.html.ini
testing/web-platform/meta/webrtc/RTCPeerConnection-ontrack.html.ini
testing/web-platform/meta/webrtc/RTCPeerConnection-removeTrack.html.ini
testing/web-platform/meta/webrtc/RTCRtpReceiver-getContributingSources.html.ini
testing/web-platform/meta/webrtc/RTCRtpReceiver-getSynchronizationSources.html.ini
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_9.html
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_1.html
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_10.html
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_11.html
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_12.html
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_13.html
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_2.html
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_3.html
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_4.html
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_5.html
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_6.html
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_7.html
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_8.html
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_9.html
testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1_ref.html
testing/web-platform/tests/2dcontext/drawing-paths-to-the-canvas/drawFocusIfNeeded_001.html
testing/web-platform/tests/2dcontext/drawing-paths-to-the-canvas/drawFocusIfNeeded_002.html
testing/web-platform/tests/2dcontext/drawing-paths-to-the-canvas/drawFocusIfNeeded_003.html
testing/web-platform/tests/2dcontext/drawing-paths-to-the-canvas/drawFocusIfNeeded_004.html
testing/web-platform/tests/2dcontext/drawing-paths-to-the-canvas/drawFocusIfNeeded_005.html
testing/web-platform/tests/XMLHttpRequest/open-during-abort.htm
testing/web-platform/tests/XMLHttpRequest/send-content-type-charset.htm
testing/web-platform/tests/annotation-protocol/files/annotations/annotation.headers
testing/web-platform/tests/annotation-protocol/files/annotations/annotation.options.headers
testing/web-platform/tests/annotation-protocol/files/annotations/collection.headers
testing/web-platform/tests/annotation-protocol/files/annotations/collection.options.headers
testing/web-platform/tests/annotation-protocol/files/annotations/cors.headers
testing/web-platform/tests/assumptions/OWNERS
testing/web-platform/tests/assumptions/canvas-background-ref.html
testing/web-platform/tests/assumptions/canvas-background.html
testing/web-platform/tests/assumptions/html-elements.html
testing/web-platform/tests/assumptions/initial-color-ref.html
testing/web-platform/tests/assumptions/initial-color.html
testing/web-platform/tests/assumptions/medium-font-size-ref.html
testing/web-platform/tests/assumptions/medium-font-size.html
testing/web-platform/tests/assumptions/min-font-size-ref.html
testing/web-platform/tests/assumptions/min-font-size.html
testing/web-platform/tests/assumptions/tools/build.sh
testing/web-platform/tests/common/vendor-prefix.js
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_and_unsafe_eval_eval.html
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_and_unsafe_eval_eval.html.headers
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_and_unsafe_eval_new_function.html
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_and_unsafe_eval_new_function.html.headers
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_discard_whitelist.html
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_discard_whitelist.html.headers
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_different_nonce.html
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_different_nonce.html.headers
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_honor_whitelist.sub.html
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_honor_whitelist.sub.html.headers
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_report_only.html
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_report_only.html.headers
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_eval.html
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_eval.html.headers
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_hashes.html
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_hashes.html.headers
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_meta_tag.html
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_meta_tag.html.headers
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_new_function.html
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_new_function.html.headers
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted.html
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted.html.headers
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted_incorrect_nonce.html
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_non_parser_inserted_incorrect_nonce.html.headers
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted.html
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted.html.headers
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted_correct_nonce.html
testing/web-platform/tests/content-security-policy/script-src/script-src-strict_dynamic_parser_inserted_correct_nonce.html.headers
testing/web-platform/tests/content-security-policy/script-src/simpleSourcedScript.js
testing/web-platform/tests/content-security-policy/support/Ahem2.ttf
testing/web-platform/tests/css/CSS2/backgrounds/background-position-001.xht
testing/web-platform/tests/css/CSS2/backgrounds/background-position-002.xht
testing/web-platform/tests/css/CSS2/backgrounds/support/ruler-h-200px-400px.png
testing/web-platform/tests/css/CSS2/backgrounds/support/ruler-v-100px-200px-300px.png
testing/web-platform/tests/css/CSS2/borders/border-conflict-style-101.xht
testing/web-platform/tests/css/CSS2/borders/border-conflict-style-102.xht
testing/web-platform/tests/css/CSS2/borders/border-conflict-style-103.xht
testing/web-platform/tests/css/CSS2/borders/border-conflict-style-104.xht
testing/web-platform/tests/css/CSS2/borders/border-conflict-style-105.xht
testing/web-platform/tests/css/CSS2/borders/border-conflict-style-106.xht
testing/web-platform/tests/css/CSS2/borders/border-style-applies-to-016.xht
testing/web-platform/tests/css/CSS2/borders/border-style-applies-to-017.xht
testing/web-platform/tests/css/CSS2/borders/border-style-applies-to-018.xht
testing/web-platform/tests/css/CSS2/borders/border-style-applies-to-019.xht
testing/web-platform/tests/css/CSS2/borders/border-style-applies-to-020.xht
testing/web-platform/tests/css/CSS2/borders/border-style-applies-to-021.xht
testing/web-platform/tests/css/CSS2/borders/border-style-applies-to-022.xht
testing/web-platform/tests/css/CSS2/borders/border-style-applies-to-023.xht
testing/web-platform/tests/css/CSS2/borders/border-style-applies-to-024.xht
testing/web-platform/tests/css/CSS2/borders/border-style-applies-to-025.xht
testing/web-platform/tests/css/CSS2/borders/border-style-applies-to-026.xht
testing/web-platform/tests/css/CSS2/borders/border-style-applies-to-027.xht
testing/web-platform/tests/css/CSS2/box-display/display-018.xht
testing/web-platform/tests/css/CSS2/cascade/at-import-008.xht
testing/web-platform/tests/css/CSS2/cascade/cascade-precedence-001.xht
testing/web-platform/tests/css/CSS2/cascade/cascade-precedence-002.xht
testing/web-platform/tests/css/CSS2/floats-clear/float-005.xht
testing/web-platform/tests/css/CSS2/floats-clear/margin-collapse-031.xht
testing/web-platform/tests/css/CSS2/floats-clear/margin-collapse-clear-012.xht
testing/web-platform/tests/css/CSS2/floats-clear/margin-collapse-clear-013.xht
testing/web-platform/tests/css/CSS2/floats-clear/margin-collapse-clear-014.xht
testing/web-platform/tests/css/CSS2/floats-clear/margin-collapse-clear-015.xht
testing/web-platform/tests/css/CSS2/floats-clear/margin-collapse-clear-016.xht
testing/web-platform/tests/css/CSS2/floats-clear/margin-collapse-clear-017.xht
testing/web-platform/tests/css/CSS2/floats-clear/support/ruler-v-100px-200px-300px.png
testing/web-platform/tests/css/CSS2/linebox/empty-inline-003.xht
testing/web-platform/tests/css/CSS2/lists/list-style-019.xht
testing/web-platform/tests/css/CSS2/lists/list-style-position-019.xht
testing/web-platform/tests/css/CSS2/margin-padding-clear/margin-collapse-032.xht
testing/web-platform/tests/css/CSS2/margin-padding-clear/margin-collapse-037.xht
testing/web-platform/tests/css/CSS2/margin-padding-clear/margin-collapse-038.xht
testing/web-platform/tests/css/CSS2/normal-flow/max-height-105.xht
testing/web-platform/tests/css/CSS2/normal-flow/max-height-106.xht
testing/web-platform/tests/css/CSS2/normal-flow/max-height-107.xht
testing/web-platform/tests/css/CSS2/normal-flow/max-height-108.xht
testing/web-platform/tests/css/CSS2/normal-flow/max-height-109.xht
testing/web-platform/tests/css/CSS2/normal-flow/max-height-110.xht
testing/web-platform/tests/css/CSS2/normal-flow/max-height-111.xht
testing/web-platform/tests/css/CSS2/normal-flow/max-width-105.xht
testing/web-platform/tests/css/CSS2/normal-flow/max-width-106.xht
testing/web-platform/tests/css/CSS2/normal-flow/max-width-108.xht
testing/web-platform/tests/css/CSS2/normal-flow/min-height-104.xht
testing/web-platform/tests/css/CSS2/normal-flow/min-height-105.xht
testing/web-platform/tests/css/CSS2/normal-flow/min-height-106.xht
testing/web-platform/tests/css/CSS2/normal-flow/min-height-percentage-003.xht
testing/web-platform/tests/css/CSS2/normal-flow/replaced-elements-001.xht
testing/web-platform/tests/css/CSS2/other-formats/background-color-176.html
testing/web-platform/tests/css/CSS2/sec5/adjacent-000.xht
testing/web-platform/tests/css/CSS2/sec5/adjacent-001.xht
testing/web-platform/tests/css/CSS2/sec5/adjacent-002.xht
testing/web-platform/tests/css/CSS2/sec5/attribute-000.xht
testing/web-platform/tests/css/CSS2/sec5/attribute-001.xht
testing/web-platform/tests/css/CSS2/sec5/attribute-002.xht
testing/web-platform/tests/css/CSS2/sec5/attribute-003.xht
testing/web-platform/tests/css/CSS2/sec5/attribute-004.xht
testing/web-platform/tests/css/CSS2/sec5/attribute-005.xht
testing/web-platform/tests/css/CSS2/sec5/attribute-006.xht
testing/web-platform/tests/css/CSS2/sec5/attribute-007.xht
testing/web-platform/tests/css/CSS2/sec5/class-000.xht
testing/web-platform/tests/css/CSS2/sec5/class-001.xht
testing/web-platform/tests/css/CSS2/sec5/class-002.xht
testing/web-platform/tests/css/CSS2/sec5/descendant-selector-000.xht
testing/web-platform/tests/css/CSS2/sec5/descendant-selector-001.xht
testing/web-platform/tests/css/CSS2/sec5/dynamic-pseudo-classes-000.xht
testing/web-platform/tests/css/CSS2/sec5/dynamic-pseudo-classes-001.xht
testing/web-platform/tests/css/CSS2/sec5/dynamic-pseudo-classes-002.xht
testing/web-platform/tests/css/CSS2/sec5/dynamic-pseudo-classes-003.xht
testing/web-platform/tests/css/CSS2/sec5/first-child-000.xht
testing/web-platform/tests/css/CSS2/sec5/first-child-001.xht
testing/web-platform/tests/css/CSS2/sec5/first-letter-000.xht
testing/web-platform/tests/css/CSS2/sec5/first-line-000.xht
testing/web-platform/tests/css/CSS2/sec5/grouping-000.xht
testing/web-platform/tests/css/CSS2/sec5/grouping-001.xht
testing/web-platform/tests/css/CSS2/sec5/id-000.xht
testing/web-platform/tests/css/CSS2/sec5/id-001.xht
testing/web-platform/tests/css/CSS2/selectors/default-attribute-selector-001.xht
testing/web-platform/tests/css/CSS2/selectors/default-attribute-selector-002.xht
testing/web-platform/tests/css/CSS2/selectors/default-attribute-selector-003.xht
testing/web-platform/tests/css/CSS2/selectors/default-attribute-selector-004.xht
testing/web-platform/tests/css/CSS2/selectors/default-attribute-selector-005.xht
testing/web-platform/tests/css/CSS2/selectors/default-attribute-selector-006.xht
testing/web-platform/tests/css/CSS2/selectors/default-attribute-selector-007.xht
testing/web-platform/tests/css/CSS2/selectors/default-attribute-selector-008.xht
testing/web-platform/tests/css/CSS2/selectors/focus-pseudo-class-001.xht
testing/web-platform/tests/css/CSS2/selectors/focus-pseudo-class-002.xht
testing/web-platform/tests/css/CSS2/selectors/focus-pseudo-class-003.xht
testing/web-platform/tests/css/CSS2/selectors/universal-selector-005.xht
testing/web-platform/tests/css/CSS2/support/ruler-h-200px-400px.png
testing/web-platform/tests/css/CSS2/tables/support/ruler-h-200px-400px.png
testing/web-platform/tests/css/CSS2/text/white-space-007.xht
testing/web-platform/tests/css/CSS2/text/white-space-008.xht
testing/web-platform/tests/css/CSS2/ui/cursor-020.xht
testing/web-platform/tests/css/CSS2/ui/cursor-021.xht
testing/web-platform/tests/css/CSS2/ui/cursor-022.xht
testing/web-platform/tests/css/CSS2/ui/outline-019.xht
testing/web-platform/tests/css/CSS2/ui/outline-020.xht
testing/web-platform/tests/css/CSS2/ui/support/fail.cur
testing/web-platform/tests/css/CSS2/values/units-005.xht
testing/web-platform/tests/css/CSS2/visufx/clip-001.xht
testing/web-platform/tests/css/CSS2/visufx/visibility-005.xht
testing/web-platform/tests/css/CSS2/zindex/z-index-015.xht
testing/web-platform/tests/css/CSS2/zindex/z-index-016.xht
testing/web-platform/tests/css/CSS2/zindex/z-index-017.xht
testing/web-platform/tests/css/css-backgrounds-3/css3-background-clip-border-box.html
testing/web-platform/tests/css/css-backgrounds-3/css3-background-clip-content-box.html
testing/web-platform/tests/css/css-backgrounds-3/css3-background-clip-padding-box.html
testing/web-platform/tests/css/css-backgrounds-3/css3-background-clip.html
testing/web-platform/tests/css/css-backgrounds-3/css3-background-origin-border-box.html
testing/web-platform/tests/css/css-backgrounds-3/css3-background-origin-content-box.html
testing/web-platform/tests/css/css-backgrounds-3/css3-background-origin-padding-box.html
testing/web-platform/tests/css/css-backgrounds-3/css3-background-size-001.html
testing/web-platform/tests/css/css-backgrounds-3/css3-background-size-contain.html
testing/web-platform/tests/css/css-backgrounds-3/css3-background-size.html
testing/web-platform/tests/css/css-backgrounds-3/css3-border-image-repeat-repeat.html
testing/web-platform/tests/css/css-backgrounds-3/css3-border-image-repeat-stretch.html
testing/web-platform/tests/css/css-backgrounds-3/css3-border-image-source.html
testing/web-platform/tests/css/css-backgrounds-3/css3-box-shadow.html
testing/web-platform/tests/css/css-backgrounds-3/reference/css3-background-clip-border-box-ref.html
testing/web-platform/tests/css/css-backgrounds-3/reference/css3-background-clip-content-box-ref.html
testing/web-platform/tests/css/css-backgrounds-3/reference/css3-background-clip-padding-box-ref.html
testing/web-platform/tests/css/css-backgrounds-3/reference/css3-background-clip-ref.html
testing/web-platform/tests/css/css-backgrounds-3/reference/css3-background-origin-border-box-ref.html
testing/web-platform/tests/css/css-backgrounds-3/reference/css3-background-origin-content-box-ref.html
testing/web-platform/tests/css/css-backgrounds-3/reference/css3-background-origin-padding-box-ref.html
testing/web-platform/tests/css/css-backgrounds-3/reference/css3-background-size-001-ref.html
testing/web-platform/tests/css/css-backgrounds-3/reference/css3-background-size-contain-ref.html
testing/web-platform/tests/css/css-backgrounds-3/reference/css3-background-size-ref.html
testing/web-platform/tests/css/css-backgrounds-3/reference/css3-border-image-repeat-repeat-ref.html
testing/web-platform/tests/css/css-backgrounds-3/reference/css3-border-image-repeat-stretch-ref.html
testing/web-platform/tests/css/css-backgrounds-3/reference/css3-border-image-source-ref.html
testing/web-platform/tests/css/css-backgrounds-3/reference/css3-box-shadow-ref.html
testing/web-platform/tests/css/css-backgrounds-3/support/blue-diamond.png
testing/web-platform/tests/css/css-backgrounds-3/support/green-150-150.png
testing/web-platform/tests/css/css-backgrounds-3/support/green-60-60.png
testing/web-platform/tests/css/css-backgrounds-3/support/red-diamond.png
testing/web-platform/tests/css/css-flexbox-1/flex-margin-no-collapse.html
testing/web-platform/tests/css/css-flexbox-1/reference/align-content-001-ref.html
testing/web-platform/tests/css/css-flexbox-1/reference/flex-margin-no-collapse-ref.html
testing/web-platform/tests/css/css-flexbox-1/reference/justify-content-001-ref.html
testing/web-platform/tests/css/css-round-display-1/polar-anchor-center-001.html
testing/web-platform/tests/css/css-round-display-1/polar-anchor-center-002.html
testing/web-platform/tests/css/css-round-display-1/polar-anchor-center-003.html
testing/web-platform/tests/css/css-round-display-1/polar-anchor-left-top-001.html
testing/web-platform/tests/css/css-round-display-1/polar-anchor-top-001.html
testing/web-platform/tests/css/css-round-display-1/polar-origin-and-anchor-001.html
testing/web-platform/tests/css/css-round-display-1/polar-origin-and-anchor-002.html
testing/web-platform/tests/css/css-round-display-1/polar-origin-and-anchor-003.html
testing/web-platform/tests/css/css-round-display-1/polar-origin-and-anchor-004.html
testing/web-platform/tests/css/css-round-display-1/polar-origin-and-anchor-005.html
testing/web-platform/tests/css/css-round-display-1/polar-origin-auto-001.html
testing/web-platform/tests/css/css-round-display-1/polar-origin-auto-002.html
testing/web-platform/tests/css/css-round-display-1/polar-origin-center-001.html
testing/web-platform/tests/css/css-round-display-1/polar-origin-left-001.html
testing/web-platform/tests/css/css-round-display-1/polar-origin-left-bottom-001.html
testing/web-platform/tests/css/css-style-attr/reference/ref-green.html
testing/web-platform/tests/css/css-style-attr/reference/ref-white-on-green-background.html
testing/web-platform/tests/css/css-text-3/i18n/support/GentiumPlus-R.woff
testing/web-platform/tests/css/css-transforms-1/css3-transform-scale.html
testing/web-platform/tests/css/css-transforms-1/reference/css3-transform-scale-ref.html
testing/web-platform/tests/css/css-transforms-1/reference/transforms-rotate-degree-90-ref.html
testing/web-platform/tests/css/css-transforms-1/reference/transforms-rotate-translate-scale-ref.html
testing/web-platform/tests/css/css-transforms-1/reference/transforms-skewX-ref.html
testing/web-platform/tests/css/css-transforms-1/reference/transforms-skewY-ref.html
testing/web-platform/tests/css/css-transforms-1/transforms-rotate-degree-90.html
testing/web-platform/tests/css/css-transforms-1/transforms-rotate-translate-scale.html
testing/web-platform/tests/css/css-transforms-1/transforms-skewX.html
testing/web-platform/tests/css/css-transforms-1/transforms-skewY.html
testing/web-platform/tests/css/css-transforms-2/css3-transform-perspective.html
testing/web-platform/tests/css/css-transforms-2/reference/css3-transform-perspective-ref.html
testing/web-platform/tests/css/css-transforms-2/reference/rotateY-ref.html
testing/web-platform/tests/css/css-transforms-2/reference/transforms-rotateY-degree-60-ref.html
testing/web-platform/tests/css/css-transforms-2/rotateY.html
testing/web-platform/tests/css/css-transforms-2/transforms-rotateY-degree-60.html
testing/web-platform/tests/css/css-writing-modes-3/reference/support/sileot-webfont.woff
testing/web-platform/tests/css/css-writing-modes-3/reference/support/tcu-font.woff
testing/web-platform/tests/css/css-writing-modes-3/support/sileot-webfont.woff
testing/web-platform/tests/css/css-writing-modes-3/support/tcu-font.otf
testing/web-platform/tests/css/css-writing-modes-3/support/tcu-font.woff
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/adjacent-000.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/adjacent-001.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/adjacent-002.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/attribute-000.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/attribute-001.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/attribute-002.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/attribute-003.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/attribute-004.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/attribute-005.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/attribute-006.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/attribute-007.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/class-000.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/class-001.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/class-002.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/descendant-selector-000.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/descendant-selector-001.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/dinamic-pseudo-classes-000.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/dinamic-pseudo-classes-001.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/dinamic-pseudo-classes-002.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/dinamic-pseudo-classes-003.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/first-child-000.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/first-child-001.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/first-letter-000.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/first-line-000.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/grouping-000.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/grouping-001.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/id-000.html
testing/web-platform/tests/css/work-in-progress/gabriele/basic/sec5/id-001.html
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/absolute-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/box-model-fonts-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/complex-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/css/absolute-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/css/box-model-fonts-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/css/complex-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/css/floating-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/css/image-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/css/notes.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/css/style-props-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/floating-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/image-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/img/ie7-svg.png
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/img/sample.png
testing/web-platform/tests/css/work-in-progress/gabriele/css+svg/style-props-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/absolute-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/background-images-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/absolute-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/background-images-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/dropdown-menu-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/easyclearing-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/equal-height-cols-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/equal-height-cols-001.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/floats-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/flyout-menu-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/font-sizing-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/footer-stick-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/footer-stick-001.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/lists-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/lists-001.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/namespace-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/namespace-001.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/tabbed-menu-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/tables-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/css/vertical-horizontal-center-000.css
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/dropdown-menu-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/easyclearing-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/equal-height-cols-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/equal-height-cols-001.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/floats-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/flyout-menu-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/font-sizing-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/footer-stick-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/footer-stick-001.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/img/bottomleft.png
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/img/bottomright.png
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/img/sample.png
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/img/tabtopleft-hover.png
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/img/tabtopleft.png
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/img/tabtopright-hover.png
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/img/tabtopright.png
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/img/topleft.png
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/img/topright.png
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/lists-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/lists-001.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/namespace-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/namespace-001.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/tabbed-menu-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/tables-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/css+xml/vertical-horizontal-center-000.xml
testing/web-platform/tests/css/work-in-progress/gabriele/evil/box-model/acid-test-box-model-000.html
testing/web-platform/tests/css/work-in-progress/gabriele/evil/box-model/reference.png
testing/web-platform/tests/css/work-in-progress/gabriele/evil/inline-block/inline-block-acid-test-000.html
testing/web-platform/tests/css/work-in-progress/gabriele/evil/inline-block/reference.png
testing/web-platform/tests/css/work-in-progress/gabriele/evil/table-values/reference.png
testing/web-platform/tests/css/work-in-progress/gabriele/evil/table-values/table-values-acid-test-000.html
testing/web-platform/tests/css/work-in-progress/gtalbot/support/cat.png
testing/web-platform/tests/css/work-in-progress/gtalbot/support/fail.cur
testing/web-platform/tests/css/work-in-progress/gtalbot/support/ruler-h-200px-400px.png
testing/web-platform/tests/css/work-in-progress/gtalbot/support/ruler-v-100px-200px-300px.png
testing/web-platform/tests/css/work-in-progress/gtalbot/support/swatch-red.png
testing/web-platform/tests/css/work-in-progress/hixie/parsing-uri-index.png
testing/web-platform/tests/css/work-in-progress/opera/OWNERS
testing/web-platform/tests/css/work-in-progress/opera/css-device-adapt/generate-tests.py
testing/web-platform/tests/css/work-in-progress/ttwf_bj/phuangce/flex-margin-no-collapse.html
testing/web-platform/tests/css/work-in-progress/ttwf_bj/phuangce/reference/flex-margin-no-collapse-ref.html
testing/web-platform/tests/css/work-in-progress/ttwf_shanghai/mark/css3-box-shadow-outline.html
testing/web-platform/tests/css/work-in-progress/ttwf_shanghai/mark/reference/css3-box-shadow-outline-ref.html
testing/web-platform/tests/cssom/MediaList.xhtml
testing/web-platform/tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-csshiftjis.html
testing/web-platform/tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-ms932.html
testing/web-platform/tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-ms_kanji.html
testing/web-platform/tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-shift-jis.html
testing/web-platform/tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-sjis.html
testing/web-platform/tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-windows-31j.html
testing/web-platform/tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars-x-sjis.html
testing/web-platform/tests/encoding/legacy-mb-japanese/shift_jis/sjis_chars.html
testing/web-platform/tests/encoding/legacy-mb-japanese/shift_jis/sjis_errors.html
testing/web-platform/tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-cseuckr.html
testing/web-platform/tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-csksc56011987.html
testing/web-platform/tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-iso-ir-149.html
testing/web-platform/tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-korean.html
testing/web-platform/tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-ks_c_5601-1987.html
testing/web-platform/tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-ks_c_5601-1989.html
testing/web-platform/tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-ksc5601.html
testing/web-platform/tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-ksc_5601.html
testing/web-platform/tests/encoding/legacy-mb-korean/euc-kr/euckr_chars-windows-949.html
testing/web-platform/tests/encoding/legacy-mb-korean/euc-kr/euckr_chars.html
testing/web-platform/tests/encoding/legacy-mb-korean/euc-kr/euckr_errors.html
testing/web-platform/tests/encoding/legacy-mb-tchinese/big5/big5_chars-big5-hkscs.html
testing/web-platform/tests/encoding/legacy-mb-tchinese/big5/big5_chars-cn-big5.html
testing/web-platform/tests/encoding/legacy-mb-tchinese/big5/big5_chars-csbig5.html
testing/web-platform/tests/encoding/legacy-mb-tchinese/big5/big5_chars-x-x-big5.html
testing/web-platform/tests/encoding/legacy-mb-tchinese/big5/big5_chars.html
testing/web-platform/tests/encoding/legacy-mb-tchinese/big5/big5_chars_extra.html
testing/web-platform/tests/encoding/legacy-mb-tchinese/big5/big5_errors.html
testing/web-platform/tests/encrypted-media/Google/migrated_to_root_disabled/encrypted-media-utils.js
testing/web-platform/tests/encrypted-media/Google/webm/test-encrypted-different-av-keys.webm
testing/web-platform/tests/encrypted-media/Google/webm/test-encrypted.webm
testing/web-platform/tests/html/editing/dnd/the-datatransfer-interface/dndTransferCases-manual.html
testing/web-platform/tests/html/syntax/parsing/math-parse03.html
testing/web-platform/tests/html/webappapis/idle-callbacks/callback-exception.html
testing/web-platform/tests/html/webappapis/idle-callbacks/callback-idle-periods.html
testing/web-platform/tests/html/webappapis/idle-callbacks/callback-iframe.html
testing/web-platform/tests/html/webappapis/idle-callbacks/callback-invoked.html
testing/web-platform/tests/html/webappapis/idle-callbacks/callback-multiple-calls.html
testing/web-platform/tests/html/webappapis/idle-callbacks/callback-removed-frame.html
testing/web-platform/tests/html/webappapis/idle-callbacks/callback-suspended.html
testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout-with-raf.html
testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html
testing/web-platform/tests/html/webappapis/idle-callbacks/callback-xhr-sync.html
testing/web-platform/tests/html/webappapis/idle-callbacks/cancel-invoked.html
testing/web-platform/tests/html/webappapis/idle-callbacks/idlharness.html
testing/web-platform/tests/html/webappapis/idle-callbacks/resources/post_name_on_load.html
testing/web-platform/tests/infrastructure/failing-test.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_autocomplete-manual.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_list-manual.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_valueasdate-manual.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/input_valueasnumber-manual.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/select_length-manual.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/Not_Use/select_selectedindex-manual.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_checkvalidity.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_labels.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_setcustomvalidity.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_validationmessage.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_validity.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/button_willvalidate.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_checkvalidity.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_setcustomvalidity.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_validationmessage.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_validity.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/fieldset_willvalidate.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_action.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_checkvalidity.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_length.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/form_submit.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_checkvalidity.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_height.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_labels.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_setcustomvalidity.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_stepdown.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_stepup.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_validationmessage.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_validity.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_value_invalidstateerr.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_valueasdate_invalidstateerr.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_valueasnumber_invalidstateerr.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_width.html
testing/web-platform/tests/old-tests/submission/Infraware/Forms/contents/Forms/input_willvalidate.html
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_000-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_001-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_002-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_003-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_004-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_005-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_006-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_007-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_008-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_009-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_010-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_011-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_012-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_013-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_014-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_015-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_016-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_support.js
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_002.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_003.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_006.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_007.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_012.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_023.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_024.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_028.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/iframe_sandbox_029.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox.pdf
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_002.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_003-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_004-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_006-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_007-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_008-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_010-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_011.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_016.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_020-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_021-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_022-manual.htm
testing/web-platform/tests/old-tests/submission/Microsoft/structuredclone/echo.js
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/023.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/050.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/060.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/067.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/069.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/075.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/077.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/078.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/079.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/083.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/094.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/096.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/101.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/106-import.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/106-noimport.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/107-import.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/107-noimport.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/111.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/112.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/119.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/128.html
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/css/background.css
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/css/import.css
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/count-script-tags.js
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/find-body.js
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/find-foo.js
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-1.js
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-10.js
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-11.js
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-2.js
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-3.js
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-4.js
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-5.js
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-6.js
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-7.js
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-8.js
testing/web-platform/tests/old-tests/submission/Opera/script_scheduling/scripts/include-9.js
testing/web-platform/tests/progress-events/constructor.html
testing/web-platform/tests/progress-events/interface.html
testing/web-platform/tests/progress-events/tests/submissions/Samsung/resources/no-content-length.py
testing/web-platform/tests/service-workers/service-worker/resources/fetch-event-redirect-iframe.html
testing/web-platform/tests/service-workers/service-worker/resources/navigation-redirect-worker.js
testing/web-platform/tests/svg/import/woffs/Blocky.woff
testing/web-platform/tests/svg/import/woffs/EzraSILSR.woff
testing/web-platform/tests/svg/import/woffs/FreeMono.woff
testing/web-platform/tests/svg/import/woffs/FreeMonoBold.woff
testing/web-platform/tests/svg/import/woffs/FreeMonoBoldOblique.woff
testing/web-platform/tests/svg/import/woffs/FreeMonoOblique.woff
testing/web-platform/tests/svg/import/woffs/FreeSans.woff
testing/web-platform/tests/svg/import/woffs/FreeSansASCII.woff
testing/web-platform/tests/svg/import/woffs/FreeSansBold.woff
testing/web-platform/tests/svg/import/woffs/FreeSansBoldOblique.woff
testing/web-platform/tests/svg/import/woffs/FreeSansOblique.woff
testing/web-platform/tests/svg/import/woffs/FreeSerif.woff
testing/web-platform/tests/svg/import/woffs/FreeSerifBold.woff
testing/web-platform/tests/svg/import/woffs/FreeSerifBoldItalic.woff
testing/web-platform/tests/svg/import/woffs/FreeSerifItalic.woff
testing/web-platform/tests/svg/import/woffs/PlaneOne.woff
testing/web-platform/tests/svg/import/woffs/ScheherazadeRegOT.woff
testing/web-platform/tests/svg/import/woffs/Tribase.woff
testing/web-platform/tests/svg/import/woffs/ZCB.woff
testing/web-platform/tests/svg/import/woffs/ZCL.woff
testing/web-platform/tests/svg/import/woffs/ZCR.woff
testing/web-platform/tests/svg/import/woffs/ZCSB.woff
testing/web-platform/tests/svg/import/woffs/ZCXB.woff
testing/web-platform/tests/svg/import/woffs/ZCXL.woff
testing/web-platform/tests/svg/import/woffs/anglepoi.woff
testing/web-platform/tests/svg/import/woffs/embeded-text-text-04.woff
testing/web-platform/tests/svg/import/woffs/embeded-text-text-05.woff
testing/web-platform/tests/svg/import/woffs/embeded-text-text-06.woff
testing/web-platform/tests/svg/import/woffs/embeded.woff
testing/web-platform/tests/webrtc/RTCDTMFSender-insertDTMF.html
testing/web-platform/tests/webrtc/RTCDTMFSender-ontonechange-long.html
testing/web-platform/tests/webrtc/RTCDTMFSender-ontonechange.html
testing/web-platform/tests/webrtc/RTCPeerConnection-addTrack.html
testing/web-platform/tests/webrtc/RTCPeerConnection-ontrack.html
testing/web-platform/tests/webrtc/RTCPeerConnection-removeTrack.html
testing/web-platform/tests/webrtc/RTCRtpReceiver-getContributingSources.html
testing/web-platform/tests/webrtc/RTCRtpReceiver-getSynchronizationSources.html
--- a/caps/nsScriptSecurityManager.cpp
+++ b/caps/nsScriptSecurityManager.cpp
@@ -154,79 +154,16 @@ inline void SetPendingExceptionASCII(JSC
 }
 
 inline void SetPendingException(JSContext *cx, const char16_t *aMsg)
 {
     NS_ConvertUTF16toUTF8 msg(aMsg);
     JS_ReportErrorUTF8(cx, "%s", msg.get());
 }
 
-// Helper class to get stuff from the ClassInfo and not waste extra time with
-// virtual method calls for things it has already gotten
-class ClassInfoData
-{
-public:
-    ClassInfoData(nsIClassInfo *aClassInfo, const char *aName)
-      : mClassInfo(aClassInfo),
-        mFlags(0),
-        mName(aName),
-        mDidGetFlags(false)
-    {
-      if (!aName) {
-        mName.SetIsVoid(true);
-      }
-    }
-
-    ~ClassInfoData() = default;
-
-    uint32_t GetFlags()
-    {
-        if (!mDidGetFlags) {
-            if (mClassInfo) {
-                nsresult rv = mClassInfo->GetFlags(&mFlags);
-                if (NS_FAILED(rv)) {
-                    mFlags = 0;
-                }
-            } else {
-                mFlags = 0;
-            }
-
-            mDidGetFlags = true;
-        }
-
-        return mFlags;
-    }
-
-    bool IsDOMClass()
-    {
-        return !!(GetFlags() & nsIClassInfo::DOM_OBJECT);
-    }
-
-    void GetName(nsACString& aName)
-    {
-        if (mName.IsVoid()) {
-            if (mClassInfo) {
-                mClassInfo->GetClassDescription(mName);
-            }
-
-            if (mName.IsVoid()) {
-                mName.AssignLiteral("UnnamedClass");
-            }
-        }
-
-        aName = mName;
-    }
-
-private:
-    nsIClassInfo *mClassInfo; // WEAK
-    uint32_t mFlags;
-    nsCString mName;
-    bool mDidGetFlags;
-};
-
 /* static */
 bool
 nsScriptSecurityManager::SecurityCompareURIs(nsIURI* aSourceURI,
                                              nsIURI* aTargetURI)
 {
     return NS_SecurityCompareURIs(aSourceURI, aTargetURI, sStrictFileOriginPolicy);
 }
 
@@ -1271,37 +1208,36 @@ nsScriptSecurityManager::doGetObjectPrin
 
 NS_IMETHODIMP
 nsScriptSecurityManager::CanCreateWrapper(JSContext *cx,
                                           const nsIID &aIID,
                                           nsISupports *aObj,
                                           nsIClassInfo *aClassInfo)
 {
 // XXX Special case for nsIXPCException ?
-    ClassInfoData objClassInfo = ClassInfoData(aClassInfo, nullptr);
-    if (objClassInfo.IsDOMClass())
-    {
+
+    uint32_t flags;
+    if (aClassInfo && NS_SUCCEEDED(aClassInfo->GetFlags(&flags)) &&
+        (flags & nsIClassInfo::DOM_OBJECT)) {
         return NS_OK;
     }
 
     // We give remote-XUL whitelisted domains a free pass here. See bug 932906.
     JS::Rooted<JS::Realm*> contextRealm(cx, JS::GetCurrentRealmOrNull(cx));
     MOZ_RELEASE_ASSERT(contextRealm);
-    if (!xpc::AllowContentXBLScope(contextRealm))
-    {
+    if (!xpc::AllowContentXBLScope(contextRealm)) {
         return NS_OK;
     }
 
-    if (nsContentUtils::IsCallerChrome())
-    {
+    if (nsContentUtils::IsCallerChrome()) {
         return NS_OK;
     }
 
-    // We want to expose nsIDOMXULCommandDispatcher and nsITreeSelection implementations
-    // in XBL scopes.
+    // We want to expose nsIDOMXULCommandDispatcher and nsITreeSelection
+    // implementations in XBL scopes.
     if (xpc::IsContentXBLScope(contextRealm)) {
       nsCOMPtr<nsIDOMXULCommandDispatcher> dispatcher = do_QueryInterface(aObj);
       if (dispatcher) {
         return NS_OK;
       }
 
       nsCOMPtr<nsITreeSelection> treeSelection = do_QueryInterface(aObj);
       if (treeSelection) {
@@ -1310,17 +1246,22 @@ nsScriptSecurityManager::CanCreateWrappe
     }
 
     //-- Access denied, report an error
     nsAutoCString originUTF8;
     nsIPrincipal* subjectPrincipal = nsContentUtils::SubjectPrincipal();
     GetPrincipalDomainOrigin(subjectPrincipal, originUTF8);
     NS_ConvertUTF8toUTF16 originUTF16(originUTF8);
     nsAutoCString classInfoNameUTF8;
-    objClassInfo.GetName(classInfoNameUTF8);
+    if (aClassInfo) {
+      aClassInfo->GetClassDescription(classInfoNameUTF8);
+    }
+    if (classInfoNameUTF8.IsEmpty()) {
+      classInfoNameUTF8.AssignLiteral("UnnamedClass");
+    }
     NS_ConvertUTF8toUTF16 classInfoUTF16(classInfoNameUTF8);
     nsresult rv;
     nsAutoString errorMsg;
     if (originUTF16.IsEmpty()) {
         const char16_t* formatStrings[] = { classInfoUTF16.get() };
         rv = sStrBundle->FormatStringFromName("CreateWrapperDenied",
                                               formatStrings,
                                               1,
--- a/devtools/server/actors/layout.js
+++ b/devtools/server/actors/layout.js
@@ -1,113 +1,224 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const { Actor, ActorClassWithSpec } = require("devtools/shared/protocol");
+const { flexboxSpec, gridSpec, layoutSpec } = require("devtools/shared/specs/layout");
+const nodeFilterConstants = require("devtools/shared/dom-node-filter-constants");
 const { getStringifiableFragments } =
   require("devtools/server/actors/utils/css-grid-utils");
-const { gridSpec, layoutSpec } = require("devtools/shared/specs/layout");
+
+loader.lazyRequireGetter(this, "CssLogic", "devtools/server/css-logic", true);
 
 /**
  * Set of actors the expose the CSS layout information to the devtools protocol clients.
  *
  * The |Layout| actor is the main entry point. It is used to get various CSS
  * layout-related information from the document.
  *
+ * The |Flexbox| actor provides the container node information to inspect the flexbox
+ * container.
+ *
  * The |Grid| actor provides the grid fragment information to inspect the grid container.
  */
 
+const FlexboxActor = ActorClassWithSpec(flexboxSpec, {
+  /**
+   * @param  {LayoutActor} layoutActor
+   *         The LayoutActor instance.
+   * @param  {DOMNode} containerEl
+   *         The flexbox container element.
+   */
+  initialize(layoutActor, containerEl) {
+    Actor.prototype.initialize.call(this, layoutActor.conn);
+
+    this.containerEl = containerEl;
+    this.walker = layoutActor.walker;
+  },
+
+  destroy() {
+    Actor.prototype.destroy.call(this);
+
+    this.containerEl = null;
+    this.walker = null;
+  },
+
+  form(detail) {
+    if (detail === "actorid") {
+      return this.actorID;
+    }
+
+    let form = {
+      actor: this.actorID,
+    };
+
+    // If the WalkerActor already knows the container element, then also return its
+    // ActorID so we avoid the client from doing another round trip to get it in many
+    // cases.
+    if (this.walker.hasNode(this.containerEl)) {
+      form.containerNodeActorID = this.walker.getNode(this.containerEl).actorID;
+    }
+
+    return form;
+  },
+});
+
 /**
  * The GridActor provides information about a given grid's fragment data.
  */
-var GridActor = ActorClassWithSpec(gridSpec, {
+const GridActor = ActorClassWithSpec(gridSpec, {
   /**
    * @param  {LayoutActor} layoutActor
    *         The LayoutActor instance.
    * @param  {DOMNode} containerEl
    *         The grid container element.
    */
-  initialize: function (layoutActor, containerEl) {
+  initialize(layoutActor, containerEl) {
     Actor.prototype.initialize.call(this, layoutActor.conn);
 
     this.containerEl = containerEl;
     this.walker = layoutActor.walker;
   },
 
-  destroy: function () {
+  destroy() {
     Actor.prototype.destroy.call(this);
 
     this.containerEl = null;
     this.gridFragments = null;
     this.walker = null;
   },
 
-  form: function (detail) {
+  form(detail) {
     if (detail === "actorid") {
       return this.actorID;
     }
 
     // Seralize the grid fragment data into JSON so protocol.js knows how to write
     // and read the data.
     let gridFragments = this.containerEl.getGridFragments();
     this.gridFragments = getStringifiableFragments(gridFragments);
 
     let form = {
       actor: this.actorID,
-      gridFragments: this.gridFragments
+      gridFragments: this.gridFragments,
     };
 
     // If the WalkerActor already knows the container element, then also return its
     // ActorID so we avoid the client from doing another round trip to get it in many
     // cases.
     if (this.walker.hasNode(this.containerEl)) {
       form.containerNodeActorID = this.walker.getNode(this.containerEl).actorID;
     }
 
     return form;
   },
 });
 
 /**
  * The CSS layout actor provides layout information for the given document.
  */
-var LayoutActor = ActorClassWithSpec(layoutSpec, {
-  initialize: function (conn, tabActor, walker) {
+const LayoutActor = ActorClassWithSpec(layoutSpec, {
+  initialize(conn, tabActor, walker) {
     Actor.prototype.initialize.call(this, conn);
 
     this.tabActor = tabActor;
     this.walker = walker;
   },
 
-  destroy: function () {
+  destroy() {
     Actor.prototype.destroy.call(this);
 
     this.tabActor = null;
     this.walker = null;
   },
 
   /**
+   * Returns an array of FlexboxActor objects for all the flexbox containers found by
+   * iterating below the given rootNode.
+   *
+   * @param  {Node|NodeActor} rootNode
+   *         The root node to start iterating at.
+   * @return {Array} An array of FlexboxActor objects.
+   */
+  getFlexbox(rootNode) {
+    let flexboxes = [];
+
+    if (!rootNode) {
+      return flexboxes;
+    }
+
+    let treeWalker = this.walker.getDocumentWalker(rootNode,
+      nodeFilterConstants.SHOW_ELEMENT);
+
+    while (treeWalker.nextNode()) {
+      let currentNode = treeWalker.currentNode;
+      let computedStyle = CssLogic.getComputedStyle(currentNode);
+
+      if (!computedStyle) {
+        continue;
+      }
+
+      if (computedStyle.display == "inline-flex" || computedStyle.display == "flex") {
+        let flexboxActor = new FlexboxActor(this, currentNode);
+        flexboxes.push(flexboxActor);
+      }
+    }
+
+    return flexboxes;
+  },
+
+  /**
+   * Returns an array of FlexboxActor objects for all existing flexbox containers found by
+   * iterating below the given rootNode and optionally including nested frames.
+   *
+   * @param  {NodeActor} rootNode
+   * @param  {Boolean} traverseFrames
+   *         Whether or not we should iterate through nested frames.
+   * @return {Array} An array of FlexboxActor objects.
+   */
+  getAllFlexbox(rootNode, traverseFrames) {
+    let flexboxes = [];
+
+    if (!rootNode) {
+      return flexboxes;
+    }
+
+    if (!traverseFrames) {
+      return this.getFlexbox(rootNode.rawNode);
+    }
+
+    for (let {document} of this.tabActor.windows) {
+      flexboxes = [...flexboxes, ...this.getFlexbox(document.documentElement)];
+    }
+
+    return flexboxes;
+  },
+
+  /**
    * Returns an array of GridActor objects for all the grid containers found by iterating
    * below the given rootNode.
    *
    * @param  {Node|NodeActor} rootNode
    *         The root node to start iterating at.
    * @return {Array} An array of GridActor objects.
    */
-  getGrids: function (rootNode) {
+  getGrids(rootNode) {
     let grids = [];
 
     if (!rootNode) {
       return grids;
     }
 
-    let treeWalker = this.walker.getDocumentWalker(rootNode);
+    let treeWalker = this.walker.getDocumentWalker(rootNode,
+      nodeFilterConstants.SHOW_ELEMENT);
+
     while (treeWalker.nextNode()) {
       let currentNode = treeWalker.currentNode;
 
       if (currentNode.getGridFragments && currentNode.getGridFragments().length > 0) {
         let gridActor = new GridActor(this, currentNode);
         grids.push(gridActor);
       }
     }
@@ -119,30 +230,30 @@ var LayoutActor = ActorClassWithSpec(lay
    * Returns an array of GridActor objects for all existing grid containers found by
    * iterating below the given rootNode and optionally including nested frames.
    *
    * @param  {NodeActor} rootNode
    * @param  {Boolean} traverseFrames
    *         Whether or not we should iterate through nested frames.
    * @return {Array} An array of GridActor objects.
    */
-  getAllGrids: function (rootNode, traverseFrames) {
+  getAllGrids(rootNode, traverseFrames) {
     let grids = [];
 
     if (!rootNode) {
       return grids;
     }
 
     if (!traverseFrames) {
       return this.getGrids(rootNode.rawNode);
     }
 
     for (let {document} of this.tabActor.windows) {
       grids = [...grids, ...this.getGrids(document.documentElement)];
     }
 
     return grids;
   },
-
 });
 
+exports.FlexboxActor = FlexboxActor;
 exports.GridActor = GridActor;
 exports.LayoutActor = LayoutActor;
--- a/devtools/shared/fronts/layout.js
+++ b/devtools/shared/fronts/layout.js
@@ -1,16 +1,38 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const { FrontClassWithSpec } = require("devtools/shared/protocol");
-const { gridSpec, layoutSpec } = require("devtools/shared/specs/layout");
+const { flexboxSpec, gridSpec, layoutSpec } = require("devtools/shared/specs/layout");
+
+const FlexboxFront = FrontClassWithSpec(flexboxSpec, {
+  form: function (form, detail) {
+    if (detail === "actorid") {
+      this.actorID = form;
+      return;
+    }
+    this._form = form;
+  },
+
+  /**
+   * In some cases, the FlexboxActor already knows the NodeActor ID of the node where the
+   * flexbox is located. In such cases, this getter returns the NodeFront for it.
+   */
+  get containerNodeFront() {
+    if (!this._form.containerNodeActorID) {
+      return null;
+    }
+
+    return this.conn.getActor(this._form.containerNodeActorID);
+  },
+});
 
 const GridFront = FrontClassWithSpec(gridSpec, {
   form: function (form, detail) {
     if (detail === "actorid") {
       this.actorID = form;
       return;
     }
     this._form = form;
@@ -28,15 +50,16 @@ const GridFront = FrontClassWithSpec(gri
     return this.conn.getActor(this._form.containerNodeActorID);
   },
 
   /**
    * Getter for the grid fragments data.
    */
   get gridFragments() {
     return this._form.gridFragments;
-  }
+  },
 });
 
 const LayoutFront = FrontClassWithSpec(layoutSpec, {});
 
+exports.FlexboxFront = FlexboxFront;
 exports.GridFront = GridFront;
 exports.LayoutFront = LayoutFront;
--- a/devtools/shared/specs/layout.js
+++ b/devtools/shared/specs/layout.js
@@ -1,32 +1,49 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const { Arg, generateActorSpec, RetVal } = require("devtools/shared/protocol");
 
+const flexboxSpec = generateActorSpec({
+  typeName: "flexbox",
+
+  methods: {},
+});
+
 const gridSpec = generateActorSpec({
   typeName: "grid",
 
   methods: {},
 });
 
 const layoutSpec = generateActorSpec({
   typeName: "layout",
 
   methods: {
+    getAllFlexbox: {
+      request: {
+        rootNode: Arg(0, "domnode"),
+        traverseFrames: Arg(1, "nullable:boolean")
+      },
+      response: {
+        flexboxes: RetVal("array:flexbox")
+      }
+    },
+
     getAllGrids: {
       request: {
         rootNode: Arg(0, "domnode"),
         traverseFrames: Arg(1, "nullable:boolean")
       },
       response: {
         grids: RetVal("array:grid")
       }
-    }
+    },
   },
 });
 
+exports.flexboxSpec = flexboxSpec;
 exports.gridSpec = gridSpec;
 exports.layoutSpec = layoutSpec;
--- a/gfx/layers/wr/WebRenderBridgeChild.cpp
+++ b/gfx/layers/wr/WebRenderBridgeChild.cpp
@@ -266,30 +266,32 @@ WriteFontFileData(const uint8_t* aData, 
   *sink->mFontKey = sink->mWrBridge->GetNextFontKey();
 
   sink->mResources->AddRawFont(*sink->mFontKey, Range<uint8_t>(const_cast<uint8_t*>(aData), aLength), aIndex);
 }
 
 void
 WebRenderBridgeChild::PushGlyphs(wr::DisplayListBuilder& aBuilder, const nsTArray<wr::GlyphInstance>& aGlyphs,
                                  gfx::ScaledFont* aFont, const wr::ColorF& aColor, const StackingContextHelper& aSc,
-                                 const wr::LayerRect& aBounds, const wr::LayerRect& aClip, bool aBackfaceVisible)
+                                 const wr::LayerRect& aBounds, const wr::LayerRect& aClip, bool aBackfaceVisible,
+                                 const wr::GlyphOptions* aGlyphOptions)
 {
   MOZ_ASSERT(aFont);
   MOZ_ASSERT(!aGlyphs.IsEmpty());
 
   wr::WrFontInstanceKey key = GetFontKeyForScaledFont(aFont);
   MOZ_ASSERT(key.mNamespace.mHandle && key.mHandle);
 
   aBuilder.PushText(aBounds,
                     aClip,
                     aBackfaceVisible,
                     aColor,
                     key,
-                    Range<const wr::GlyphInstance>(aGlyphs.Elements(), aGlyphs.Length()));
+                    Range<const wr::GlyphInstance>(aGlyphs.Elements(), aGlyphs.Length()),
+                    aGlyphOptions);
 }
 
 wr::FontInstanceKey
 WebRenderBridgeChild::GetFontKeyForScaledFont(gfx::ScaledFont* aScaledFont)
 {
   MOZ_ASSERT(!mDestroyed);
   MOZ_ASSERT(aScaledFont);
   MOZ_ASSERT((aScaledFont->GetType() == gfx::FontType::DWRITE) ||
--- a/gfx/layers/wr/WebRenderBridgeChild.h
+++ b/gfx/layers/wr/WebRenderBridgeChild.h
@@ -127,17 +127,18 @@ public:
   {
     return wr::WrImageKey{ GetNamespace(), GetNextResourceId() };
   }
 
   void PushGlyphs(wr::DisplayListBuilder& aBuilder, const nsTArray<wr::GlyphInstance>& aGlyphs,
                   gfx::ScaledFont* aFont, const wr::ColorF& aColor,
                   const StackingContextHelper& aSc,
                   const wr::LayerRect& aBounds, const wr::LayerRect& aClip,
-                  bool aBackfaceVisible);
+                  bool aBackfaceVisible,
+                  const wr::GlyphOptions* aGlyphOptions = nullptr);
 
   wr::FontInstanceKey GetFontKeyForScaledFont(gfx::ScaledFont* aScaledFont);
 
   void RemoveExpiredFontKeys();
   void ClearReadLocks();
 
   void BeginClearCachedResources();
   void EndClearCachedResources();
--- a/gfx/webrender_bindings/WebRenderTypes.h
+++ b/gfx/webrender_bindings/WebRenderTypes.h
@@ -192,16 +192,29 @@ inline PipelineId AsPipelineId(const uin
 }
 
 inline ImageRendering ToImageRendering(gfx::SamplingFilter aFilter)
 {
   return aFilter == gfx::SamplingFilter::POINT ? ImageRendering::Pixelated
                                                : ImageRendering::Auto;
 }
 
+static inline FontRenderMode ToFontRenderMode(gfx::AntialiasMode aMode, bool aPermitSubpixelAA = true)
+{
+  switch (aMode) {
+    case gfx::AntialiasMode::NONE:
+      return FontRenderMode::Mono;
+    case gfx::AntialiasMode::GRAY:
+      return FontRenderMode::Alpha;
+    case gfx::AntialiasMode::SUBPIXEL:
+    default:
+      return aPermitSubpixelAA ? FontRenderMode::Subpixel : FontRenderMode::Alpha;
+  }
+}
+
 static inline MixBlendMode ToMixBlendMode(gfx::CompositionOp compositionOp)
 {
   switch (compositionOp)
   {
       case gfx::CompositionOp::OP_MULTIPLY:
         return MixBlendMode::Multiply;
       case gfx::CompositionOp::OP_SCREEN:
         return MixBlendMode::Screen;
--- a/js/src/jit-test/tests/wasm/bce.js
+++ b/js/src/jit-test/tests/wasm/bce.js
@@ -1,10 +1,8 @@
-// |jit-test| test-also-wasm-check-bce
-
 mem='\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f'+
     '\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'+
     '\x00'.repeat(65488) +
     '\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'
 
 let accessWidth = {
   '8_s':  1,
   '8_u':  1,
--- a/js/src/jit-test/tests/wasm/bench/directives.txt
+++ b/js/src/jit-test/tests/wasm/bench/directives.txt
@@ -1,1 +1,1 @@
-|jit-test| test-also-no-wasm-baseline; test-also-no-wasm-ion; test-also-wasm-check-bce; include:wasm.js
+|jit-test| test-also-no-wasm-baseline; test-also-no-wasm-ion; test-also-wasm-tiering; include:wasm.js
--- a/js/src/jit-test/tests/wasm/directives.txt
+++ b/js/src/jit-test/tests/wasm/directives.txt
@@ -1,1 +1,1 @@
-|jit-test| test-also-no-wasm-baseline; test-also-no-wasm-ion; include:wasm.js
+|jit-test| test-also-no-wasm-baseline; test-also-no-wasm-ion; test-also-wasm-tiering; include:wasm.js
--- a/js/src/jit-test/tests/wasm/memory.js
+++ b/js/src/jit-test/tests/wasm/memory.js
@@ -1,10 +1,8 @@
-// |jit-test| test-also-wasm-check-bce
-
 const RuntimeError = WebAssembly.RuntimeError;
 
 function loadModule(type, ext, offset, align) {
     return wasmEvalText(
     `(module
        (memory 1)
        (data (i32.const 0) "\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f")
        (data (i32.const 16) "\\f0\\f1\\f2\\f3\\f4\\f5\\f6\\f7\\f8\\f9\\fa\\fb\\fc\\fd\\fe\\ff")
--- a/js/src/jit-test/tests/wasm/regress/directives.txt
+++ b/js/src/jit-test/tests/wasm/regress/directives.txt
@@ -1,1 +1,1 @@
-|jit-test| test-also-no-wasm-baseline; test-also-no-wasm-ion; include:wasm.js
+|jit-test| test-also-no-wasm-baseline; test-also-no-wasm-ion; test-also-wasm-tiering; include:wasm.js
--- a/js/src/jit-test/tests/wasm/spec/directives.txt
+++ b/js/src/jit-test/tests/wasm/spec/directives.txt
@@ -1,1 +1,1 @@
-|jit-test| test-also-no-wasm-baseline; test-also-no-wasm-ion; include:wasm-testharness.js
+|jit-test| test-also-no-wasm-baseline; test-also-no-wasm-ion; test-also-wasm-tiering; include:wasm-testharness.js
--- a/js/src/jit-test/tests/wasm/timeout/directives.txt
+++ b/js/src/jit-test/tests/wasm/timeout/directives.txt
@@ -1,2 +1,2 @@
-|jit-test| test-also-no-wasm-baseline; test-also-no-wasm-ion
+|jit-test| test-also-no-wasm-baseline; test-also-no-wasm-ion; test-also-wasm-tiering
 
--- a/js/src/jit/Ion.cpp
+++ b/js/src/jit/Ion.cpp
@@ -1763,17 +1763,17 @@ OptimizeMIR(MIRGenerator* mir)
         gs.spewPass("Sincos optimization");
         AssertExtendedGraphCoherency(graph);
 
         if (mir->shouldCancel("Sincos optimization"))
             return false;
     }
 
     // BCE marks bounds checks as dead, so do BCE before DCE.
-    if (mir->compilingWasm() && !JitOptions.wasmAlwaysCheckBounds) {
+    if (mir->compilingWasm()) {
         if (!EliminateBoundsChecks(mir, graph))
             return false;
         gs.spewPass("Redundant Bounds Check Elimination");
         AssertGraphCoherency(graph);
 
         if (mir->shouldCancel("BCE"))
             return false;
     }
--- a/js/src/jit/JitOptions.cpp
+++ b/js/src/jit/JitOptions.cpp
@@ -236,19 +236,16 @@ DefaultJitOptions::DefaultJitOptions()
     SET_DEFAULT(disableUnboxedObjects, false);
 
     // Test whether Atomics are allowed in asm.js code.
     SET_DEFAULT(asmJSAtomicsEnable, false);
 
     // Test whether wasm int64 / double NaN bits testing is enabled.
     SET_DEFAULT(wasmTestMode, false);
 
-    // Test whether wasm bounds check should always be generated.
-    SET_DEFAULT(wasmAlwaysCheckBounds, false);
-
     // Toggles the optimization whereby offsets are folded into loads and not
     // included in the bounds check.
     SET_DEFAULT(wasmFoldOffsets, true);
 
     // Until which wasm bytecode size should we accumulate functions, in order
     // to compile efficiently on helper threads. Baseline code compiles much
     // faster than Ion code so use scaled thresholds (see also bug 1320374).
     SET_DEFAULT(wasmBatchBaselineThreshold, 10000);
--- a/js/src/jit/JitOptions.h
+++ b/js/src/jit/JitOptions.h
@@ -69,17 +69,16 @@ struct DefaultJitOptions
     bool disableSink;
     bool eagerCompilation;
     bool forceInlineCaches;
     bool fullDebugChecks;
     bool limitScriptSize;
     bool osr;
     bool asmJSAtomicsEnable;
     bool wasmTestMode;
-    bool wasmAlwaysCheckBounds;
     bool wasmFoldOffsets;
     bool ionInterruptWithoutSignals;
     bool simulatorAlwaysInterrupt;
     uint32_t baselineWarmUpThreshold;
     uint32_t exceptionBailoutThreshold;
     uint32_t frequentBailoutThreshold;
     uint32_t maxStackArgs;
     uint32_t osrPcMismatchesBeforeRecompile;
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -1135,19 +1135,20 @@ JS_StringToVersion(const char* string);
 namespace JS {
 
 class JS_PUBLIC_API(ContextOptions) {
   public:
     ContextOptions()
       : baseline_(true),
         ion_(true),
         asmJS_(true),
-        wasm_(false),
-        wasmBaseline_(false),
-        wasmIon_(false),
+        wasm_(true),
+        wasmBaseline_(true),
+        wasmIon_(true),
+        testWasmAwaitTier2_(false),
         throwOnAsmJSValidationFailure_(false),
         nativeRegExp_(true),
         asyncStack_(true),
         throwOnDebuggeeWouldRun_(true),
         dumpStackOnDebuggeeWouldRun_(false),
         werror_(false),
         strictMode_(false),
         extraWarnings_(false),
@@ -1224,16 +1225,26 @@ class JS_PUBLIC_API(ContextOptions) {
         wasmIon_ = flag;
         return *this;
     }
     ContextOptions& toggleWasmIon() {
         wasmIon_ = !wasmIon_;
         return *this;
     }
 
+    bool testWasmAwaitTier2() const { return testWasmAwaitTier2_; }
+    ContextOptions& setTestWasmAwaitTier2(bool flag) {
+        testWasmAwaitTier2_ = flag;
+        return *this;
+    }
+    ContextOptions& toggleTestWasmAwaitTier2() {
+        testWasmAwaitTier2_ = !testWasmAwaitTier2_;
+        return *this;
+    }
+
     bool throwOnAsmJSValidationFailure() const { return throwOnAsmJSValidationFailure_; }
     ContextOptions& setThrowOnAsmJSValidationFailure(bool flag) {
         throwOnAsmJSValidationFailure_ = flag;
         return *this;
     }
     ContextOptions& toggleThrowOnAsmJSValidationFailure() {
         throwOnAsmJSValidationFailure_ = !throwOnAsmJSValidationFailure_;
         return *this;
@@ -1319,16 +1330,17 @@ class JS_PUBLIC_API(ContextOptions) {
 
   private:
     bool baseline_ : 1;
     bool ion_ : 1;
     bool asmJS_ : 1;
     bool wasm_ : 1;
     bool wasmBaseline_ : 1;
     bool wasmIon_ : 1;
+    bool testWasmAwaitTier2_ : 1;
     bool throwOnAsmJSValidationFailure_ : 1;
     bool nativeRegExp_ : 1;
     bool asyncStack_ : 1;
     bool throwOnDebuggeeWouldRun_ : 1;
     bool dumpStackOnDebuggeeWouldRun_ : 1;
     bool werror_ : 1;
     bool strictMode_ : 1;
     bool extraWarnings_ : 1;
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -305,16 +305,17 @@ static bool offthreadCompilation = false
 static bool enableBaseline = false;
 static bool enableIon = false;
 static bool enableAsmJS = false;
 static bool enableWasm = false;
 static bool enableNativeRegExp = false;
 static bool enableSharedMemory = SHARED_MEMORY_DEFAULT;
 static bool enableWasmBaseline = false;
 static bool enableWasmIon = false;
+static bool enableTestWasmAwaitTier2 = false;
 static bool enableAsyncStacks = false;
 static bool enableStreams = false;
 #ifdef JS_GC_ZEAL
 static uint32_t gZealBits = 0;
 static uint32_t gZealFrequency = 0;
 #endif
 static bool printTiming = false;
 static const char* jsCacheDir = nullptr;
@@ -5579,34 +5580,33 @@ struct BufferStreamJob
     explicit BufferStreamJob(JS::StreamConsumer* consumer)
       : consumer(consumer)
     {}
 };
 
 struct BufferStreamState
 {
     Vector<UniquePtr<BufferStreamJob>, 0, SystemAllocPolicy> jobs;
-    ConditionVariable jobsEmpty;
     size_t delayMillis;
     size_t chunkSize;
     bool shutdown;
 
     BufferStreamState()
       : delayMillis(1),
         chunkSize(10),
         shutdown(false)
     {}
 
     ~BufferStreamState()
     {
         MOZ_ASSERT(jobs.empty());
     }
 };
 
-ExclusiveData<BufferStreamState> bufferStreamState(mutexid::BufferStreamState);
+ExclusiveWaitableData<BufferStreamState> bufferStreamState(mutexid::BufferStreamState);
 
 static void
 BufferStreamMain(BufferStreamJob* job)
 {
     const uint8_t* const bytes = job->bytes.begin();
 
     size_t byteOffset = 0;
     while (true) {
@@ -5642,17 +5642,17 @@ BufferStreamMain(BufferStreamJob* job)
 
     auto state = bufferStreamState.lock();
     size_t jobIndex = 0;
     while (state->jobs[jobIndex].get() != job)
         jobIndex++;
     job->thread.detach();  // quiet assert in ~Thread() called by erase().
     state->jobs.erase(state->jobs.begin() + jobIndex);
     if (state->jobs.empty())
-        state->jobsEmpty.notify_all();
+        state.notify_all(/* jobs empty */);
 }
 
 static bool
 ConsumeBufferSource(JSContext* cx, JS::HandleObject obj, JS::MimeType, JS::StreamConsumer* consumer)
 {
     SharedMem<uint8_t*> dataPointer;
     size_t byteLength;
     if (!IsBufferSource(obj, &dataPointer, &byteLength)) {
@@ -5679,17 +5679,17 @@ ConsumeBufferSource(JSContext* cx, JS::H
 }
 
 static void
 ShutdownBufferStreams()
 {
     auto state = bufferStreamState.lock();
     state->shutdown = true;
     while (!state->jobs.empty())
-        state.wait(state->jobsEmpty);
+        state.wait(/* jobs empty */);
 }
 
 static bool
 SetBufferStreamParams(JSContext* cx, unsigned argc, Value* vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (!args.requireAtLeast(cx, "setBufferStreamParams", 2))
         return false;
@@ -8127,32 +8127,31 @@ SetContextOptions(JSContext* cx, const O
 {
     enableBaseline = !op.getBoolOption("no-baseline");
     enableIon = !op.getBoolOption("no-ion");
     enableAsmJS = !op.getBoolOption("no-asmjs");
     enableWasm = !op.getBoolOption("no-wasm");
     enableNativeRegExp = !op.getBoolOption("no-native-regexp");
     enableWasmBaseline = !op.getBoolOption("no-wasm-baseline");
     enableWasmIon = !op.getBoolOption("no-wasm-ion");
+    enableTestWasmAwaitTier2 = op.getBoolOption("test-wasm-await-tier2");
     enableAsyncStacks = !op.getBoolOption("no-async-stacks");
     enableStreams = op.getBoolOption("enable-streams");
 
     JS::ContextOptionsRef(cx).setBaseline(enableBaseline)
                              .setIon(enableIon)
                              .setAsmJS(enableAsmJS)
                              .setWasm(enableWasm)
                              .setWasmBaseline(enableWasmBaseline)
                              .setWasmIon(enableWasmIon)
+                             .setTestWasmAwaitTier2(enableTestWasmAwaitTier2)
                              .setNativeRegExp(enableNativeRegExp)
                              .setAsyncStack(enableAsyncStacks)
                              .setStreams(enableStreams);
 
-    if (op.getBoolOption("wasm-check-bce"))
-        jit::JitOptions.wasmAlwaysCheckBounds = true;
-
     if (op.getBoolOption("wasm-test-mode"))
         jit::JitOptions.wasmTestMode = true;
 
     if (op.getBoolOption("no-unboxed-objects"))
         jit::JitOptions.disableUnboxedObjects = true;
 
     if (const char* str = op.getStringOption("cache-ir-stubs")) {
         if (strcmp(str, "on") == 0)
@@ -8422,16 +8421,17 @@ SetWorkerContextOptions(JSContext* cx)
 {
     // Copy option values from the main thread.
     JS::ContextOptionsRef(cx).setBaseline(enableBaseline)
                              .setIon(enableIon)
                              .setAsmJS(enableAsmJS)
                              .setWasm(enableWasm)
                              .setWasmBaseline(enableWasmBaseline)
                              .setWasmIon(enableWasmIon)
+                             .setTestWasmAwaitTier2(enableTestWasmAwaitTier2)
                              .setNativeRegExp(enableNativeRegExp)
                              .setStreams(enableStreams);
     cx->runtime()->setOffthreadIonCompilationEnabled(offthreadCompilation);
     cx->runtime()->profilingScripts = enableCodeCoverage || enableDisassemblyDumps;
 
 #ifdef JS_GC_ZEAL
     if (gZealBits && gZealFrequency) {
 #define ZEAL_MODE(_, value)                        \
@@ -8626,19 +8626,20 @@ main(int argc, char** argv, char** envp)
                             -1)
         || !op.addIntOption('\0', "thread-count", "COUNT", "Alias for --cpu-count.", -1)
         || !op.addBoolOption('\0', "ion", "Enable IonMonkey (default)")
         || !op.addBoolOption('\0', "no-ion", "Disable IonMonkey")
         || !op.addBoolOption('\0', "no-asmjs", "Disable asm.js compilation")
         || !op.addBoolOption('\0', "no-wasm", "Disable WebAssembly compilation")
         || !op.addBoolOption('\0', "no-wasm-baseline", "Disable wasm baseline compiler")
         || !op.addBoolOption('\0', "no-wasm-ion", "Disable wasm ion compiler")
+        || !op.addBoolOption('\0', "test-wasm-await-tier2", "Forcibly activate tiering and block "
+                                   "instantiation on completion of tier2")
         || !op.addBoolOption('\0', "no-native-regexp", "Disable native regexp compilation")
         || !op.addBoolOption('\0', "no-unboxed-objects", "Disable creating unboxed plain objects")
-        || !op.addBoolOption('\0', "wasm-check-bce", "Always generate wasm bounds check, even redundant ones.")
         || !op.addBoolOption('\0', "wasm-test-mode", "Enable wasm testing mode, creating synthetic "
                                    "objects for non-canonical NaNs and i64 returned from wasm.")
         || !op.addBoolOption('\0', "enable-streams", "Enable WHATWG Streams")
 #ifdef ENABLE_SHARED_ARRAY_BUFFER
         || !op.addStringOption('\0', "shared-memory", "on/off",
                                "SharedArrayBuffer and Atomics "
 #  if SHARED_MEMORY_DEFAULT
                                "(default: on, off to disable)"
--- a/js/src/tests/lib/jittests.py
+++ b/js/src/tests/lib/jittests.py
@@ -252,16 +252,19 @@ class JitTest:
                         if options.asmjs_enabled:
                             test.test_also.append(['--no-asmjs'])
                     elif name == 'test-also-no-wasm-baseline':
                         if options.wasm_enabled:
                             test.test_also.append(['--no-wasm-baseline'])
                     elif name == 'test-also-no-wasm-ion':
                         if options.wasm_enabled:
                             test.test_also.append(['--no-wasm-ion'])
+                    elif name == 'test-also-wasm-tiering':
+                        if options.wasm_enabled:
+                            test.test_also.append(['--test-wasm-await-tier2'])
                     elif name == 'test-also-wasm-check-bce':
                         if options.wasm_enabled:
                             test.test_also.append(['--wasm-check-bce'])
                     elif name.startswith('test-also='):
                         test.test_also.append([name[len('test-also='):]])
                     elif name.startswith('test-join='):
                         test.test_join.append([name[len('test-join='):]])
                     elif name == 'module':
--- a/js/src/threading/ConditionVariable.h
+++ b/js/src/threading/ConditionVariable.h
@@ -112,16 +112,16 @@ public:
     return wait_until(lock, mozilla::TimeStamp::Now() + rel_time,
                       mozilla::Move(pred));
   }
 
 
 private:
   ConditionVariable(const ConditionVariable&) = delete;
   ConditionVariable& operator=(const ConditionVariable&) = delete;
-  template <class T> friend class ExclusiveData;
+  template <class T> friend class ExclusiveWaitableData;
 
   mozilla::detail::ConditionVariableImpl impl_;
 };
 
 } // namespace js
 
 #endif // threading_ConditionVariable_h
--- a/js/src/threading/ExclusiveData.h
+++ b/js/src/threading/ExclusiveData.h
@@ -77,16 +77,17 @@ namespace js {
  *      `ExclusiveData<T>::Guard` somewhere such that the reference outlives the
  *      guard's lifetime and therefore becomes invalid. To help avoid this last
  *      foot-gun, prefer using the guard directly! Do not store raw references
  *      to the protected value in other structures!
  */
 template <typename T>
 class ExclusiveData
 {
+  protected:
     mutable Mutex lock_;
     mutable mozilla::AlignedStorage2<T> value_;
 
     ExclusiveData(const ExclusiveData&) = delete;
     ExclusiveData& operator=(const ExclusiveData&) = delete;
 
     void acquire() const { lock_.lock(); }
     void release() const { lock_.unlock(); }
@@ -114,18 +115,18 @@ class ExclusiveData
     }
 
     ~ExclusiveData() {
         acquire();
         value_.addr()->~T();
         release();
     }
 
-    ExclusiveData(ExclusiveData&& rhs) :
-      lock_(mozilla::Move(rhs.lock))
+    ExclusiveData(ExclusiveData&& rhs)
+      : lock_(mozilla::Move(rhs.lock))
     {
         MOZ_ASSERT(&rhs != this, "self-move disallowed!");
         new (mozilla::KnownNotNull, value_.addr()) T(mozilla::Move(*rhs.value_.addr()));
     }
 
     ExclusiveData& operator=(ExclusiveData&& rhs) {
         this->~ExclusiveData();
         new (mozilla::KnownNotNull, this) ExclusiveData(mozilla::Move(rhs));
@@ -175,29 +176,81 @@ class ExclusiveData
         operator T& () const { return get(); }
         T* operator->() const { return &get(); }
 
         const ExclusiveData<T>* parent() const {
             MOZ_ASSERT(parent_);
             return parent_;
         }
 
-        void wait(ConditionVariable& cond) {
-            cond.impl_.wait(parent_->lock_);
-        }
-
         ~Guard() {
             if (parent_)
                 parent_->release();
         }
     };
 
     /**
      * Access the protected inner `T` value for exclusive reading and writing.
      */
     Guard lock() const {
         return Guard(*this);
     }
 };
 
+template <class T>
+class ExclusiveWaitableData : public ExclusiveData<T>
+{
+    typedef ExclusiveData<T> Base;
+
+    mutable ConditionVariable condVar_;
+
+  public:
+    template <typename U>
+    explicit ExclusiveWaitableData(const MutexId& id, U&& u)
+      : Base(id, mozilla::Forward<U>(u))
+    {}
+
+    template <typename... Args>
+    explicit ExclusiveWaitableData(const MutexId& id, Args&&... args)
+      : Base(id, mozilla::Forward<Args>(args)...)
+    {}
+
+    class MOZ_STACK_CLASS Guard : public ExclusiveData<T>::Guard
+    {
+        typedef typename ExclusiveData<T>::Guard Base;
+
+      public:
+        explicit Guard(const ExclusiveWaitableData& parent)
+          : Base(parent)
+        {}
+
+        Guard(Guard&& guard)
+          : Base(mozilla::Move(guard))
+        {}
+
+        Guard& operator=(Guard&& rhs) {
+            return Base::operator=(mozilla::Move(rhs));
+        }
+
+        void wait() {
+            auto* parent = static_cast<const ExclusiveWaitableData*>(this->parent());
+            parent->condVar_.impl_.wait(parent->lock_);
+        }
+
+        void notify_one() {
+            auto* parent = static_cast<const ExclusiveWaitableData*>(this->parent());
+            parent->condVar_.notify_one();
+        }
+
+        void notify_all() {
+            auto* parent = static_cast<const ExclusiveWaitableData*>(this->parent());
+            parent->condVar_.notify_all();
+        }
+    };
+
+    Guard lock() const {
+        return Guard(*this);
+    }
+};
+
 } // namespace js
 
 #endif // threading_ExclusiveData_h
--- a/js/src/wasm/WasmBaselineCompile.cpp
+++ b/js/src/wasm/WasmBaselineCompile.cpp
@@ -7647,17 +7647,17 @@ js::wasm::BaselineCanCompile()
 #endif
 }
 
 bool
 js::wasm::BaselineCompileFunctions(const ModuleEnvironment& env, LifoAlloc& lifo,
                                    const FuncCompileInputVector& inputs, CompiledCode* code,
                                    UniqueChars* error)
 {
-    MOZ_ASSERT(env.tier() == Tier::Baseline);
+    MOZ_ASSERT(env.tier == Tier::Baseline);
     MOZ_ASSERT(env.kind == ModuleKind::Wasm);
 
     // The MacroAssembler will sometimes access the jitContext.
 
     TempAllocator alloc(&lifo);
     JitContext jitContext(&alloc);
     MOZ_ASSERT(IsCompilingWasm());
     MacroAssembler masm(MacroAssembler::WasmToken(), alloc);
@@ -7675,17 +7675,17 @@ js::wasm::BaselineCompileFunctions(const
         ValTypeVector locals;
         if (!locals.appendAll(env.funcSigs[func.index]->args()))
             return false;
         if (!DecodeLocalEntries(d, env.kind, &locals))
             return false;
 
         // One-pass baseline compilation.
 
-        BaseCompiler f(env, d, func, locals, env.debugEnabled(), &alloc, &masm, env.mode());
+        BaseCompiler f(env, d, func, locals, env.debugEnabled(), &alloc, &masm, env.mode);
         if (!f.init())
             return false;
 
         if (!f.emitFunction())
             return false;
 
         if (!code->codeRanges.emplaceBack(func.index, func.lineOrBytecode, f.finish()))
             return false;
--- a/js/src/wasm/WasmCompile.cpp
+++ b/js/src/wasm/WasmCompile.cpp
@@ -78,19 +78,18 @@ DecodeCodeSection(Decoder& d, ModuleGene
 
     return mg.finishFuncDefs();
 }
 
 bool
 CompileArgs::initFromContext(JSContext* cx, ScriptedCaller&& scriptedCaller)
 {
     baselineEnabled = cx->options().wasmBaseline();
-
-    // For sanity's sake, just use Ion if both compilers are disabled.
-    ionEnabled = cx->options().wasmIon() || !cx->options().wasmBaseline();
+    ionEnabled = cx->options().wasmIon();
+    testTiering = cx->options().testWasmAwaitTier2();
 
     // Debug information such as source view or debug traps will require
     // additional memory and permanently stay in baseline code, so we try to
     // only enable it when a developer actually cares: when the debugger tab
     // is open.
     debugEnabled = cx->compartment()->debuggerObservesAsmJS();
 
     this->scriptedCaller = Move(scriptedCaller);
@@ -304,17 +303,17 @@ EffectiveCores(SystemClass cls, uint32_t
 // Don't tier if tiering will fill code memory to more to more than this
 // fraction.
 
 static const double spaceCutoffPct = 0.9;
 #endif
 
 // Figure out whether we should use tiered compilation or not.
 static bool
-GetTieringEnabled(uint32_t codeSize)
+TieringBeneficial(uint32_t codeSize)
 {
     if (!CanUseExtraThreads())
         return false;
 
     uint32_t cpuCount = HelperThreadState().cpuCount;
     MOZ_ASSERT(cpuCount > 0);
 
     // It's mostly sensible not to background compile when there's only one
@@ -374,46 +373,58 @@ GetTieringEnabled(uint32_t codeSize)
 
     if ((MaxCodeBytesPerProcess - availMemory) + needMemory > cutoff)
         return false;
 #endif
 
     return true;
 }
 
+static void
+InitialCompileFlags(const CompileArgs& args, Decoder& d, CompileMode* mode, Tier* tier,
+                    DebugEnabled* debug)
+{
+    uint32_t codeSectionSize = 0;
+
+    SectionRange range;
+    if (StartsCodeSection(d.begin(), d.end(), &range))
+        codeSectionSize = range.size;
+
+    bool baselineEnabled = BaselineCanCompile() && (args.baselineEnabled || args.testTiering);
+    bool debugEnabled = BaselineCanCompile() && args.debugEnabled;
+    bool ionEnabled = args.ionEnabled || !baselineEnabled || args.testTiering;
+
+    if (baselineEnabled && ionEnabled && !debugEnabled &&
+        (TieringBeneficial(codeSectionSize) || args.testTiering))
+    {
+        *mode = CompileMode::Tier1;
+        *tier = Tier::Baseline;
+    } else {
+        *mode = CompileMode::Once;
+        *tier = debugEnabled || !ionEnabled ? Tier::Baseline : Tier::Ion;
+    }
+
+    *debug = debugEnabled ? DebugEnabled::True : DebugEnabled::False;
+}
+
 SharedModule
 wasm::CompileInitialTier(const ShareableBytes& bytecode, const CompileArgs& args, UniqueChars* error)
 {
     MOZ_RELEASE_ASSERT(wasm::HaveSignalHandlers());
 
-    bool baselineEnabled = BaselineCanCompile() && args.baselineEnabled;
-    bool debugEnabled = BaselineCanCompile() && args.debugEnabled;
-    bool ionEnabled = args.ionEnabled || !baselineEnabled;
-
-    DebugEnabled debug = debugEnabled ? DebugEnabled::True : DebugEnabled::False;
-
-    ModuleEnvironment env(ModuleEnvironment::UnknownMode, ModuleEnvironment::UnknownTier, debug);
-
     Decoder d(bytecode.bytes, error);
-    if (!DecodeModuleEnvironment(d, &env))
-        return nullptr;
-
-    uint32_t codeSize = env.codeSection ? env.codeSection->size : 0;
 
     CompileMode mode;
     Tier tier;
-    if (baselineEnabled && ionEnabled && !debugEnabled && GetTieringEnabled(codeSize)) {
-        mode = CompileMode::Tier1;
-        tier = Tier::Baseline;
-    } else {
-        mode = CompileMode::Once;
-        tier = debugEnabled || !ionEnabled ? Tier::Baseline : Tier::Ion;
-    }
+    DebugEnabled debug;
+    InitialCompileFlags(args, d, &mode, &tier, &debug);
 
-    env.setModeAndTier(mode, tier);
+    ModuleEnvironment env(mode, tier, debug);
+    if (!DecodeModuleEnvironment(d, &env))
+        return nullptr;
 
     ModuleGenerator mg(args, &env, nullptr, error);
     if (!mg.init())
         return nullptr;
 
     if (!DecodeCodeSection(d, mg, &env))
         return nullptr;
 
--- a/js/src/wasm/WasmCompile.h
+++ b/js/src/wasm/WasmCompile.h
@@ -37,23 +37,25 @@ struct ScriptedCaller
 
 struct CompileArgs : ShareableBase<CompileArgs>
 {
     Assumptions assumptions;
     ScriptedCaller scriptedCaller;
     bool baselineEnabled;
     bool debugEnabled;
     bool ionEnabled;
+    bool testTiering;
 
     CompileArgs(Assumptions&& assumptions, ScriptedCaller&& scriptedCaller)
       : assumptions(Move(assumptions)),
         scriptedCaller(Move(scriptedCaller)),
         baselineEnabled(false),
         debugEnabled(false),
-        ionEnabled(false)
+        ionEnabled(false),
+        testTiering(false)
     {}
 
     // If CompileArgs is constructed without arguments, initFromContext() must
     // be called to complete initialization.
     CompileArgs() = default;
     bool initFromContext(JSContext* cx, ScriptedCaller&& scriptedCaller);
 };
 
--- a/js/src/wasm/WasmGenerator.cpp
+++ b/js/src/wasm/WasmGenerator.cpp
@@ -116,17 +116,17 @@ ModuleGenerator::~ModuleGenerator()
 
                     MOZ_ASSERT(outstanding_ >= taskState->numFailed);
                     outstanding_ -= taskState->numFailed;
                     taskState->numFailed = 0;
 
                     if (!outstanding_)
                         break;
 
-                    taskState.wait(taskState->failedOrFinished);
+                    taskState.wait(/* failed or finished */);
                 }
             }
         }
     } else {
         MOZ_ASSERT(!outstanding_);
     }
 
     // Propagate error state.
@@ -612,17 +612,17 @@ ModuleGenerator::linkCompiledCode(const 
 }
 
 static bool
 ExecuteCompileTask(CompileTask* task, UniqueChars* error)
 {
     MOZ_ASSERT(task->lifo.isEmpty());
     MOZ_ASSERT(task->output.empty());
 
-    switch (task->env.tier()) {
+    switch (task->env.tier) {
       case Tier::Ion:
         if (!IonCompileFunctions(task->env, task->lifo, task->inputs, &task->output, error))
             return false;
         break;
       case Tier::Baseline:
         if (!BaselineCompileFunctions(task->env, task->lifo, task->inputs, &task->output, error))
             return false;
         break;
@@ -646,17 +646,17 @@ wasm::ExecuteCompileTaskFromHelperThread
     auto taskState = task->state.lock();
 
     if (!ok || !taskState->finished.append(task)) {
         taskState->numFailed++;
         if (!taskState->errorMessage)
             taskState->errorMessage = Move(error);
     }
 
-    taskState->failedOrFinished.notify_one();
+    taskState.notify_one(/* failed or finished */);
 }
 
 bool
 ModuleGenerator::finishTask(CompileTask* task)
 {
     masm_.haltingAlign(CodeAlignment);
 
     // Before merging in the new function's code, if calls in a prior code range
@@ -718,17 +718,17 @@ ModuleGenerator::finishOutstandingTask()
                 return false;
 
             if (!taskState->finished.empty()) {
                 outstanding_--;
                 task = taskState->finished.popCopy();
                 break;
             }
 
-            taskState.wait(taskState->failedOrFinished);
+            taskState.wait(/* failed or finished */);
         }
     }
 
     // Call outside of the compilation lock.
     return finishTask(task);
 }
 
 bool
--- a/js/src/wasm/WasmGenerator.h
+++ b/js/src/wasm/WasmGenerator.h
@@ -103,26 +103,25 @@ struct CompiledCode
 
 // The CompileTaskState of a ModuleGenerator contains the mutable state shared
 // between helper threads executing CompileTasks. Each CompileTask started on a
 // helper thread eventually either ends up in the 'finished' list or increments
 // 'numFailed'.
 
 struct CompileTaskState
 {
-    ConditionVariable    failedOrFinished;
     CompileTaskPtrVector finished;
     uint32_t             numFailed;
     UniqueChars          errorMessage;
 
     CompileTaskState() : numFailed(0) {}
     ~CompileTaskState() { MOZ_ASSERT(finished.empty()); MOZ_ASSERT(!numFailed); }
 };
 
-typedef ExclusiveData<CompileTaskState> ExclusiveCompileTaskState;
+typedef ExclusiveWaitableData<CompileTaskState> ExclusiveCompileTaskState;
 
 // A CompileTask holds a batch of input functions that are to be compiled on a
 // helper thread as well as, eventually, the results of compilation.
 
 struct CompileTask
 {
     const ModuleEnvironment&   env;
     ExclusiveCompileTaskState& state;
@@ -200,18 +199,18 @@ class MOZ_STACK_CLASS ModuleGenerator
     bool launchBatchCompile();
     bool finishOutstandingTask();
     bool finishCode();
     bool finishMetadata(const ShareableBytes& bytecode);
     UniqueCodeSegment finish(const ShareableBytes& bytecode);
     UniqueJumpTable createJumpTable(const CodeSegment& codeSegment);
 
     bool isAsmJS() const { return env_->isAsmJS(); }
-    Tier tier() const { return env_->tier(); }
-    CompileMode mode() const { return env_->mode(); }
+    Tier tier() const { return env_->tier; }
+    CompileMode mode() const { return env_->mode; }
     bool debugEnabled() const { return env_->debugEnabled(); }
 
   public:
     ModuleGenerator(const CompileArgs& args, ModuleEnvironment* env,
                     Atomic<bool>* cancelled, UniqueChars* error);
     ~ModuleGenerator();
     MOZ_MUST_USE bool init(Metadata* maybeAsmJSMetadata = nullptr);
 
--- a/js/src/wasm/WasmIonCompile.cpp
+++ b/js/src/wasm/WasmIonCompile.cpp
@@ -3858,17 +3858,17 @@ EmitBodyExprs(FunctionCompiler& f)
 #undef CHECK_ASMJS
 }
 
 bool
 wasm::IonCompileFunctions(const ModuleEnvironment& env, LifoAlloc& lifo,
                           const FuncCompileInputVector& inputs, CompiledCode* code,
                           UniqueChars* error)
 {
-    MOZ_ASSERT(env.tier() == Tier::Ion);
+    MOZ_ASSERT(env.tier == Tier::Ion);
 
     TempAllocator alloc(&lifo);
     JitContext jitContext(&alloc);
     MOZ_ASSERT(IsCompilingWasm());
     MacroAssembler masm(MacroAssembler::WasmToken(), alloc);
 
     // Swap in already-allocated empty vectors to avoid malloc/free.
     MOZ_ASSERT(code->empty());
--- a/js/src/wasm/WasmModule.cpp
+++ b/js/src/wasm/WasmModule.cpp
@@ -236,19 +236,19 @@ class Module::Tier2GeneratorTaskImpl : p
 };
 
 void
 Module::startTier2(const CompileArgs& args)
 {
     MOZ_ASSERT(!tiering_.lock()->active);
 
     // If a Module initiates tier-2 compilation, we must ensure that eventually
-    // unblockOnTier2GeneratorFinished() is called. Since we must ensure
+    // notifyCompilationListeners() is called. Since we must ensure
     // Tier2GeneratorTaskImpl objects are destroyed *anyway*, we use
-    // ~Tier2GeneratorTaskImpl() to call unblockOnTier2GeneratorFinished() if it
+    // ~Tier2GeneratorTaskImpl() to call notifyCompilationListeners() if it
     // hasn't been already.
 
     UniqueTier2GeneratorTask task(js_new<Tier2GeneratorTaskImpl>(*this, args));
     if (!task)
         return;
 
     tiering_.lock()->active = true;
 
@@ -264,16 +264,18 @@ Module::notifyCompilationListeners()
     Tiering::ListenerVector listeners;
     {
         auto tiering = tiering_.lock();
 
         MOZ_ASSERT(tiering->active);
         tiering->active = false;
 
         Swap(listeners, tiering->listeners);
+
+        tiering.notify_all(/* inactive */);
     }
 
     for (RefPtr<JS::WasmModuleListener>& listener : listeners)
         listener->onCompilationComplete();
 }
 
 void
 Module::finishTier2(UniqueLinkDataTier linkData2, UniqueMetadataTier metadata2,
@@ -305,16 +307,24 @@ Module::finishTier2(UniqueLinkDataTier l
         // This is a racy write that we just want to be visible, atomically,
         // eventually.  All hardware we care about will do this right.  But
         // we depend on the compiler not splitting the store.
 
         jumpTable[cr.funcIndex()] = base + cr.funcTierEntry();
     }
 }
 
+void
+Module::blockOnTier2Complete() const
+{
+    auto tiering = tiering_.lock();
+    while (tiering->active)
+        tiering.wait(/* inactive */);
+}
+
 /* virtual */ size_t
 Module::bytecodeSerializedSize() const
 {
     return bytecode_->bytes.length();
 }
 
 /* virtual */ void
 Module::bytecodeSerialize(uint8_t* bytecodeBegin, size_t bytecodeSize) const
@@ -613,19 +623,18 @@ Module::addSizeOfMisc(MallocSizeOf mallo
 bool
 Module::extractCode(JSContext* cx, Tier tier, MutableHandleValue vp) const
 {
     RootedPlainObject result(cx, NewBuiltinClassInstance<PlainObject>(cx));
     if (!result)
         return false;
 
     // This function is only used for testing purposes so we can simply
-    // busy-wait on tiered compilation to complete.
-    while (!compilationComplete())
-        std::this_thread::sleep_for(std::chrono::milliseconds(1));
+    // block on tiered compilation to complete.
+    blockOnTier2Complete();
 
     if (!code_->hasTier(tier)) {
         vp.setNull();
         return true;
     }
 
     const CodeSegment& codeSegment = code_->segment(tier);
     RootedObject code(cx, JS_NewUint8Array(cx, codeSegment.length()));
@@ -1212,10 +1221,13 @@ Module::instantiate(JSContext* cx,
     }
 
     uint32_t mode = uint32_t(metadata().isAsmJS() ? Telemetry::ASMJS : Telemetry::WASM);
     cx->runtime()->addTelemetry(JS_TELEMETRY_AOT_USAGE, mode);
 
     JSUseCounter useCounter = metadata().isAsmJS() ? JSUseCounter::ASMJS : JSUseCounter::WASM;
     cx->runtime()->setUseCounter(instance, useCounter);
 
+    if (cx->options().testWasmAwaitTier2())
+        blockOnTier2Complete();
+
     return true;
 }
--- a/js/src/wasm/WasmModule.h
+++ b/js/src/wasm/WasmModule.h
@@ -111,16 +111,18 @@ struct Tiering
 
     Tiering() : active(false) {}
     ~Tiering() { MOZ_ASSERT(listeners.empty()); MOZ_ASSERT(!active); }
 
     ListenerVector listeners;
     bool active;
 };
 
+typedef ExclusiveWaitableData<Tiering> ExclusiveTiering;
+
 // Module represents a compiled wasm module and primarily provides two
 // operations: instantiation and serialization. A Module can be instantiated any
 // number of times to produce new Instance objects. A Module can be serialized
 // any number of times such that the serialized bytes can be deserialized later
 // to produce a new, equivalent Module.
 //
 // Fully linked-and-instantiated code (represented by Code and its owned
 // CodeSegment) can be shared between instances, provided none of those
@@ -135,17 +137,17 @@ class Module : public JS::WasmModule
     const SharedCode        code_;
     const UniqueConstBytes  unlinkedCodeForDebugging_;
     const LinkData          linkData_;
     const ImportVector      imports_;
     const ExportVector      exports_;
     const DataSegmentVector dataSegments_;
     const ElemSegmentVector elemSegments_;
     const SharedBytes       bytecode_;
-    ExclusiveData<Tiering>  tiering_;
+    ExclusiveTiering        tiering_;
 
     // `codeIsBusy_` is set to false initially and then to true when `code_` is
     // already being used for an instance and can't be shared because it may be
     // patched by the debugger. Subsequent instances must then create copies
     // by linking the `unlinkedCodeForDebugging_`.
 
     mutable Atomic<bool>    codeIsBusy_;
 
@@ -214,30 +216,17 @@ class Module : public JS::WasmModule
     // most once, ideally before any client can attempt to serialize the Module.
     // When tier-2 compilation completes, ModuleGenerator calls finishTier2()
     // from a helper thread, passing tier-variant data which will be installed
     // and made visible.
 
     void startTier2(const CompileArgs& args);
     void finishTier2(UniqueLinkDataTier linkData2, UniqueMetadataTier metadata2,
                      UniqueCodeSegment code2, ModuleEnvironment* env2);
-
-    // Wait until Ion-compiled code is available, which will be true either
-    // immediately (first-level compile was Ion and is already done), not at all
-    // (first-level compile was Baseline and there's not a second level), or
-    // later (ongoing second-level compilation).  Once this returns, one can use
-    // code().hasTier() to check code availability - there is no guarantee that
-    // Ion code will be available, but if it isn't then it never will.
-
-    void blockOnIonCompileFinished() const;
-
-    // Signal all waiters that are waiting on tier-2 compilation to be done that
-    // they should wake up.  They will be waiting in blockOnIonCompileFinished.
-
-    void unblockOnTier2GeneratorFinished(CompileMode newMode) const;
+    void blockOnTier2Complete() const;
 
     // JS API and JS::WasmModule implementation:
 
     size_t bytecodeSerializedSize() const override;
     void bytecodeSerialize(uint8_t* bytecodeBegin, size_t bytecodeSize) const override;
     bool compilationComplete() const override;
     bool notifyWhenCompilationComplete(JS::WasmModuleListener* listener) override;
     size_t compiledSerializedSize() const override;
--- a/js/src/wasm/WasmValidate.cpp
+++ b/js/src/wasm/WasmValidate.cpp
@@ -54,16 +54,31 @@ Decoder::fail(size_t errorOffset, const 
     if (!strWithOffset)
         return false;
 
     *error_ = Move(strWithOffset);
     return false;
 }
 
 bool
+Decoder::readSectionHeader(uint8_t* id, SectionRange* range)
+{
+    if (!readFixedU8(id))
+        return false;
+
+    uint32_t size;
+    if (!readVarU32(&size))
+        return false;
+
+    range->start = cur_ - beg_;
+    range->size = size;
+    return true;
+}
+
+bool
 Decoder::startSection(SectionId id, ModuleEnvironment* env, MaybeSectionRange* range,
                       const char* sectionName)
 {
     MOZ_ASSERT(!*range);
 
     // Record state at beginning of section to allow rewinding to this point
     // if, after skipping through several custom sections, we don't find the
     // section 'id'.
@@ -82,19 +97,18 @@ Decoder::startSection(SectionId id, Modu
 
     while (idValue != uint8_t(id)) {
         if (idValue != uint8_t(SectionId::Custom))
             goto rewind;
 
         // Rewind to the beginning of the current section since this is what
         // skipCustomSection() assumes.
         cur_ = currentSectionStart;
-        if (!skipCustomSection(env)) {
+        if (!skipCustomSection(env))
             return false;
-        }
 
         // Having successfully skipped a custom section, consider the next
         // section.
         currentSectionStart = cur_;
         if (!readFixedU8(&idValue))
             goto rewind;
     }
 
@@ -1442,16 +1456,43 @@ DecodeElemSection(Decoder& d, ModuleEnvi
 
         env->tables[env->elemSegments.back().tableIndex].external = true;
     }
 
     return d.finishSection(*range, "elem");
 }
 
 bool
+wasm::StartsCodeSection(const uint8_t* begin, const uint8_t* end, SectionRange* codeSection)
+{
+    UniqueChars unused;
+    Decoder d(begin, end, 0, &unused);
+
+    if (!DecodePreamble(d))
+        return false;
+
+    while (!d.done()) {
+        uint8_t id;
+        SectionRange range;
+        if (!d.readSectionHeader(&id, &range))
+            return false;
+
+        if (id == uint8_t(SectionId::Code)) {
+            *codeSection = range;
+            return true;
+        }
+
+        if (!d.readBytes(range.size))
+            return false;
+    }
+
+    return false;
+}
+
+bool
 wasm::DecodeModuleEnvironment(Decoder& d, ModuleEnvironment* env)
 {
     if (!DecodePreamble(d))
         return false;
 
     if (!DecodeTypeSection(d, env))
         return false;
 
--- a/js/src/wasm/WasmValidate.h
+++ b/js/src/wasm/WasmValidate.h
@@ -44,21 +44,18 @@ typedef Maybe<SectionRange> MaybeSection
 // are given a read-only view of the ModuleEnvironment, thus preventing race
 // conditions.
 
 struct ModuleEnvironment
 {
     // Constant parameters for the entire compilation:
     const DebugEnabled        debug;
     const ModuleKind          kind;
-
-    // Constant parameters determined no later than at the start of the code
-    // section:
-    CompileMode               mode_;
-    Tier                      tier_;
+    const CompileMode         mode;
+    const Tier                tier;
 
     // Module fields decoded from the module environment (or initialized while
     // validating an asm.js module) and immutable during compilation:
     MemoryUsage               memoryUsage;
     uint32_t                  minMemoryLength;
     Maybe<uint32_t>           maxMemoryLength;
     SigWithIdVector           sigs;
     SigWithIdPtrVector        funcSigs;
@@ -72,45 +69,28 @@ struct ModuleEnvironment
     MaybeSectionRange         codeSection;
 
     // Fields decoded as part of the wasm module tail:
     ElemSegmentVector         elemSegments;
     DataSegmentVector         dataSegments;
     NameInBytecodeVector      funcNames;
     CustomSectionVector       customSections;
 
-    static const CompileMode UnknownMode = (CompileMode)-1;
-    static const Tier        UnknownTier = (Tier)-1;
-
     explicit ModuleEnvironment(CompileMode mode = CompileMode::Once,
                                Tier tier = Tier::Ion,
                                DebugEnabled debug = DebugEnabled::False,
                                ModuleKind kind = ModuleKind::Wasm)
       : debug(debug),
         kind(kind),
-        mode_(mode),
-        tier_(tier),
+        mode(mode),
+        tier(tier),
         memoryUsage(MemoryUsage::None),
         minMemoryLength(0)
     {}
 
-    CompileMode mode() const {
-        MOZ_ASSERT(mode_ != UnknownMode);
-        return mode_;
-    }
-    Tier tier() const {
-        MOZ_ASSERT(tier_ != UnknownTier);
-        return tier_;
-    }
-    void setModeAndTier(CompileMode mode, Tier tier) {
-        MOZ_ASSERT(mode_ == UnknownMode);
-        MOZ_ASSERT(tier_ == UnknownTier);
-        mode_ = mode;
-        tier_ = tier;
-    }
     size_t numTables() const {
         return tables.length();
     }
     size_t numSigs() const {
         return sigs.length();
     }
     size_t numFuncs() const {
         return funcSigs.length();
@@ -560,16 +540,18 @@ class Decoder
         if (bytesRemain() < numBytes)
             return false;
         cur_ += numBytes;
         return true;
     }
 
     // See "section" description in Encoder.
 
+    MOZ_MUST_USE bool readSectionHeader(uint8_t* id, SectionRange* range);
+
     MOZ_MUST_USE bool startSection(SectionId id,
                                    ModuleEnvironment* env,
                                    MaybeSectionRange* range,
                                    const char* sectionName);
     MOZ_MUST_USE bool finishSection(const SectionRange& range,
                                     const char* sectionName);
 
     // Custom sections do not cause validation errors unless the error is in
@@ -681,16 +663,26 @@ class Decoder
 // wasm and asm.js and decoded as part of both validation and compilation.
 
 MOZ_MUST_USE bool
 EncodeLocalEntries(Encoder& d, const ValTypeVector& locals);
 
 MOZ_MUST_USE bool
 DecodeLocalEntries(Decoder& d, ModuleKind kind, ValTypeVector* locals);
 
+// Returns whether the given [begin, end) prefix of a module's bytecode starts a
+// code section and, if so, returns the SectionRange of that code section.
+// Note that, even if this function returns 'false', [begin, end) may actually
+// be a valid module in the special case when there are no function defs and the
+// code section is not present. Such modules can be valid so the caller must
+// handle this special case.
+
+MOZ_MUST_USE bool
+StartsCodeSection(const uint8_t* begin, const uint8_t* end, SectionRange* range);
+
 // Calling DecodeModuleEnvironment decodes all sections up to the code section
 // and performs full validation of all those sections. The client must then
 // decode the code section itself, reusing ValidateFunctionBody if necessary,
 // and finally call DecodeModuleTail to decode all remaining sections after the
 // code section (again, performing full validation).
 
 MOZ_MUST_USE bool
 DecodeModuleEnvironment(Decoder& d, ModuleEnvironment* env);
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -2111,30 +2111,16 @@ nsLayoutUtils::IsFixedPosFrameInDisplayP
   nsIFrame* parent = aFrame->GetParent();
   if (!parent || parent->GetParent() ||
       aFrame->StyleDisplay()->mPosition != NS_STYLE_POSITION_FIXED) {
     return false;
   }
   return ViewportHasDisplayPort(aFrame->PresContext());
 }
 
-NS_DECLARE_FRAME_PROPERTY_SMALL_VALUE(ScrollbarThumbLayerized, bool)
-
-/* static */ void
-nsLayoutUtils::SetScrollbarThumbLayerization(nsIFrame* aThumbFrame, bool aLayerize)
-{
-  aThumbFrame->SetProperty(ScrollbarThumbLayerized(), aLayerize);
-}
-
-bool
-nsLayoutUtils::IsScrollbarThumbLayerized(nsIFrame* aThumbFrame)
-{
-  return aThumbFrame->GetProperty(ScrollbarThumbLayerized());
-}
-
 // static
 nsIScrollableFrame*
 nsLayoutUtils::GetNearestScrollableFrameForDirection(nsIFrame* aFrame,
                                                      Direction aDirection)
 {
   NS_ASSERTION(aFrame, "GetNearestScrollableFrameForDirection expects a non-null frame");
   for (nsIFrame* f = aFrame; f; f = nsLayoutUtils::GetCrossDocParentFrame(f)) {
     nsIScrollableFrame* scrollableFrame = do_QueryFrame(f);
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -595,28 +595,16 @@ public:
    * Return true if aFrame is a fixed-pos frame and is a child of a viewport
    * which has a displayport. These frames get special treatment from the compositor.
    * aDisplayPort, if non-null, is set to the display port rectangle (relative to
    * the viewport).
    */
   static bool IsFixedPosFrameInDisplayPort(const nsIFrame* aFrame);
 
   /**
-   * Store whether aThumbFrame wants its own layer. This sets a property on
-   * the frame.
-   */
-  static void SetScrollbarThumbLayerization(nsIFrame* aThumbFrame, bool aLayerize);
-
-  /**
-   * Returns whether aThumbFrame wants its own layer due to having called
-   * SetScrollbarThumbLayerization.
-   */
-  static bool IsScrollbarThumbLayerized(nsIFrame* aThumbFrame);
-
-  /**
     * GetScrollableFrameFor returns the scrollable frame for a scrolled frame
     */
   static nsIScrollableFrame* GetScrollableFrameFor(const nsIFrame *aScrolledFrame);
 
   /**
    * GetNearestScrollableFrameForDirection locates the first ancestor of
    * aFrame (or aFrame itself) that is scrollable with overflow:scroll or
    * overflow:auto in the given direction and where either the scrollbar for
--- a/layout/generic/TextDrawTarget.h
+++ b/layout/generic/TextDrawTarget.h
@@ -50,16 +50,17 @@ class TextDrawTarget : public DrawTarget
 public:
   explicit TextDrawTarget(wr::DisplayListBuilder& aBuilder,
                           const layers::StackingContextHelper& aSc,
                           layers::WebRenderLayerManager* aManager,
                           nsDisplayItem* aItem,
                           nsRect& aBounds)
     : mBuilder(aBuilder), mSc(aSc), mManager(aManager)
   {
+    SetPermitSubpixelAA(!aItem->IsSubpixelAADisabled());
 
     // Compute clip/bounds
     auto appUnitsPerDevPixel = aItem->Frame()->PresContext()->AppUnitsPerDevPixel();
     LayoutDeviceRect layoutBoundsRect = LayoutDeviceRect::FromAppUnits(
         aBounds, appUnitsPerDevPixel);
     LayoutDeviceRect layoutClipRect = layoutBoundsRect;
 
     auto clip = aItem->GetClip();
@@ -95,17 +96,17 @@ public:
   // This overload just stores the glyphs/font/color.
   void
   FillGlyphs(ScaledFont* aFont,
              const GlyphBuffer& aBuffer,
              const Pattern& aPattern,
              const DrawOptions& aOptions,
              const GlyphRenderingOptions* aRenderingOptions) override
   {
-    // FIXME(?): Deal with AA on the DrawOptions, and the GlyphRenderingOptions
+    // FIXME(?): Deal with GlyphRenderingOptions
 
     // Make sure we're only given boring color patterns
     MOZ_RELEASE_ASSERT(aOptions.mCompositionOp == CompositionOp::OP_OVER);
     MOZ_RELEASE_ASSERT(aOptions.mAlpha == 1.0f);
     MOZ_RELEASE_ASSERT(aPattern.GetType() == PatternType::COLOR);
     auto* colorPat = static_cast<const ColorPattern*>(&aPattern);
     auto color = wr::ToColorF(colorPat->mColor);
 
@@ -123,19 +124,22 @@ public:
     for (size_t i = 0; i < aBuffer.mNumGlyphs; i++) {
       wr::GlyphInstance& targetGlyph = glyphs[i];
       const gfx::Glyph& sourceGlyph = aBuffer.mGlyphs[i];
       targetGlyph.index = sourceGlyph.mIndex;
       targetGlyph.point = mSc.ToRelativeLayoutPoint(
           LayoutDevicePoint::FromUnknownPoint(sourceGlyph.mPosition));
     }
 
+    wr::GlyphOptions glyphOptions;
+    glyphOptions.render_mode = wr::ToFontRenderMode(aOptions.mAntialiasMode, GetPermitSubpixelAA());
+
     mManager->WrBridge()->PushGlyphs(mBuilder, glyphs, aFont,
                                      color, mSc, mBoundsRect, mClipRect,
-                                     mBackfaceVisible);
+                                     mBackfaceVisible, &glyphOptions);
   }
 
   void
   AppendShadow(const wr::Shadow& aShadow)
   {
     mBuilder.PushShadow(mBoundsRect, mClipRect, mBackfaceVisible, aShadow);
     mHasShadows = true;
   }
--- a/layout/generic/nsGfxScrollFrame.h
+++ b/layout/generic/nsGfxScrollFrame.h
@@ -885,16 +885,19 @@ public:
   }
   NS_IMETHOD PostScrolledAreaEventForCurrentArea() override {
     mHelper.PostScrolledAreaEvent();
     return NS_OK;
   }
   virtual bool IsScrollingActive(nsDisplayListBuilder* aBuilder) override {
     return mHelper.IsScrollingActive(aBuilder);
   }
+  virtual bool IsMaybeScrollingActive() const override {
+    return mHelper.IsMaybeScrollingActive();
+  }
   virtual bool IsProcessingAsyncScroll() override {
     return mHelper.IsProcessingAsyncScroll();
   }
   virtual void ResetScrollPositionForLayerPixelAlignment() override {
     mHelper.ResetScrollPositionForLayerPixelAlignment();
   }
   virtual bool DidHistoryRestore() const override {
     return mHelper.mDidHistoryRestore;
@@ -1319,16 +1322,19 @@ public:
   }
   NS_IMETHOD PostScrolledAreaEventForCurrentArea() override {
     mHelper.PostScrolledAreaEvent();
     return NS_OK;
   }
   virtual bool IsScrollingActive(nsDisplayListBuilder* aBuilder) override {
     return mHelper.IsScrollingActive(aBuilder);
   }
+  virtual bool IsMaybeScrollingActive() const override {
+    return mHelper.IsMaybeScrollingActive();
+  }
   virtual bool IsProcessingAsyncScroll() override {
     return mHelper.IsProcessingAsyncScroll();
   }
   virtual void ResetScrollPositionForLayerPixelAlignment() override {
     mHelper.ResetScrollPositionForLayerPixelAlignment();
   }
   virtual bool DidHistoryRestore() const override {
     return mHelper.mDidHistoryRestore;
--- a/layout/generic/nsIScrollableFrame.h
+++ b/layout/generic/nsIScrollableFrame.h
@@ -311,16 +311,21 @@ public:
 
   /**
    * Returns true if this scrollframe is being "actively scrolled".
    * This basically means that we should allocate resources in the
    * expectation that scrolling is going to happen.
    */
   virtual bool IsScrollingActive(nsDisplayListBuilder* aBuilder) = 0;
   /**
+   * Same as the above except doesn't take into account will-change budget,
+   * which means that it can be called during display list building.
+   */
+  virtual bool IsMaybeScrollingActive() const = 0;
+  /**
    * Returns true if the scrollframe is currently processing an async
    * or smooth scroll.
    */
   virtual bool IsProcessingAsyncScroll() = 0;
   /**
    * Call this when the layer(s) induced by active scrolling are being
    * completely redrawn.
    */
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -5133,17 +5133,16 @@ nsDisplayText::CreateWebRenderCommands(m
 
   if (mBounds.IsEmpty()) {
     return true;
   }
 
   RefPtr<TextDrawTarget> textDrawer = new TextDrawTarget(aBuilder, aSc, aManager, this, mBounds);
   RefPtr<gfxContext> captureCtx = gfxContext::CreateOrNull(textDrawer);
 
-  // TODO: Paint() checks mDisableSubpixelAA, we should too.
   RenderToContext(captureCtx, aDisplayListBuilder, true);
 
   return !textDrawer->HasUnsupportedFeatures();
 }
 
 void
 nsDisplayText::RenderToContext(gfxContext* aCtx, nsDisplayListBuilder* aBuilder, bool aIsRecording)
 {
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -80,16 +80,17 @@
 #include "nsISelection.h"
 #include "nsDOMTokenList.h"
 #include "mozilla/RuleNodeCacheConditions.h"
 #include "nsCSSProps.h"
 #include "nsPluginFrame.h"
 #include "nsSVGMaskFrame.h"
 #include "nsTableCellFrame.h"
 #include "nsTableColFrame.h"
+#include "nsSliderFrame.h"
 #include "ClientLayerManager.h"
 #include "mozilla/layers/StackingContextHelper.h"
 #include "mozilla/layers/WebRenderBridgeChild.h"
 #include "mozilla/layers/WebRenderLayerManager.h"
 #include "mozilla/layers/WebRenderMessages.h"
 #include "mozilla/layers/WebRenderScrollData.h"
 
 // GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
@@ -1574,17 +1575,22 @@ nsDisplayListBuilder::IsAnimatedGeometry
 
   bool maybe = false; // Possible to transition from not being an AGR
                       // to being an AGR without a style change.
 
   LayoutFrameType parentType = parent->Type();
   // Treat the slider thumb as being as an active scrolled root when it wants
   // its own layer so that it can move without repainting.
   if (parentType == LayoutFrameType::Slider) {
-    if (nsLayoutUtils::IsScrollbarThumbLayerized(aFrame)) {
+    nsIScrollableFrame* sf = static_cast<nsSliderFrame*>(parent)->GetScrollFrame();
+    // The word "Maybe" in IsMaybeScrollingActive might be confusing but we do
+    // indeed need to always consider scroll thumbs as AGRs if
+    // IsMaybeScrollingActive is true because that is the same condition we use
+    // in ScrollFrameHelper::AppendScrollPartsTo to layerize scroll thumbs.
+    if (sf && sf->IsMaybeScrollingActive()) {
       return AGR_YES;
     }
     maybe = true;
   }
 
   if (aFrame->StyleDisplay()->mPosition == NS_STYLE_POSITION_STICKY) {
     if (IsStickyFrameActive(this, aFrame, parent)) {
       return AGR_YES;
--- a/layout/painting/nsDisplayList.h
+++ b/layout/painting/nsDisplayList.h
@@ -2276,16 +2276,18 @@ public:
   /**
    * Disable usage of component alpha. Currently only relevant for items that have text.
    */
   void DisableComponentAlpha()
   {
     mDisableSubpixelAA = true;
   }
 
+  bool IsSubpixelAADisabled() const { return mDisableSubpixelAA; }
+
   /**
    * Check if we can add async animations to the layer for this display item.
    */
   virtual bool CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder) {
     return false;
   }
 
   virtual bool SupportsOptimizingToImage() const { return false; }
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -1552,25 +1552,28 @@ nsTableFrame::DisplayGenericTablePart(ns
     // Collecting column index.
     AutoTArray<uint32_t, 1> colIdx;
     for (nsTableColFrame* col = colGroup->GetFirstColumn(); col; col = col->GetNextCol()) {
       MOZ_ASSERT(colIdx.IsEmpty() ||
                  static_cast<uint32_t>(col->GetColIndex()) > colIdx.LastElement());
       colIdx.AppendElement(col->GetColIndex());
     }
 
-    nsTableFrame* table = colGroup->GetTableFrame();
-    RowGroupArray rowGroups;
-    table->OrderRowGroups(rowGroups);
-    for (nsTableRowGroupFrame* rowGroup : rowGroups) {
-      auto offset = rowGroup->GetNormalPosition() - colGroup->GetNormalPosition();
-      if (!aBuilder->GetDirtyRect().Intersects(nsRect(offset, rowGroup->GetSize()))) {
-        continue;
-      }
-      PaintRowGroupBackgroundByColIdx(rowGroup, aFrame, aBuilder, aLists, colIdx, offset);
+    if (!colIdx.IsEmpty()) {
+      // We have some actual cells that live inside this rowgroup.
+      nsTableFrame* table = colGroup->GetTableFrame();
+      RowGroupArray rowGroups;
+      table->OrderRowGroups(rowGroups);
+      for (nsTableRowGroupFrame* rowGroup : rowGroups) {
+        auto offset = rowGroup->GetNormalPosition() - colGroup->GetNormalPosition();
+        if (!aBuilder->GetDirtyRect().Intersects(nsRect(offset, rowGroup->GetSize()))) {
+          continue;
+        }
+        PaintRowGroupBackgroundByColIdx(rowGroup, aFrame, aBuilder, aLists, colIdx, offset);
+      }
     }
   } else if (aFrame->IsTableColFrame()) {
     // Compute background rect by iterating all cell frame.
     nsTableColFrame* col = static_cast<nsTableColFrame*>(aFrame);
     AutoTArray<uint32_t, 1> colIdx;
     colIdx.AppendElement(col->GetColIndex());
 
     nsTableFrame* table = col->GetTableFrame();
--- a/layout/xul/nsSliderFrame.cpp
+++ b/layout/xul/nsSliderFrame.cpp
@@ -374,17 +374,16 @@ nsSliderFrame::BuildDisplayListForChildr
     // We do this here and not in the thumb's nsBoxFrame::BuildDisplayList so
     // that the event region that gets created for the thumb is included in
     // the nsDisplayOwnLayer contents.
 
     uint32_t flags = aBuilder->GetCurrentScrollbarFlags();
     mozilla::layers::FrameMetrics::ViewID scrollTargetId =
       aBuilder->GetCurrentScrollbarTarget();
     bool thumbGetsLayer = (scrollTargetId != layers::FrameMetrics::NULL_SCROLL_ID);
-    nsLayoutUtils::SetScrollbarThumbLayerization(thumb, thumbGetsLayer);
 
     if (thumbGetsLayer) {
       MOZ_ASSERT((flags & nsDisplayOwnLayer::HORIZONTAL_SCROLLBAR) ||
                  (flags & nsDisplayOwnLayer::VERTICAL_SCROLLBAR));
       bool isHorizontal = (flags & nsDisplayOwnLayer::HORIZONTAL_SCROLLBAR);
       ScrollDirection scrollDirection = isHorizontal
           ? ScrollDirection::HORIZONTAL
           : ScrollDirection::VERTICAL;
@@ -1067,16 +1066,32 @@ ScrollFrameWillBuildScrollInfoLayer(nsIF
     if (UsesSVGEffects(current)) {
       return true;
     }
     current = nsLayoutUtils::GetParentOrPlaceholderForCrossDoc(current);
   }
   return false;
 }
 
+nsIScrollableFrame* nsSliderFrame::GetScrollFrame()
+{
+  nsIFrame* scrollbarBox = GetScrollbar();
+  if (!scrollbarBox) {
+    return nullptr;
+  }
+
+  nsContainerFrame* scrollFrame = scrollbarBox->GetParent();
+  if (!scrollFrame) {
+    return nullptr;
+  }
+
+  nsIScrollableFrame* scrollFrameAsScrollable = do_QueryFrame(scrollFrame);
+  return scrollFrameAsScrollable;
+}
+
 void
 nsSliderFrame::StartAPZDrag(WidgetGUIEvent* aEvent)
 {
   if (!aEvent->mFlags.mHandledByAPZ) {
     return;
   }
 
   if (!gfxPlatform::GetPlatform()->SupportsApzDragInput()) {
--- a/layout/xul/nsSliderFrame.h
+++ b/layout/xul/nsSliderFrame.h
@@ -134,16 +134,19 @@ public:
 
   // Notify the slider frame than an async scrollbar drag requested in
   // StartAPZDrag() was rejected by APZ, and the slider frame should
   // fall back to main-thread dragging.
   void AsyncScrollbarDragRejected();
 
   bool OnlySystemGroupDispatch(mozilla::EventMessage aMessage) const override;
 
+  // Returns the associated scrollframe that contains this slider if any.
+  nsIScrollableFrame* GetScrollFrame();
+
 private:
 
   bool GetScrollToClick();
   nsIFrame* GetScrollbar();
   bool ShouldScrollForEvent(mozilla::WidgetGUIEvent* aEvent);
   bool ShouldScrollToClickForEvent(mozilla::WidgetGUIEvent* aEvent);
   bool IsEventOverThumb(mozilla::WidgetGUIEvent* aEvent);
 
--- a/modules/libjar/nsJAR.cpp
+++ b/modules/libjar/nsJAR.cpp
@@ -38,36 +38,46 @@ nsJAR::~nsJAR()
 {
   Close();
 }
 
 NS_IMPL_QUERY_INTERFACE(nsJAR, nsIZipReader)
 NS_IMPL_ADDREF(nsJAR)
 
 // Custom Release method works with nsZipReaderCache...
+// Release might be called from multi-thread, we have to
+// take this function carefully to avoid delete-after-use.
 MozExternalRefCountType nsJAR::Release(void)
 {
   nsrefcnt count;
   NS_PRECONDITION(0 != mRefCnt, "dup release");
-  count = --mRefCnt;
+
+  RefPtr<nsZipReaderCache> cache;
+  if (mRefCnt == 2) { // don't use a lock too frequently
+    // Use a mutex here to guarantee mCache is not racing and the target instance
+    // is still valid to increase ref-count.
+    MutexAutoLock lock(mLock);
+    cache = mCache;
+    mCache = nullptr;
+  }
+  if (cache) {
+    DebugOnly<nsresult> rv = cache->ReleaseZip(this);
+    MOZ_ASSERT(NS_SUCCEEDED(rv), "failed to release zip file");
+  }
+
+  count = --mRefCnt; // don't access any member variable after this line
   NS_LOG_RELEASE(this, count, "nsJAR");
   if (0 == count) {
     mRefCnt = 1; /* stabilize */
     /* enable this to find non-threadsafe destructors: */
     /* NS_ASSERT_OWNINGTHREAD(nsJAR); */
     delete this;
     return 0;
   }
-  if (1 == count && mCache) {
-#ifdef DEBUG
-    nsresult rv =
-#endif
-      mCache->ReleaseZip(this);
-    NS_ASSERTION(NS_SUCCEEDED(rv), "failed to release zip file");
-  }
+
   return count;
 }
 
 //----------------------------------------------
 // nsIZipReader implementation
 //----------------------------------------------
 
 NS_IMETHODIMP
--- a/modules/libjar/nsJAR.h
+++ b/modules/libjar/nsJAR.h
@@ -7,16 +7,17 @@
 #define nsJAR_h_
 
 #include "nscore.h"
 #include "prio.h"
 #include "plstr.h"
 #include "mozilla/Logging.h"
 #include "prinrval.h"
 
+#include "mozilla/Atomics.h"
 #include "mozilla/Mutex.h"
 #include "nsIComponentManager.h"
 #include "nsCOMPtr.h"
 #include "nsClassHashtable.h"
 #include "nsString.h"
 #include "nsIFile.h"
 #include "nsStringEnumerator.h"
 #include "nsHashKeys.h"
@@ -70,31 +71,32 @@ class nsJAR final : public nsIZipReader
     void SetReleaseTime() {
       mReleaseTime = PR_IntervalNow();
     }
 
     void ClearReleaseTime() {
       mReleaseTime = PR_INTERVAL_NO_TIMEOUT;
     }
 
-    void SetZipReaderCache(nsZipReaderCache* cache) {
-      mCache = cache;
+    void SetZipReaderCache(nsZipReaderCache* aCache) {
+      mozilla::MutexAutoLock lock(mLock);
+      mCache = aCache;
     }
 
     nsresult GetNSPRFileDesc(PRFileDesc** aNSPRFileDesc);
 
   protected:
 
     //-- Private data members
     nsCOMPtr<nsIFile>        mZipFile;        // The zip/jar file on disk
     nsCString                mOuterZipEntry;  // The entry in the zip this zip is reading from
     RefPtr<nsZipArchive>     mZip;            // The underlying zip archive
     PRIntervalTime           mReleaseTime;    // used by nsZipReaderCache for flushing entries
     nsZipReaderCache*        mCache;          // if cached, this points to the cache it's contained in
-    mozilla::Mutex           mLock;
+    mozilla::Mutex           mLock;           // protect mCache and mZip
     int64_t                  mMtime;
     bool                     mOpened;
     bool                     mIsOmnijar;
 
     nsresult LoadEntry(const nsACString& aFilename, nsCString& aBuf);
     int32_t  ReadLine(const char** src);
 };
 
--- a/mozglue/build/WindowsDllBlocklist.cpp
+++ b/mozglue/build/WindowsDllBlocklist.cpp
@@ -858,16 +858,23 @@ DllBlocklist_Initialize(uint32_t aInitFl
 
   if (!ok) {
     sBlocklistInitFailed = true;
 #ifdef DEBUG
     printf_stderr("LdrLoadDll hook failed, no dll blocklisting active\n");
 #endif
   }
 
+  // If someone injects a thread early that causes user32.dll to load off the
+  // main thread this causes issues, so load it as soon as we've initialized
+  // the block-list. (See bug 1400637)
+  if (!sUser32BeforeBlocklist) {
+    ::LoadLibraryW(L"user32.dll");
+  }
+
   Kernel32Intercept.Init("kernel32.dll");
 
 #ifdef _M_AMD64
   if (!IsWin8OrLater()) {
     // The crash that this hook works around is only seen on Win7.
     Kernel32Intercept.AddHook("RtlInstallFunctionTableCallback",
                               reinterpret_cast<intptr_t>(patched_RtlInstallFunctionTableCallback),
                               (void**)&stub_RtlInstallFunctionTableCallback);
--- a/storage/mozStorageService.cpp
+++ b/storage/mozStorageService.cpp
@@ -297,37 +297,48 @@ Service::registerConnection(Connection *
 
 void
 Service::unregisterConnection(Connection *aConnection)
 {
   // If this is the last Connection it might be the only thing keeping Service
   // alive.  So ensure that Service is destroyed only after the Connection is
   // cleanly unregistered and destroyed.
   RefPtr<Service> kungFuDeathGrip(this);
+  RefPtr<Connection> forgettingRef;
   {
     mRegistrationMutex.AssertNotCurrentThreadOwns();
     MutexAutoLock mutex(mRegistrationMutex);
 
     for (uint32_t i = 0 ; i < mConnections.Length(); ++i) {
       if (mConnections[i] == aConnection) {
-        nsCOMPtr<nsIThread> thread = mConnections[i]->threadOpenedOn;
-
-        // Ensure the connection is released on its opening thread.  Note, we
-        // must use .forget().take() so that we can manually cast to an
-        // unambiguous nsISupports type.
-        NS_ProxyRelease(
-          "storage::Service::mConnections", thread, mConnections[i].forget());
-
+        // Because dropping the final reference can potentially result in
+        // spinning a nested event loop if the connection was not properly
+        // shutdown, we want to do that outside this loop so that we can finish
+        // mutating the array and drop our mutex.
+        forgettingRef = mConnections[i].forget();
         mConnections.RemoveElementAt(i);
-        return;
+        break;
       }
     }
+  }
 
-    MOZ_ASSERT_UNREACHABLE("Attempt to unregister unknown storage connection!");
-  }
+  MOZ_ASSERT(forgettingRef,
+             "Attempt to unregister unknown storage connection!");
+
+  // Ensure the connection is released on its opening thread.  We explicitly use
+  // aAlwaysDispatch=false because at the time of writing this, LocalStorage's
+  // StorageDBThread uses a hand-rolled PRThread implementation that cannot
+  // handle us dispatching events at it during shutdown.  However, it is
+  // arguably also desirable for callers to not be aware of our connection
+  // tracking mechanism.  And by synchronously dropping the reference (when
+  // on the correct thread), this avoids surprises for the caller and weird
+  // shutdown edge cases.
+  nsCOMPtr<nsIThread> thread = forgettingRef->threadOpenedOn;
+  NS_ProxyRelease(
+    "storage::Service::mConnections", thread, forgettingRef.forget(), false);
 }
 
 void
 Service::getConnections(/* inout */ nsTArray<RefPtr<Connection> >& aConnections)
 {
   mRegistrationMutex.AssertNotCurrentThreadOwns();
   MutexAutoLock mutex(mRegistrationMutex);
   aConnections.Clear();
--- a/testing/config/tooltool-manifests/linux64/ccov.manifest
+++ b/testing/config/tooltool-manifests/linux64/ccov.manifest
@@ -1,9 +1,9 @@
 [
   {
-    "size": 770769,
-    "digest": "279faad46504a839b2891e2f35f006100b83578b54d074e43e514ea38c23e8a2407db249f60d4f87e350e7f84499aabeadf04e0203dcc8349277b0cda9eb01f0",
+    "size": 1459169,
+    "digest": "ccf7d7949eb055b21771e005be60fe878435814adc5397ef7078fb1988c7d17b2d5128b0f02a9c86456c648e8b43e15545872ebfb77cb4366098225fffcfd4b7",
     "algorithm": "sha512",
     "filename": "grcov-linux-standalone-x86_64.tar.bz2",
     "unpack": false
   }
 ]
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
--- a/toolkit/components/telemetry/TelemetryIOInterposeObserver.cpp
+++ b/toolkit/components/telemetry/TelemetryIOInterposeObserver.cpp
@@ -42,35 +42,35 @@ void TelemetryIOInterposeObserver::Obser
     return;
   }
 
   if (aOb.Duration() < kTelemetryReportThreshold) {
     return;
   }
 
   // Get the filename
-  const char16_t* filename = aOb.Filename();
+  nsAutoString filename;
+  aOb.Filename(filename);
 
   // Discard observations without filename
-  if (!filename) {
+  if (filename.IsEmpty()) {
     return;
   }
 
 #if defined(XP_WIN)
   nsCaseInsensitiveStringComparator comparator;
 #else
   nsDefaultStringComparator comparator;
 #endif
   nsAutoString      processedName;
-  nsDependentString filenameStr(filename);
   uint32_t safeDirsLen = mSafeDirs.Length();
   for (uint32_t i = 0; i < safeDirsLen; ++i) {
-    if (StringBeginsWith(filenameStr, mSafeDirs[i].mPath, comparator)) {
+    if (StringBeginsWith(filename, mSafeDirs[i].mPath, comparator)) {
       processedName = mSafeDirs[i].mSubstName;
-      processedName += Substring(filenameStr, mSafeDirs[i].mPath.Length());
+      processedName += Substring(filename, mSafeDirs[i].mPath.Length());
       break;
     }
   }
 
   if (processedName.IsEmpty()) {
     return;
   }
 
--- a/toolkit/content/tests/chrome/window_largemenu.xul
+++ b/toolkit/content/tests/chrome/window_largemenu.xul
@@ -319,17 +319,17 @@ function testPopupMovement()
   var screenX, screenY, buttonScreenX, buttonScreenY;
   var rect = popup.getBoundingClientRect();
 
   var overlapOSChrome = !platformIsMac();
   popup.moveTo(1, 1);
   [screenX, screenY] = getScreenXY(popup);
 
   var expectedx = 1, expectedy = 1;
-  if (!overlapOSChrome) {
+  if (!isPanelTest && !overlapOSChrome) {
     if (screen.availLeft >= 1) expectedx = screen.availLeft;
     if (screen.availTop >= 1) expectedy = screen.availTop;
   }
   is(screenX, expectedx, gTests[gTestIndex] + " (1, 1) x");
   is(screenY, expectedy, gTests[gTestIndex] + " (1, 1) y");
 
   popup.moveTo(100, 8000);
   if (isPanelTest) {
--- a/toolkit/modules/subprocess/test/xpcshell/xpcshell.ini
+++ b/toolkit/modules/subprocess/test/xpcshell/xpcshell.ini
@@ -5,9 +5,10 @@ skip-if = os == 'android'
 subprocess = true
 support-files =
   data_text_file.txt
   data_test_script.py
 
 [test_subprocess.js]
 skip-if = coverage
 [test_subprocess_getEnvironment.js]
+skip-if = coverage
 [test_subprocess_pathSearch.js]
--- a/tools/profiler/gecko/ProfilerIOInterposeObserver.cpp
+++ b/tools/profiler/gecko/ProfilerIOInterposeObserver.cpp
@@ -11,19 +11,17 @@ using namespace mozilla;
 void ProfilerIOInterposeObserver::Observe(Observation& aObservation)
 {
   if (!IsMainThread()) {
     return;
   }
 
   UniqueProfilerBacktrace stack = profiler_get_backtrace();
 
-  nsCString filename;
-  if (aObservation.Filename()) {
-    filename = NS_ConvertUTF16toUTF8(aObservation.Filename());
-  }
-
+  nsString filename;
+  aObservation.Filename(filename);
   profiler_add_marker(
     aObservation.ObservedOperationString(),
-    MakeUnique<IOMarkerPayload>(aObservation.Reference(), filename.get(),
+    MakeUnique<IOMarkerPayload>(aObservation.Reference(),
+                                NS_ConvertUTF16toUTF8(filename).get(),
                                 aObservation.Start(), aObservation.End(),
                                 Move(stack)));
 }
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -880,19 +880,21 @@ nsCocoaWindow::Show(bool bState)
                         object:@"org.mozilla.gecko.PopupWindow"];
       }
 
       // If a parent window was supplied and this is a popup at the parent
       // level, set its child window. This will cause the child window to
       // appear above the parent and move when the parent does. Setting this
       // needs to happen after the _setWindowNumber calls above, otherwise the
       // window doesn't focus properly.
-      if (nativeParentWindow && mPopupLevel == ePopupLevelParent)
+      if (nativeParentWindow && mPopupLevel == ePopupLevelParent) {
         [nativeParentWindow addChildWindow:mWindow
                             ordered:NSWindowAbove];
+        [mWindow setLevel:NSPopUpMenuWindowLevel];
+      }
     }
     else {
       NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
       if (mWindowType == eWindowType_toplevel &&
           [mWindow respondsToSelector:@selector(setAnimationBehavior:)]) {
         NSWindowAnimationBehavior behavior;
         if (mIsAnimationSuppressed) {
           behavior = NSWindowAnimationBehaviorNone;
@@ -1370,16 +1372,17 @@ nsCocoaWindow::HideWindowChrome(bool aSh
   // Reparent the content view.
   [mWindow setContentView:contentView];
   [contentView release];
 
   // Reparent child windows.
   enumerator = [childWindows objectEnumerator];
   while ((child = [enumerator nextObject])) {
     [mWindow addChildWindow:child ordered:NSWindowAbove];
+    [mWindow setLevel:NSPopUpMenuWindowLevel];
   }
 
   // Show the new window.
   if (isVisible) {
     bool wasAnimationSuppressed = mIsAnimationSuppressed;
     mIsAnimationSuppressed = true;
     Show(true);
     mIsAnimationSuppressed = wasAnimationSuppressed;
--- a/xpcom/build/IOInterposer.h
+++ b/xpcom/build/IOInterposer.h
@@ -5,16 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_IOInterposer_h
 #define mozilla_IOInterposer_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/GuardObjects.h"
 #include "mozilla/TimeStamp.h"
+#include "nsString.h"
 
 namespace mozilla {
 
 /**
  * Interface for I/O interposer observers. This is separate from the
  * IOInterposer because we have multiple uses for these observations.
  */
 class IOInterposeObserver
@@ -89,18 +90,18 @@ public:
      * IO reference, function name or name of component (sqlite) that did IO
      * this is in addition the generic operation. This attribute may be platform
      * specific, but should only take a finite number of distinct values.
      * E.g. sqlite-commit, CreateFile, NtReadFile, fread, fsync, mmap, etc.
      * I.e. typically the platform specific function that did the IO.
      */
     const char* Reference() const { return mReference; }
 
-    /** Request filename associated with the I/O operation, null if unknown */
-    virtual const char16_t* Filename() { return nullptr; }
+    /** Request filename associated with the I/O operation, empty if unknown */
+    virtual void Filename(nsAString& aString) { aString.Truncate(); }
 
     virtual ~Observation() {}
 
   protected:
     void
     Report();
 
     Operation   mOperation;
--- a/xpcom/build/MainThreadIOLogger.cpp
+++ b/xpcom/build/MainThreadIOLogger.cpp
@@ -34,20 +34,17 @@ struct ObservationWithStack
                                 , ProfilerBacktrace* aStack
 #endif
                                 )
     : mObservation(aObs)
 #ifdef MOZ_GECKO_PROFILER
     , mStack(aStack)
 #endif
   {
-    const char16_t* filename = aObs.Filename();
-    if (filename) {
-      mFilename = filename;
-    }
+    aObs.Filename(mFilename);
   }
 
   mozilla::IOInterposeObserver::Observation mObservation;
 #ifdef MOZ_GECKO_PROFILER
   ProfilerBacktrace*                        mStack;
 #endif
   nsString                                  mFilename;
 };
--- a/xpcom/build/PoisonIOInterposerMac.cpp
+++ b/xpcom/build/PoisonIOInterposerMac.cpp
@@ -60,70 +60,65 @@ bool IsIPCWrite(int aFd, const struct st
 class MacIOAutoObservation : public IOInterposeObserver::Observation
 {
 public:
   MacIOAutoObservation(IOInterposeObserver::Operation aOp, int aFd)
     : IOInterposeObserver::Observation(aOp, sReference, sIsEnabled &&
                                        !IsDebugFile(aFd))
     , mFd(aFd)
     , mHasQueriedFilename(false)
-    , mFilename(nullptr)
   {
   }
 
   MacIOAutoObservation(IOInterposeObserver::Operation aOp, int aFd,
                        const void* aBuf, size_t aCount)
     : IOInterposeObserver::Observation(aOp, sReference, sIsEnabled &&
                                        !IsDebugFile(aFd) &&
                                        IsValidWrite(aFd, aBuf, aCount))
     , mFd(aFd)
     , mHasQueriedFilename(false)
-    , mFilename(nullptr)
   {
   }
 
   // Custom implementation of IOInterposeObserver::Observation::Filename
-  const char16_t* Filename() override;
+  void Filename(nsAString& aFilename) override;
 
   ~MacIOAutoObservation()
   {
     Report();
-    if (mFilename) {
-      free(mFilename);
-      mFilename = nullptr;
-    }
   }
 
 private:
   int                 mFd;
   bool                mHasQueriedFilename;
-  char16_t*           mFilename;
+  nsString            mFilename;
   static const char*  sReference;
 };
 
 const char* MacIOAutoObservation::sReference = "PoisonIOInterposer";
 
 // Get filename for this observation
-const char16_t*
-MacIOAutoObservation::Filename()
+void
+MacIOAutoObservation::Filename(nsAString& aFilename)
 {
   // If mHasQueriedFilename is true, then we already have it
   if (mHasQueriedFilename) {
-    return mFilename;
+    aFilename = mFilename;
+    return;
   }
+
   char filename[MAXPATHLEN];
   if (fcntl(mFd, F_GETPATH, filename) != -1) {
-    mFilename = UTF8ToNewUnicode(nsDependentCString(filename));
+    mFilename = NS_ConvertUTF8toUTF16(filename);
   } else {
-    mFilename = nullptr;
+    mFilename.Truncate();
   }
   mHasQueriedFilename = true;
 
-  // Return filename
-  return mFilename;
+  aFilename = mFilename;
 }
 
 /****************************** Write Validation ******************************/
 
 // We want to detect "actual" writes, not IPC. Some IPC mechanisms are
 // implemented with file descriptors, so filter them out.
 bool
 IsIPCWrite(int aFd, const struct stat& aBuf)
--- a/xpcom/build/PoisonIOInterposerWin.cpp
+++ b/xpcom/build/PoisonIOInterposerWin.cpp
@@ -144,80 +144,71 @@ class WinIOAutoObservation : public IOIn
 {
 public:
   WinIOAutoObservation(IOInterposeObserver::Operation aOp,
                        HANDLE aFileHandle, const LARGE_INTEGER* aOffset)
     : IOInterposeObserver::Observation(
         aOp, sReference, !IsDebugFile(reinterpret_cast<intptr_t>(aFileHandle)))
     , mFileHandle(aFileHandle)
     , mHasQueriedFilename(false)
-    , mFilename(nullptr)
   {
     if (mShouldReport) {
       mOffset.QuadPart = aOffset ? aOffset->QuadPart : 0;
     }
   }
 
   WinIOAutoObservation(IOInterposeObserver::Operation aOp, nsAString& aFilename)
     : IOInterposeObserver::Observation(aOp, sReference)
     , mFileHandle(nullptr)
     , mHasQueriedFilename(false)
-    , mFilename(nullptr)
   {
     if (mShouldReport) {
       nsAutoString dosPath;
       if (NtPathToDosPath(aFilename, dosPath)) {
-        mFilename = ToNewUnicode(dosPath);
+        mFilename = dosPath;
         mHasQueriedFilename = true;
       }
       mOffset.QuadPart = 0;
     }
   }
 
   // Custom implementation of IOInterposeObserver::Observation::Filename
-  const char16_t* Filename() override;
+  void Filename(nsAString& aFilename) override;
 
   ~WinIOAutoObservation()
   {
     Report();
-    if (mFilename) {
-      MOZ_ASSERT(mHasQueriedFilename);
-      free(mFilename);
-      mFilename = nullptr;
-    }
   }
 
 private:
   HANDLE              mFileHandle;
   LARGE_INTEGER       mOffset;
   bool                mHasQueriedFilename;
-  char16_t*           mFilename;
+  nsString            mFilename;
   static const char*  sReference;
 };
 
 const char* WinIOAutoObservation::sReference = "PoisonIOInterposer";
 
 // Get filename for this observation
-const char16_t*
-WinIOAutoObservation::Filename()
+void
+WinIOAutoObservation::Filename(nsAString& aFilename)
 {
   // If mHasQueriedFilename is true, then filename is already stored in mFilename
   if (mHasQueriedFilename) {
-    return mFilename;
+    aFilename = mFilename;
   }
 
-  nsAutoString utf16Filename;
-  if (HandleToFilename(mFileHandle, mOffset, utf16Filename)) {
-    // Heap allocate with leakable memory
-    mFilename = ToNewUnicode(utf16Filename);
+  nsAutoString filename;
+  if (HandleToFilename(mFileHandle, mOffset, filename)) {
+    mFilename = filename;
   }
   mHasQueriedFilename = true;
 
-  // Return filename
-  return mFilename;
+  aFilename = mFilename;
 }
 
 /*************************** IO Interposing Methods ***************************/
 
 // Function pointers to original functions
 static NtCreateFileFn         gOriginalNtCreateFile;
 static NtReadFileFn           gOriginalNtReadFile;
 static NtReadFileScatterFn    gOriginalNtReadFileScatter;
--- a/xpcom/string/nsStringObsolete.cpp
+++ b/xpcom/string/nsStringObsolete.cpp
@@ -851,81 +851,81 @@ RFind_ComputeSearchRange( uint32_t bigLe
 
 #include "nsTStringObsolete.cpp"
 
 //-----------------------------------------------------------------------------
 
 // specialized methods:
 
 template <typename T>
-template <typename EnableIfChar16>
+template <typename Q, typename EnableIfChar16>
 int32_t
 nsTString<T>::Find(const self_type& aString, int32_t aOffset, int32_t aCount) const
 {
   // this method changes the meaning of aOffset and aCount:
   Find_ComputeSearchRange(this->mLength, aString.Length(), aOffset, aCount);
 
   // Capture the raw buffer locally to help msvc deduce the type.
   const char_type* str = aString.get();
   int32_t result = FindSubstring(this->mData + aOffset, aCount, str, aString.Length(), false);
   if (result != kNotFound)
     result += aOffset;
   return result;
 }
 
 template <typename T>
-template <typename EnableIfChar16>
+template <typename Q, typename EnableIfChar16>
 int32_t
 nsTString<T>::Find(const char_type* aString, int32_t aOffset, int32_t aCount) const
 {
   return Find(nsTDependentString<T>(aString), aOffset, aCount);
 }
 
 template <typename T>
-template <typename EnableIfChar16>
+template <typename Q, typename EnableIfChar16>
 int32_t
 nsTString<T>::RFind(const self_type& aString, int32_t aOffset, int32_t aCount) const
 {
   // this method changes the meaning of aOffset and aCount:
   RFind_ComputeSearchRange(this->mLength, aString.Length(), aOffset, aCount);
 
   // Capture the raw buffer locally to help msvc deduce the type.
   const char_type* str = aString.get();
   int32_t result = RFindSubstring(this->mData + aOffset, aCount, str, aString.Length(), false);
   if (result != kNotFound)
     result += aOffset;
   return result;
 }
 
 template <typename T>
-template <typename EnableIfChar16>
+template <typename Q, typename EnableIfChar16>
 int32_t
 nsTString<T>::RFind(const char_type* aString, int32_t aOffset, int32_t aCount) const
 {
   return RFind(nsTDependentString<T>(aString), aOffset, aCount);
 }
 
 template <typename T>
-template <typename EnableIfChar16>
+template <typename Q, typename EnableIfChar16>
 int32_t
 nsTString<T>::FindCharInSet(const char* aSet, int32_t aOffset) const
 {
   if (aOffset < 0)
     aOffset = 0;
   else if (aOffset >= int32_t(this->mLength))
     return kNotFound;
 
   int32_t result = ::FindCharInSet(this->mData + aOffset, this->mLength - aOffset, aSet);
   if (result != kNotFound)
     result += aOffset;
   return result;
 }
 
 template <typename T>
-template <typename EnableIfChar16>
+template <typename Q, typename EnableIfChar16>
 void
 nsTString<T>::ReplaceChar(const char* aSet, char16_t aNewChar)
 {
   if (!this->EnsureMutable()) // XXX do this lazily?
     this->AllocFailed(this->mLength);
 
   char16_t* data = this->mData;
   uint32_t lenRemaining = this->mLength;
@@ -943,17 +943,17 @@ nsTString<T>::ReplaceChar(const char* aS
 }
 
 
 /**
  * nsTString::Compare,CompareWithConversion,etc.
  */
 
 template <typename T>
-template <typename EnableIfChar>
+template <typename Q, typename EnableIfChar>
 int32_t
 nsTString<T>::Compare(const char_type* aString, bool aIgnoreCase, int32_t aCount) const
 {
   uint32_t strLen = char_traits::length(aString);
 
   int32_t maxCount = int32_t(XPCOM_MIN(this->mLength, strLen));
 
   int32_t compareCount;
@@ -974,17 +974,17 @@ nsTString<T>::Compare(const char_type* a
 
     if (this->mLength != strLen)
       result = (this->mLength < strLen) ? -1 : 1;
   }
   return result;
 }
 
 template <typename T>
-template <typename EnableIfChar16>
+template <typename Q, typename EnableIfChar16>
 bool
 nsTString<T>::EqualsIgnoreCase(const incompatible_char_type* aString, int32_t aCount) const
 {
   uint32_t strLen = nsCharTraits<char>::length(aString);
 
   int32_t maxCount = int32_t(XPCOM_MIN(this->mLength, strLen));
 
   int32_t compareCount;
--- a/xpcom/string/nsTDependentString.h
+++ b/xpcom/string/nsTDependentString.h
@@ -47,54 +47,50 @@ public:
 
   typedef typename base_string_type::index_type index_type;
   typedef typename base_string_type::size_type size_type;
 
   // These are only for internal use within the string classes:
   typedef typename base_string_type::DataFlags DataFlags;
   typedef typename base_string_type::ClassFlags ClassFlags;
 
-  using typename base_string_type::IsChar;
-  using typename base_string_type::IsChar16;
-
-
 public:
 
   /**
    * constructors
    */
 
   nsTDependentString(const char_type* aStart, const char_type* aEnd);
 
   nsTDependentString(const char_type* aData, uint32_t aLength)
     : string_type(const_cast<char_type*>(aData), aLength,
                   DataFlags::TERMINATED, ClassFlags(0))
   {
     this->AssertValidDependentString();
   }
 
 #if defined(MOZ_USE_CHAR16_WRAPPER)
-  template <typename EnableIfChar16 = IsChar16>
+  template <typename Q = T, typename EnableIfChar16 = mozilla::Char16OnlyT<Q>>
   nsTDependentString(char16ptr_t aData, uint32_t aLength)
     : nsTDependentString(static_cast<const char16_t*>(aData), aLength)
   {
   }
 #endif
 
   explicit
   nsTDependentString(const char_type* aData)
     : string_type(const_cast<char_type*>(aData),
                   uint32_t(char_traits::length(aData)),
                   DataFlags::TERMINATED, ClassFlags(0))
   {
     string_type::AssertValidDependentString();
   }
 
 #if defined(MOZ_USE_CHAR16_WRAPPER)
-  template <typename EnableIfChar16 = IsChar16>
+  template <typename Q = T, typename EnableIfChar16 = mozilla::Char16OnlyT<Q>>
   explicit
   nsTDependentString(char16ptr_t aData)
     : nsTDependentString(static_cast<const char16_t*>(aData))
   {
   }
 #endif
 
   nsTDependentString(const string_type& aStr, uint32_t aStartPos)
--- a/xpcom/string/nsTDependentSubstring.cpp
+++ b/xpcom/string/nsTDependentSubstring.cpp
@@ -55,17 +55,17 @@ nsTDependentSubstring<T>::nsTDependentSu
   : substring_type(const_cast<char_type*>(aStart), uint32_t(aEnd - aStart),
                    DataFlags(0), ClassFlags(0))
 {
   MOZ_RELEASE_ASSERT(aStart <= aEnd, "Overflow!");
 }
 
 #if defined(MOZ_USE_CHAR16_WRAPPER)
 template <typename T>
-template <typename EnableIfChar16>
+template <typename Q, typename EnableIfChar16>
 nsTDependentSubstring<T>::nsTDependentSubstring(char16ptr_t aStart,
                                                 char16ptr_t aEnd)
   : substring_type(static_cast<const char16_t*>(aStart),
                    static_cast<const char16_t*>(aEnd))
 {
   MOZ_RELEASE_ASSERT(static_cast<const char16_t*>(aStart) <=
                      static_cast<const char16_t*>(aEnd),
                      "Overflow!");
--- a/xpcom/string/nsTDependentSubstring.h
+++ b/xpcom/string/nsTDependentSubstring.h
@@ -47,19 +47,16 @@ public:
 
   typedef typename substring_type::index_type index_type;
   typedef typename substring_type::size_type size_type;
 
   // These are only for internal use within the string classes:
   typedef typename substring_type::DataFlags DataFlags;
   typedef typename substring_type::ClassFlags ClassFlags;
 
-  using typename substring_type::IsChar;
-  using typename substring_type::IsChar16;
-
 public:
 
   void Rebind(const substring_type&, uint32_t aStartPos,
               uint32_t aLength = size_type(-1));
 
   void Rebind(const char_type* aData, size_type aLength);
 
   void Rebind(const char_type* aStart, const char_type* aEnd);
@@ -75,23 +72,23 @@ public:
     : substring_type(const_cast<char_type*>(aData), aLength,
                      DataFlags(0), ClassFlags(0))
   {
   }
 
   nsTDependentSubstring(const char_type* aStart, const char_type* aEnd);
 
 #if defined(MOZ_USE_CHAR16_WRAPPER)
-  template <typename EnableIfChar16 = IsChar16>
+  template <typename Q = T, typename EnableIf