Merge mozilla-central to advanced-layers. draft
authorDavid Anderson <danderson@mozilla.com>
Thu, 19 Jan 2017 15:01:26 -0800
changeset 330250 f88799660cf6d6fd4641e9a7e156651ea622cb35
parent 329738 6bb647fea9f624e7d4afd4111b53c0f42cbd4ff8 (current diff)
parent 330249 a3978751f45108ff1ae002ecebdc0fa23fc52b84 (diff)
child 330251 0ce802b6235ca59de39a2d7c1b6de0f3c943ec08
push id97
push userdanderson@mozilla.com
push dateThu, 19 Jan 2017 23:03:40 +0000
milestone53.0a1
Merge mozilla-central to advanced-layers.
devtools/client/netmonitor/test/browser_net_statistics-03.js
devtools/client/shared/components/test/mochitest/test_reps_array.html
devtools/client/shared/components/test/mochitest/test_reps_attribute.html
devtools/client/shared/components/test/mochitest/test_reps_comment-node.html
devtools/client/shared/components/test/mochitest/test_reps_date-time.html
devtools/client/shared/components/test/mochitest/test_reps_document.html
devtools/client/shared/components/test/mochitest/test_reps_element-node.html
devtools/client/shared/components/test/mochitest/test_reps_error.html
devtools/client/shared/components/test/mochitest/test_reps_event.html
devtools/client/shared/components/test/mochitest/test_reps_failure.html
devtools/client/shared/components/test/mochitest/test_reps_function.html
devtools/client/shared/components/test/mochitest/test_reps_grip-array.html
devtools/client/shared/components/test/mochitest/test_reps_grip-map.html
devtools/client/shared/components/test/mochitest/test_reps_grip.html
devtools/client/shared/components/test/mochitest/test_reps_infinity.html
devtools/client/shared/components/test/mochitest/test_reps_long-string.html
devtools/client/shared/components/test/mochitest/test_reps_nan.html
devtools/client/shared/components/test/mochitest/test_reps_null.html
devtools/client/shared/components/test/mochitest/test_reps_number.html
devtools/client/shared/components/test/mochitest/test_reps_object-with-text.html
devtools/client/shared/components/test/mochitest/test_reps_object-with-url.html
devtools/client/shared/components/test/mochitest/test_reps_object.html
devtools/client/shared/components/test/mochitest/test_reps_promise.html
devtools/client/shared/components/test/mochitest/test_reps_regexp.html
devtools/client/shared/components/test/mochitest/test_reps_string.html
devtools/client/shared/components/test/mochitest/test_reps_stylesheet.html
devtools/client/shared/components/test/mochitest/test_reps_symbol.html
devtools/client/shared/components/test/mochitest/test_reps_text-node.html
devtools/client/shared/components/test/mochitest/test_reps_undefined.html
devtools/client/shared/components/test/mochitest/test_reps_window.html
devtools/client/webide/content/devicesettings.js
devtools/client/webide/content/devicesettings.xhtml
devtools/client/webide/test/test_device_settings.html
devtools/server/actors/settings.js
devtools/server/tests/mochitest/test_settings.html
devtools/shared/fronts/settings.js
devtools/shared/specs/settings.js
dom/media/MediaContentType.cpp
dom/media/MediaContentType.h
dom/media/gmp/GMPAudioDecoderChild.cpp
dom/media/gmp/GMPAudioDecoderChild.h
dom/media/gmp/GMPAudioDecoderParent.cpp
dom/media/gmp/GMPAudioDecoderParent.h
dom/media/gmp/GMPAudioDecoderProxy.h
dom/media/gmp/GMPAudioHost.cpp
dom/media/gmp/GMPAudioHost.h
dom/media/gmp/PGMPAudioDecoder.ipdl
dom/media/gmp/gmp-api/gmp-async-shutdown.h
dom/media/gmp/gmp-api/gmp-audio-codec.h
dom/media/gmp/gmp-api/gmp-audio-decode.h
dom/media/gmp/gmp-api/gmp-audio-host.h
dom/media/gmp/gmp-api/gmp-audio-samples.h
dom/media/platforms/agnostic/eme/EMEAudioDecoder.cpp
dom/media/platforms/agnostic/eme/EMEAudioDecoder.h
dom/media/platforms/agnostic/gmp/GMPAudioDecoder.cpp
dom/media/platforms/agnostic/gmp/GMPAudioDecoder.h
dom/settings/SettingsDB.jsm
dom/settings/SettingsManager.js
dom/settings/SettingsManager.manifest
dom/settings/SettingsRequestManager.jsm
dom/settings/SettingsService.js
dom/settings/SettingsService.manifest
dom/settings/moz.build
dom/settings/tests/chrome.ini
dom/settings/tests/file_bug1110872.html
dom/settings/tests/file_bug1110872.js
dom/settings/tests/file_loadserver.js
dom/settings/tests/test_settings_basics.html
dom/settings/tests/test_settings_blobs.html
dom/settings/tests/test_settings_bug1110872.html
dom/settings/tests/test_settings_data_uris.html
dom/settings/tests/test_settings_events.html
dom/settings/tests/test_settings_navigator_object.html
dom/settings/tests/test_settings_observer_killer.html
dom/settings/tests/test_settings_onsettingchange.html
dom/settings/tests/test_settings_permissions.html
dom/settings/tests/test_settings_service.js
dom/settings/tests/test_settings_service.xul
dom/settings/tests/test_settings_service_callback.js
dom/settings/tests/test_settings_service_callback.xul
dom/settings/tests/unit/test_settingsrequestmanager_messages.js
dom/settings/tests/unit/xpcshell.ini
dom/webidl/MozSettingsEvent.webidl
dom/webidl/MozSettingsTransactionEvent.webidl
dom/webidl/SettingsManager.webidl
gfx/2d/2D.h
gfx/2d/Factory.cpp
gfx/ipc/GfxMessageUtils.h
gfx/layers/LayersTypes.h
gfx/layers/client/ClientLayerManager.cpp
gfx/layers/client/ClientPaintedLayer.cpp
gfx/layers/client/CompositableChild.cpp
gfx/layers/client/CompositableChild.h
gfx/layers/client/ContentClient.h
gfx/layers/composite/CompositableHost.cpp
gfx/layers/composite/CompositableHost.h
gfx/layers/composite/ImageHost.cpp
gfx/layers/ipc/CompositableForwarder.cpp
gfx/layers/ipc/CompositableForwarder.h
gfx/layers/ipc/CompositableTransactionParent.cpp
gfx/layers/ipc/CompositableTransactionParent.h
gfx/layers/ipc/ImageBridgeChild.cpp
gfx/layers/ipc/ImageBridgeChild.h
gfx/layers/ipc/ImageBridgeParent.cpp
gfx/layers/ipc/ImageBridgeParent.h
gfx/layers/ipc/LayerTransactionParent.cpp
gfx/layers/ipc/LayerTransactionParent.h
gfx/layers/ipc/LayersMessages.ipdlh
gfx/layers/ipc/PCompositable.ipdl
gfx/layers/ipc/PImageBridge.ipdl
gfx/layers/ipc/PLayerTransaction.ipdl
gfx/layers/ipc/ShadowLayers.cpp
gfx/layers/ipc/ShadowLayers.h
gfx/layers/mlgpu/CanvasLayerMLGPU.h
gfx/layers/moz.build
gfx/thebes/gfxDWriteFonts.cpp
gfx/thebes/gfxPlatform.cpp
gfx/thebes/gfxPrefs.h
gfx/thebes/gfxWindowsPlatform.cpp
ipc/ipdl/ipdl/lower.py
media/gmp-clearkey/0.1/AnnexB.cpp
media/gmp-clearkey/0.1/AnnexB.h
media/gmp-clearkey/0.1/ClearKeyAsyncShutdown.cpp
media/gmp-clearkey/0.1/ClearKeyAsyncShutdown.h
media/gmp-clearkey/0.1/clearkey.info.in
media/gmp-clearkey/0.1/gmp-task-utils-generated.h
media/gmp-clearkey/0.1/gmp-task-utils.h
media/libvpx/1237848-check-lookahead-ctx.patch
media/libvpx/block_error_fp.patch
media/libvpx/cast-char-to-uint-before-shift.patch
media/libvpx/clamp-abs-QIndex.patch
media/libvpx/clamp_abs_lvl_seg.patch
media/libvpx/clang-cl.patch
media/libvpx/generate_sources_mozbuild.sh
media/libvpx/libvpx/build/make/ads2armasm_ms.pl
media/libvpx/libvpx/build/make/ads2gas_apple.pl
media/libvpx/libvpx/build/make/armlink_adapter.sh
media/libvpx/libvpx/build/make/gen_asm_deps.sh
media/libvpx/libvpx/build/make/gen_msvs_def.sh
media/libvpx/libvpx/build/make/gen_msvs_proj.sh
media/libvpx/libvpx/build/make/gen_msvs_sln.sh
media/libvpx/libvpx/build/make/gen_msvs_vcxproj.sh
media/libvpx/libvpx/build/make/iosbuild.sh
media/libvpx/libvpx/build/make/rtcd.pl
media/libvpx/libvpx/build/make/version.sh
media/libvpx/libvpx/configure
media/libvpx/libvpx/test/decode_to_md5.sh
media/libvpx/libvpx/test/decode_with_drops.sh
media/libvpx/libvpx/test/examples.sh
media/libvpx/libvpx/test/intrapred_test.cc
media/libvpx/libvpx/test/lpf_8_test.cc
media/libvpx/libvpx/test/postproc.sh
media/libvpx/libvpx/test/resize_util.sh
media/libvpx/libvpx/test/set_maps.sh
media/libvpx/libvpx/test/simple_decoder.sh
media/libvpx/libvpx/test/simple_encoder.sh
media/libvpx/libvpx/test/sixtap_predict_test.cc
media/libvpx/libvpx/test/subtract_test.cc
media/libvpx/libvpx/test/tools_common.sh
media/libvpx/libvpx/test/twopass_encoder.sh
media/libvpx/libvpx/test/vp8_multi_resolution_encoder.sh
media/libvpx/libvpx/test/vp8cx_set_ref.sh
media/libvpx/libvpx/test/vp9_avg_test.cc
media/libvpx/libvpx/test/vp9_spatial_svc_encoder.sh
media/libvpx/libvpx/test/vpx_temporal_svc_encoder.sh
media/libvpx/libvpx/test/vpxdec.sh
media/libvpx/libvpx/test/vpxenc.sh
media/libvpx/libvpx/third_party/libwebm/RELEASE.TXT
media/libvpx/libvpx/third_party/libwebm/mkvmuxer.cpp
media/libvpx/libvpx/third_party/libwebm/mkvmuxer.hpp
media/libvpx/libvpx/third_party/libwebm/mkvmuxertypes.hpp
media/libvpx/libvpx/third_party/libwebm/mkvmuxerutil.cpp
media/libvpx/libvpx/third_party/libwebm/mkvmuxerutil.hpp
media/libvpx/libvpx/third_party/libwebm/mkvparser.cpp
media/libvpx/libvpx/third_party/libwebm/mkvparser.hpp
media/libvpx/libvpx/third_party/libwebm/mkvreader.cpp
media/libvpx/libvpx/third_party/libwebm/mkvreader.hpp
media/libvpx/libvpx/third_party/libwebm/mkvwriter.cpp
media/libvpx/libvpx/third_party/libwebm/mkvwriter.hpp
media/libvpx/libvpx/third_party/libwebm/webmids.hpp
media/libvpx/libvpx/third_party/libyuv/source/compare_posix.cc
media/libvpx/libvpx/third_party/libyuv/source/row_posix.cc
media/libvpx/libvpx/third_party/libyuv/source/row_x86.asm
media/libvpx/libvpx/third_party/libyuv/source/scale_posix.cc
media/libvpx/libvpx/third_party/libyuv/source/x86inc.asm
media/libvpx/libvpx/tools/all_builds.py
media/libvpx/libvpx/tools/author_first_release.sh
media/libvpx/libvpx/tools/cpplint.py
media/libvpx/libvpx/tools/ftfy.sh
media/libvpx/libvpx/tools/gen_authors.sh
media/libvpx/libvpx/tools/intersect-diffs.py
media/libvpx/libvpx/tools/lint-hunks.py
media/libvpx/libvpx/tools/vpx-astyle.sh
media/libvpx/libvpx/tools/wrap-commit-msg.py
media/libvpx/libvpx/vp8/common/arm/armv6/bilinearfilter_v6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/copymem16x16_v6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/copymem8x4_v6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/copymem8x8_v6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/dc_only_idct_add_v6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/dequant_idct_v6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/dequantize_v6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/filter_v6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/idct_blk_v6.c
media/libvpx/libvpx/vp8/common/arm/armv6/idct_v6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/intra4x4_predict_v6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/iwalsh_v6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/loopfilter_v6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/simpleloopfilter_v6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/sixtappredict8x4_v6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_h_armv6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_hv_armv6.asm
media/libvpx/libvpx/vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_v_armv6.asm
media/libvpx/libvpx/vp8/common/arm/bilinearfilter_arm.c
media/libvpx/libvpx/vp8/common/arm/bilinearfilter_arm.h
media/libvpx/libvpx/vp8/common/arm/dequantize_arm.c
media/libvpx/libvpx/vp8/common/arm/filter_arm.c
media/libvpx/libvpx/vp8/common/arm/neon/loopfilter_neon.c
media/libvpx/libvpx/vp8/common/arm/neon/reconintra_neon.c
media/libvpx/libvpx/vp8/common/arm/neon/vp8_subpixelvariance_neon.c
media/libvpx/libvpx/vp8/common/arm/variance_arm.c
media/libvpx/libvpx/vp8/common/loopfilter.c
media/libvpx/libvpx/vp8/common/mips/dspr2/loopfilter_filters_dspr2.c
media/libvpx/libvpx/vp8/common/textblit.c
media/libvpx/libvpx/vp8/common/variance.h
media/libvpx/libvpx/vp8/common/variance_c.c
media/libvpx/libvpx/vp8/common/x86/iwalsh_mmx.asm
media/libvpx/libvpx/vp8/common/x86/loopfilter_mmx.asm
media/libvpx/libvpx/vp8/common/x86/postproc_mmx.asm
media/libvpx/libvpx/vp8/common/x86/postproc_sse2.asm
media/libvpx/libvpx/vp8/common/x86/recon_wrapper_sse2.c
media/libvpx/libvpx/vp8/common/x86/variance_impl_sse2.asm
media/libvpx/libvpx/vp8/common/x86/variance_impl_ssse3.asm
media/libvpx/libvpx/vp8/common/x86/variance_ssse3.c
media/libvpx/libvpx/vp8/common/x86/vp8_variance_impl_mmx.asm
media/libvpx/libvpx/vp8/common/x86/vp8_variance_mmx.c
media/libvpx/libvpx/vp8/common/x86/vp8_variance_sse2.c
media/libvpx/libvpx/vp8/encoder/arm/armv6/vp8_short_fdct4x4_armv6.asm
media/libvpx/libvpx/vp8/encoder/arm/armv6/walsh_v6.asm
media/libvpx/libvpx/vp8/encoder/arm/dct_arm.c
media/libvpx/libvpx/vp8/encoder/arm/neon/subtract_neon.c
media/libvpx/libvpx/vp8/encoder/quantize.c
media/libvpx/libvpx/vp8/encoder/ssim.c
media/libvpx/libvpx/vp8/encoder/x86/dct_mmx.asm
media/libvpx/libvpx/vp8/encoder/x86/quantize_sse2.c
media/libvpx/libvpx/vp8/encoder/x86/ssim_opt_x86_64.asm
media/libvpx/libvpx/vp8/encoder/x86/subtract_mmx.asm
media/libvpx/libvpx/vp8/encoder/x86/subtract_sse2.asm
media/libvpx/libvpx/vp8/vp8cx_arm.mk
media/libvpx/libvpx/vp9/common/arm/neon/vp9_convolve8_avg_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_convolve8_avg_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_convolve8_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_convolve8_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_convolve_avg_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_convolve_avg_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_convolve_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_copy_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_copy_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct16x16_1_add_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct16x16_1_add_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct16x16_add_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct16x16_add_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct16x16_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct32x32_1_add_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct32x32_1_add_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct32x32_add_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct32x32_add_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct4x4_1_add_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct4x4_1_add_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct4x4_add_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct4x4_add_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct8x8_1_add_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct8x8_1_add_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct8x8_add_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_idct8x8_add_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_loopfilter_16_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_loopfilter_16_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_loopfilter_4_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_loopfilter_4_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_loopfilter_8_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_loopfilter_8_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_loopfilter_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_mb_lpf_neon.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_reconintra_neon.c
media/libvpx/libvpx/vp9/common/arm/neon/vp9_reconintra_neon_asm.asm
media/libvpx/libvpx/vp9/common/arm/neon/vp9_save_reg_neon.asm
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_common_dspr2.h
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_convolve2_avg_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_convolve2_avg_horiz_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_convolve2_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_convolve2_horiz_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_convolve2_vert_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_convolve8_avg_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_convolve8_avg_horiz_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_convolve8_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_convolve8_horiz_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_convolve8_vert_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_intrapred16_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_intrapred4_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_intrapred8_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_itrans32_cols_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_itrans32_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_loopfilter_filters_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_loopfilter_filters_dspr2.h
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_loopfilter_macros_dspr2.h
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_loopfilter_masks_dspr2.h
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_mbloop_loopfilter_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_mblpf_horiz_loopfilter_dspr2.c
media/libvpx/libvpx/vp9/common/mips/dspr2/vp9_mblpf_vert_loopfilter_dspr2.c
media/libvpx/libvpx/vp9/common/mips/msa/vp9_convolve8_avg_horiz_msa.c
media/libvpx/libvpx/vp9/common/mips/msa/vp9_convolve8_avg_msa.c
media/libvpx/libvpx/vp9/common/mips/msa/vp9_convolve8_avg_vert_msa.c
media/libvpx/libvpx/vp9/common/mips/msa/vp9_convolve8_horiz_msa.c
media/libvpx/libvpx/vp9/common/mips/msa/vp9_convolve8_msa.c
media/libvpx/libvpx/vp9/common/mips/msa/vp9_convolve8_vert_msa.c
media/libvpx/libvpx/vp9/common/mips/msa/vp9_convolve_avg_msa.c
media/libvpx/libvpx/vp9/common/mips/msa/vp9_convolve_copy_msa.c
media/libvpx/libvpx/vp9/common/mips/msa/vp9_convolve_msa.h
media/libvpx/libvpx/vp9/common/mips/msa/vp9_idct32x32_msa.c
media/libvpx/libvpx/vp9/common/mips/msa/vp9_idct_msa.h
media/libvpx/libvpx/vp9/common/mips/msa/vp9_loopfilter_16_msa.c
media/libvpx/libvpx/vp9/common/mips/msa/vp9_loopfilter_4_msa.c
media/libvpx/libvpx/vp9/common/mips/msa/vp9_loopfilter_8_msa.c
media/libvpx/libvpx/vp9/common/mips/msa/vp9_loopfilter_msa.h
media/libvpx/libvpx/vp9/common/mips/msa/vp9_macros_msa.h
media/libvpx/libvpx/vp9/common/vp9_convolve.c
media/libvpx/libvpx/vp9/common/vp9_convolve.h
media/libvpx/libvpx/vp9/common/vp9_loopfilter_filters.c
media/libvpx/libvpx/vp9/common/vp9_prob.c
media/libvpx/libvpx/vp9/common/vp9_prob.h
media/libvpx/libvpx/vp9/common/vp9_systemdependent.h
media/libvpx/libvpx/vp9/common/vp9_textblit.c
media/libvpx/libvpx/vp9/common/vp9_textblit.h
media/libvpx/libvpx/vp9/common/vp9_thread.c
media/libvpx/libvpx/vp9/common/vp9_thread.h
media/libvpx/libvpx/vp9/common/x86/convolve.h
media/libvpx/libvpx/vp9/common/x86/vp9_asm_stubs.c
media/libvpx/libvpx/vp9/common/x86/vp9_copy_sse2.asm
media/libvpx/libvpx/vp9/common/x86/vp9_high_intrapred_sse2.asm
media/libvpx/libvpx/vp9/common/x86/vp9_high_loopfilter_intrin_sse2.c
media/libvpx/libvpx/vp9/common/x86/vp9_high_subpixel_8t_sse2.asm
media/libvpx/libvpx/vp9/common/x86/vp9_high_subpixel_bilinear_sse2.asm
media/libvpx/libvpx/vp9/common/x86/vp9_idct_intrin_sse2.h
media/libvpx/libvpx/vp9/common/x86/vp9_idct_ssse3_x86_64.asm
media/libvpx/libvpx/vp9/common/x86/vp9_intrapred_sse2.asm
media/libvpx/libvpx/vp9/common/x86/vp9_intrapred_ssse3.asm
media/libvpx/libvpx/vp9/common/x86/vp9_loopfilter_intrin_avx2.c
media/libvpx/libvpx/vp9/common/x86/vp9_loopfilter_intrin_sse2.c
media/libvpx/libvpx/vp9/common/x86/vp9_loopfilter_mmx.asm
media/libvpx/libvpx/vp9/common/x86/vp9_postproc_sse2.asm
media/libvpx/libvpx/vp9/common/x86/vp9_subpixel_8t_intrin_avx2.c
media/libvpx/libvpx/vp9/common/x86/vp9_subpixel_8t_intrin_ssse3.c
media/libvpx/libvpx/vp9/common/x86/vp9_subpixel_8t_sse2.asm
media/libvpx/libvpx/vp9/common/x86/vp9_subpixel_8t_ssse3.asm
media/libvpx/libvpx/vp9/common/x86/vp9_subpixel_bilinear_sse2.asm
media/libvpx/libvpx/vp9/common/x86/vp9_subpixel_bilinear_ssse3.asm
media/libvpx/libvpx/vp9/decoder/vp9_read_bit_buffer.c
media/libvpx/libvpx/vp9/decoder/vp9_read_bit_buffer.h
media/libvpx/libvpx/vp9/decoder/vp9_reader.c
media/libvpx/libvpx/vp9/decoder/vp9_reader.h
media/libvpx/libvpx/vp9/encoder/arm/neon/vp9_subtract_neon.c
media/libvpx/libvpx/vp9/encoder/arm/neon/vp9_variance_neon.c
media/libvpx/libvpx/vp9/encoder/arm/neon/vp9enc_avg_neon.c
media/libvpx/libvpx/vp9/encoder/vp9_avg.c
media/libvpx/libvpx/vp9/encoder/vp9_dct.h
media/libvpx/libvpx/vp9/encoder/vp9_fastssim.c
media/libvpx/libvpx/vp9/encoder/vp9_psnrhvs.c
media/libvpx/libvpx/vp9/encoder/vp9_ssim.c
media/libvpx/libvpx/vp9/encoder/vp9_ssim.h
media/libvpx/libvpx/vp9/encoder/vp9_variance.c
media/libvpx/libvpx/vp9/encoder/vp9_variance.h
media/libvpx/libvpx/vp9/encoder/vp9_write_bit_buffer.c
media/libvpx/libvpx/vp9/encoder/vp9_write_bit_buffer.h
media/libvpx/libvpx/vp9/encoder/vp9_writer.c
media/libvpx/libvpx/vp9/encoder/vp9_writer.h
media/libvpx/libvpx/vp9/encoder/x86/vp9_avg_intrin_sse2.c
media/libvpx/libvpx/vp9/encoder/x86/vp9_dct32x32_avx2_impl.h
media/libvpx/libvpx/vp9/encoder/x86/vp9_dct32x32_sse2_impl.h
media/libvpx/libvpx/vp9/encoder/x86/vp9_dct_avx2.c
media/libvpx/libvpx/vp9/encoder/x86/vp9_dct_mmx.asm
media/libvpx/libvpx/vp9/encoder/x86/vp9_dct_sse2.c
media/libvpx/libvpx/vp9/encoder/x86/vp9_dct_sse2.h
media/libvpx/libvpx/vp9/encoder/x86/vp9_dct_sse2_impl.h
media/libvpx/libvpx/vp9/encoder/x86/vp9_dct_ssse3_x86_64.asm
media/libvpx/libvpx/vp9/encoder/x86/vp9_highbd_quantize_intrin_sse2.c
media/libvpx/libvpx/vp9/encoder/x86/vp9_highbd_subpel_variance.asm
media/libvpx/libvpx/vp9/encoder/x86/vp9_highbd_variance_sse2.c
media/libvpx/libvpx/vp9/encoder/x86/vp9_ssim_opt_x86_64.asm
media/libvpx/libvpx/vp9/encoder/x86/vp9_subpel_variance.asm
media/libvpx/libvpx/vp9/encoder/x86/vp9_subpel_variance_impl_intrin_avx2.c
media/libvpx/libvpx/vp9/encoder/x86/vp9_subtract_sse2.asm
media/libvpx/libvpx/vp9/encoder/x86/vp9_variance_avx2.c
media/libvpx/libvpx/vp9/encoder/x86/vp9_variance_sse2.c
media/libvpx/libvpx/vpx/internal/vpx_psnr.h
media/libvpx/libvpx/vpx/src/vpx_psnr.c
media/libvpx/libvpx/vpx_dsp/arm/sad_media.asm
media/libvpx/libvpx/vpx_dsp/arm/variance_media.asm
media/libvpx/libvpx/vpx_dsp/x86/sad_mmx.asm
media/libvpx/libvpx/vpx_dsp/x86/variance_impl_mmx.asm
media/libvpx/libvpx/vpx_dsp/x86/variance_mmx.c
media/libvpx/lint_config.sh
media/libvpx/vp9_filter_restore_aligment.patch
media/libvpx/vpx_once.patch
mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/ProgressiveUpdateData.java
modules/libjar/zipwriter/test/unit/tail_zipwriter.js
modules/libpref/init/all.js
testing/web-platform/meta/dom/nodes/rootNode.html.ini
testing/web-platform/meta/eventsource/dedicated-worker/eventsource-close.htm.ini
testing/web-platform/meta/eventsource/dedicated-worker/eventsource-constructor-non-same-origin.htm.ini
testing/web-platform/meta/eventsource/dedicated-worker/eventsource-constructor-url-bogus.htm.ini
testing/web-platform/meta/eventsource/dedicated-worker/eventsource-eventtarget.worker.js.ini
testing/web-platform/meta/eventsource/dedicated-worker/eventsource-onmesage.htm.ini
testing/web-platform/meta/eventsource/dedicated-worker/eventsource-onopen.htm.ini
testing/web-platform/meta/eventsource/dedicated-worker/eventsource-prototype.htm.ini
testing/web-platform/meta/eventsource/dedicated-worker/eventsource-url.htm.ini
testing/web-platform/meta/eventsource/shared-worker/eventsource-close.htm.ini
testing/web-platform/meta/eventsource/shared-worker/eventsource-constructor-non-same-origin.htm.ini
testing/web-platform/meta/eventsource/shared-worker/eventsource-constructor-url-bogus.htm.ini
testing/web-platform/meta/eventsource/shared-worker/eventsource-eventtarget.htm.ini
testing/web-platform/meta/eventsource/shared-worker/eventsource-onmesage.htm.ini
testing/web-platform/meta/eventsource/shared-worker/eventsource-onopen.htm.ini
testing/web-platform/meta/eventsource/shared-worker/eventsource-prototype.htm.ini
testing/web-platform/meta/eventsource/shared-worker/eventsource-url.htm.ini
testing/web-platform/meta/html/semantics/selectors/pseudo-classes/inrange-outofrange.html.ini
toolkit/components/extensions/test/mochitest/test_chrome_ext_shutdown_cleanup.html
toolkit/components/url-classifier/tests/unit/tail_urlclassifier.js
toolkit/content/gmp-sources/eme-adobe.json
toolkit/identity/tests/unit/tail_identity.js
tools/profiler/core/IntelPowerGadget.cpp
tools/profiler/core/IntelPowerGadget.h
uriloader/exthandler/tests/unit/tail_handlerService.js
widget/GfxInfoBase.cpp
xpcom/build/FrozenFunctions.cpp
xpcom/glue/staticruntime/moz.build
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,17 +1,17 @@
 # Always ignore node_modules.
 **/node_modules/**/*.*
 
 # Exclude expected objdirs.
 obj*/**
 
 # We ignore all these directories by default, until we get them enabled.
 # If you are enabling a directory, please add directory specific exclusions
-# below.
+# below.
 addon-sdk/**
 build/**
 caps/**
 chrome/**
 config/**
 db/**
 docshell/**
 dom/**
@@ -85,38 +85,34 @@ devtools/client/framework/**
 !devtools/client/framework/toolbox.js
 devtools/client/netmonitor/test/**
 devtools/client/netmonitor/har/test/**
 devtools/client/projecteditor/**
 devtools/client/responsivedesign/**
 devtools/client/scratchpad/**
 devtools/client/shadereditor/**
 devtools/client/shared/*.jsm
+devtools/client/shared/components/reps/reps.js
 devtools/client/shared/webgl-utils.js
 devtools/client/shared/widgets/*.jsm
 devtools/client/webaudioeditor/**
 devtools/client/webconsole/net/**
 devtools/client/webconsole/test/**
 devtools/client/webconsole/console-output.js
 devtools/client/webconsole/hudservice.js
 devtools/client/webconsole/utils.js
 devtools/client/webconsole/webconsole-connection-proxy.js
 devtools/client/webconsole/webconsole.js
 devtools/client/webide/**
 !devtools/client/webide/components/webideCli.js
-devtools/server/actors/*.js
-!devtools/server/actors/csscoverage.js
-!devtools/server/actors/inspector.js
-!devtools/server/actors/layout.js
-!devtools/server/actors/string.js
-!devtools/server/actors/styles.js
-!devtools/server/actors/tab.js
-!devtools/server/actors/webbrowser.js
-!devtools/server/actors/webextension.js
-!devtools/server/actors/webextension-inspected-window.js
+devtools/server/actors/webconsole.js
+devtools/server/actors/object.js
+devtools/server/actors/script.js
+devtools/server/actors/styleeditor.js
+devtools/server/actors/stylesheets.js
 devtools/server/tests/browser/**
 !devtools/server/tests/browser/browser_webextension_inspected_window.js
 devtools/server/tests/mochitest/**
 devtools/server/tests/unit/**
 devtools/shared/heapsnapshot/**
 devtools/shared/transport/tests/unit/**
 devtools/shared/webconsole/test/**
 
--- a/CLOBBER
+++ b/CLOBBER
@@ -17,9 +17,9 @@
 #
 # Modifying this file will now automatically clobber the buildbot machines \o/
 #
 
 # Are you updating CLOBBER because you think it's needed for your WebIDL
 # changes to stick? As of bug 928195, this shouldn't be necessary! Please
 # don't change CLOBBER for WebIDL changes any more.
 
-Bug 1328744 libvpx sources moved directories
+Bug 1223692 vp8/common/loopfilter.c removed.
--- a/accessible/base/DocManager.cpp
+++ b/accessible/base/DocManager.cpp
@@ -516,44 +516,16 @@ DocManager::CreateDocOrRootAccessible(ns
     // the tree. The reorder event is delivered after the document tree is
     // constructed because event processing and tree construction are done by
     // the same document.
     // Note: don't use AccReorderEvent to avoid coalsecense and special reorder
     // events processing.
     docAcc->FireDelayedEvent(nsIAccessibleEvent::EVENT_REORDER,
                              ApplicationAcc());
 
-    if (IPCAccessibilityActive()) {
-      nsIDocShell* docShell = aDocument->GetDocShell();
-      if (docShell) {
-        nsCOMPtr<nsITabChild> tabChild = docShell->GetTabChild();
-
-        // XXX We may need to handle the case that we don't have a tab child
-        // differently.  It may be that this will cause us to fail to notify
-        // the parent process about important accessible documents.
-        if (tabChild) {
-          DocAccessibleChild* ipcDoc = new DocAccessibleChild(docAcc);
-          docAcc->SetIPCDoc(ipcDoc);
-
-#if defined(XP_WIN)
-          IAccessibleHolder holder(CreateHolderFromAccessible(docAcc));
-#endif
-
-          static_cast<TabChild*>(tabChild.get())->
-            SendPDocAccessibleConstructor(ipcDoc, nullptr, 0,
-#if defined(XP_WIN)
-                                          AccessibleWrap::GetChildIDFor(docAcc),
-                                          holder
-#else
-                                          0, 0
-#endif
-                                          );
-        }
-      }
-    }
   } else {
     parentDocAcc->BindChildDocument(docAcc);
   }
 
 #ifdef A11Y_LOG
   if (logging::IsEnabled(logging::eDocCreate)) {
     logging::DocCreate("document creation finished", aDocument);
     logging::Stack();
--- a/accessible/base/nsAccessibilityService.h
+++ b/accessible/base/nsAccessibilityService.h
@@ -338,22 +338,17 @@ nsAccessibilityService* GetOrCreateAccSe
 void MaybeShutdownAccService(uint32_t aFormerConsumer);
 
 /**
  * Return true if we're in a content process and not B2G.
  */
 inline bool
 IPCAccessibilityActive()
 {
-#ifdef MOZ_B2G
-  return false;
-#else
-  return XRE_IsContentProcess() &&
-    mozilla::Preferences::GetBool("accessibility.ipc_architecture.enabled", true);
-#endif
+  return XRE_IsContentProcess();
 }
 
 /**
  * Map nsIAccessibleEvents constants to strings. Used by
  * nsAccessibilityService::GetStringEventType() method.
  */
 static const char kEventTypeNames[][40] = {
   "unknown",                                 //
--- a/accessible/generic/DocAccessible.cpp
+++ b/accessible/generic/DocAccessible.cpp
@@ -41,16 +41,17 @@
 #include "nsIScrollableFrame.h"
 #include "nsUnicharUtils.h"
 #include "nsIURI.h"
 #include "nsIWebNavigation.h"
 #include "nsFocusManager.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/EventStates.h"
+#include "mozilla/dom/TabChild.h"
 #include "mozilla/dom/DocumentType.h"
 #include "mozilla/dom/Element.h"
 
 #ifdef MOZ_XUL
 #include "nsIXULDocument.h"
 #endif
 
 using namespace mozilla;
@@ -1455,18 +1456,35 @@ DocAccessible::NotifyOfLoading(bool aIsR
   RefPtr<AccEvent> stateEvent =
     new AccStateChangeEvent(this, states::BUSY, true);
   FireDelayedEvent(stateEvent);
 }
 
 void
 DocAccessible::DoInitialUpdate()
 {
-  if (nsCoreUtils::IsTabDocument(mDocumentNode))
+  if (nsCoreUtils::IsTabDocument(mDocumentNode)) {
     mDocFlags |= eTabDocument;
+    if (IPCAccessibilityActive()) {
+      nsIDocShell* docShell = mDocumentNode->GetDocShell();
+      if (RefPtr<dom::TabChild> tabChild = dom::TabChild::GetFrom(docShell)) {
+        DocAccessibleChild* ipcDoc = new DocAccessibleChild(this);
+        SetIPCDoc(ipcDoc);
+
+#if defined(XP_WIN)
+        IAccessibleHolder holder(CreateHolderFromAccessible(this));
+        int32_t childID = AccessibleWrap::GetChildIDFor(this);
+#else
+        int32_t holder = 0, childID = 0;
+#endif
+        tabChild->SendPDocAccessibleConstructor(ipcDoc, nullptr, 0, childID,
+                                                holder);
+      }
+    }
+  }
 
   mLoadState |= eTreeConstructed;
 
   // Set up a root element and ARIA role mapping.
   UpdateRootElIfNeeded();
 
   // Build initial tree.
   CacheChildrenInSubtree(this);
--- a/accessible/ipc/DocAccessibleParent.cpp
+++ b/accessible/ipc/DocAccessibleParent.cpp
@@ -186,16 +186,20 @@ DocAccessibleParent::RecvHideEvent(const
   }
 
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 DocAccessibleParent::RecvEvent(const uint64_t& aID, const uint32_t& aEventType)
 {
+  if (mShutdown) {
+    return IPC_OK();
+  }
+
   ProxyAccessible* proxy = GetAccessible(aID);
   if (!proxy) {
     NS_ERROR("no proxy for event!");
     return IPC_OK();
   }
 
   ProxyEvent(proxy, aEventType);
 
@@ -214,16 +218,20 @@ DocAccessibleParent::RecvEvent(const uin
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 DocAccessibleParent::RecvStateChangeEvent(const uint64_t& aID,
                                           const uint64_t& aState,
                                           const bool& aEnabled)
 {
+  if (mShutdown) {
+    return IPC_OK();
+  }
+
   ProxyAccessible* target = GetAccessible(aID);
   if (!target) {
     NS_ERROR("we don't know about the target of a state change event!");
     return IPC_OK();
   }
 
   ProxyStateChangeEvent(target, aState, aEnabled);
 
@@ -244,16 +252,20 @@ DocAccessibleParent::RecvStateChangeEven
   nsCoreUtils::DispatchAccEvent(Move(event));
 
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 DocAccessibleParent::RecvCaretMoveEvent(const uint64_t& aID, const int32_t& aOffset)
 {
+  if (mShutdown) {
+    return IPC_OK();
+  }
+
   ProxyAccessible* proxy = GetAccessible(aID);
   if (!proxy) {
     NS_ERROR("unknown caret move event target!");
     return IPC_OK();
   }
 
   ProxyCaretMoveEvent(proxy, aOffset);
 
@@ -276,16 +288,20 @@ DocAccessibleParent::RecvCaretMoveEvent(
 mozilla::ipc::IPCResult
 DocAccessibleParent::RecvTextChangeEvent(const uint64_t& aID,
                                          const nsString& aStr,
                                          const int32_t& aStart,
                                          const uint32_t& aLen,
                                          const bool& aIsInsert,
                                          const bool& aFromUser)
 {
+  if (mShutdown) {
+    return IPC_OK();
+  }
+
   ProxyAccessible* target = GetAccessible(aID);
   if (!target) {
     NS_ERROR("text change event target is unknown!");
     return IPC_OK();
   }
 
   ProxyTextChangeEvent(target, aStr, aStart, aLen, aIsInsert, aFromUser);
 
@@ -306,16 +322,20 @@ DocAccessibleParent::RecvTextChangeEvent
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 DocAccessibleParent::RecvSelectionEvent(const uint64_t& aID,
                                         const uint64_t& aWidgetID,
                                         const uint32_t& aType)
 {
+  if (mShutdown) {
+    return IPC_OK();
+  }
+
   ProxyAccessible* target = GetAccessible(aID);
   ProxyAccessible* widget = GetAccessible(aWidgetID);
   if (!target || !widget) {
     NS_ERROR("invalid id in selection event");
     return IPC_OK();
   }
 
   ProxySelectionEvent(target, widget, aType);
@@ -329,78 +349,82 @@ DocAccessibleParent::RecvSelectionEvent(
   nsCoreUtils::DispatchAccEvent(Move(event));
 
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 DocAccessibleParent::RecvRoleChangedEvent(const uint32_t& aRole)
 {
+  if (mShutdown) {
+    return IPC_OK();
+  }
+
  if (aRole >= roles::LAST_ROLE) {
    NS_ERROR("child sent bad role in RoleChangedEvent");
    return IPC_FAIL_NO_REASON(this);
  }
 
  mRole = static_cast<a11y::role>(aRole);
  return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 DocAccessibleParent::RecvBindChildDoc(PDocAccessibleParent* aChildDoc, const uint64_t& aID)
 {
   // One document should never directly be the child of another.
   // We should always have at least an outer doc accessible in between.
   MOZ_ASSERT(aID);
   if (!aID)
-    return IPC_FAIL_NO_REASON(this);
+    return IPC_FAIL(this, "ID is 0!");
 
   MOZ_DIAGNOSTIC_ASSERT(CheckDocTree());
 
   auto childDoc = static_cast<DocAccessibleParent*>(aChildDoc);
   childDoc->Unbind();
-  bool result = AddChildDoc(childDoc, aID, false);
+  ipc::IPCResult result = AddChildDoc(childDoc, aID, false);
   MOZ_ASSERT(result);
   MOZ_DIAGNOSTIC_ASSERT(CheckDocTree());
   if (!result) {
-    return IPC_FAIL_NO_REASON(this);
+    return result;
   }
   return IPC_OK();
 }
 
-bool
+ipc::IPCResult
 DocAccessibleParent::AddChildDoc(DocAccessibleParent* aChildDoc,
                                  uint64_t aParentID, bool aCreating)
 {
   // We do not use GetAccessible here because we want to be sure to not get the
   // document it self.
   ProxyEntry* e = mAccessibles.GetEntry(aParentID);
   if (!e)
-    return false;
+    return IPC_FAIL(this, "binding to nonexistant proxy!");
 
   ProxyAccessible* outerDoc = e->mProxy;
   MOZ_ASSERT(outerDoc);
 
   // OuterDocAccessibles are expected to only have a document as a child.
   // However for compatibility we tolerate replacing one document with another
   // here.
   if (outerDoc->ChildrenCount() > 1 ||
       (outerDoc->ChildrenCount() == 1 && !outerDoc->ChildAt(0)->IsDoc())) {
-    return false;
+    return IPC_FAIL(this, "binding to proxy that can't be a outerDoc!");
   }
 
   aChildDoc->mParent = outerDoc;
   outerDoc->SetChildDoc(aChildDoc);
   mChildDocs.AppendElement(aChildDoc);
   aChildDoc->mParentDoc = this;
 
   if (aCreating) {
     ProxyCreated(aChildDoc, Interfaces::DOCUMENT | Interfaces::HYPERTEXT);
   }
 
-  return true;
+  return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 DocAccessibleParent::RecvShutdown()
 {
   Destroy();
 
   auto mgr = static_cast<dom::TabParent*>(Manager());
@@ -431,16 +455,21 @@ DocAccessibleParent::Destroy()
     mChildDocs[i]->Destroy();
 
   for (auto iter = mAccessibles.Iter(); !iter.Done(); iter.Next()) {
     MOZ_ASSERT(iter.Get()->mProxy != this);
     ProxyDestroyed(iter.Get()->mProxy);
     iter.Remove();
   }
 
+  // The code above should have already completely cleared these, but to be
+  // extra safe make sure they are cleared here.
+  mAccessibles.Clear();
+  mChildDocs.Clear();
+
   DocManager::NotifyOfRemoteDocShutdown(this);
   ProxyDestroyed(this);
   if (mParentDoc)
     mParentDoc->RemoveChildDoc(this);
   else if (IsTopLevel())
     GetAccService()->RemoteDocShutdown(this);
 }
 
--- a/accessible/ipc/DocAccessibleParent.h
+++ b/accessible/ipc/DocAccessibleParent.h
@@ -97,18 +97,18 @@ public:
    * of the document this object represents.
    */
   DocAccessibleParent* ParentDoc() const { return mParentDoc; }
 
   /*
    * Called when a document in a content process notifies the main process of a
    * new child document.
    */
-  bool AddChildDoc(DocAccessibleParent* aChildDoc, uint64_t aParentID,
-                   bool aCreating = true);
+  ipc::IPCResult AddChildDoc(DocAccessibleParent* aChildDoc,
+                             uint64_t aParentID, bool aCreating = true);
 
   /*
    * Called when the document in the content process this object represents
    * notifies the main process a child document has been removed.
    */
   void RemoveChildDoc(DocAccessibleParent* aChildDoc)
   {
     aChildDoc->Parent()->ClearChildDoc(aChildDoc);
--- a/accessible/jsat/AccessFu.jsm
+++ b/accessible/jsat/AccessFu.jsm
@@ -32,26 +32,16 @@ this.AccessFu = { // jshint ignore:line
   attach: function attach(aWindow) {
     Utils.init(aWindow);
 
     try {
       Services.androidBridge.dispatch('Accessibility:Ready');
       Services.obs.addObserver(this, 'Accessibility:Settings', false);
     } catch (x) {
       // Not on Android
-      if (aWindow.navigator.mozSettings) {
-        let lock = aWindow.navigator.mozSettings.createLock();
-        let req = lock.get(SCREENREADER_SETTING);
-        req.addEventListener('success', () => {
-          this._systemPref = req.result[SCREENREADER_SETTING];
-          this._enableOrDisable();
-        });
-        aWindow.navigator.mozSettings.addObserver(
-          SCREENREADER_SETTING, this.handleEvent);
-      }
     }
 
     this._activatePref = new PrefCache(
       'accessibility.accessfu.activate', this._enableOrDisable.bind(this));
 
     this._enableOrDisable();
   },
 
@@ -60,19 +50,16 @@ this.AccessFu = { // jshint ignore:line
    */
   detach: function detach() {
     // Avoid disabling twice.
     if (this._enabled) {
       this._disable();
     }
     if (Utils.MozBuildApp === 'mobile/android') {
       Services.obs.removeObserver(this, 'Accessibility:Settings');
-    } else if (Utils.win.navigator.mozSettings) {
-      Utils.win.navigator.mozSettings.removeObserver(
-        SCREENREADER_SETTING, this.handleEvent);
     }
     delete this._activatePref;
     Utils.uninit();
   },
 
   /**
    * A lazy getter for event handler that binds the scope to AccessFu object.
    */
--- a/accessible/jsat/Utils.jsm
+++ b/accessible/jsat/Utils.jsm
@@ -1,15 +1,15 @@
 /* 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/. */
 
 /* global Components, XPCOMUtils, Services, PluralForm, Logger, Rect, Utils,
           States, Relations, Roles, dump, Events, PivotContext, PrefCache */
-/* exported Utils, Logger, PivotContext, PrefCache, SettingCache */
+/* exported Utils, Logger, PivotContext, PrefCache */
 
 'use strict';
 
 const {classes: Cc, utils: Cu, interfaces: Ci} = Components;
 
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'Services', // jshint ignore:line
   'resource://gre/modules/Services.jsm');
@@ -21,18 +21,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   'resource://gre/modules/accessibility/Constants.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'Relations', // jshint ignore:line
   'resource://gre/modules/accessibility/Constants.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'States', // jshint ignore:line
   'resource://gre/modules/accessibility/Constants.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'PluralForm', // jshint ignore:line
   'resource://gre/modules/PluralForm.jsm');
 
-this.EXPORTED_SYMBOLS = ['Utils', 'Logger', 'PivotContext', 'PrefCache',  // jshint ignore:line
-                         'SettingCache'];
+this.EXPORTED_SYMBOLS = ['Utils', 'Logger', 'PivotContext', 'PrefCache']; // jshint ignore:line
 
 this.Utils = { // jshint ignore:line
   _buildAppMap: {
     '{3c2e2abc-06d4-11e1-ac3b-374f68613e61}': 'b2g',
     '{d1bfe7d9-c01e-4237-998b-7b5f960a4314}': 'graphene',
     '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}': 'browser',
     '{aa3c5121-dab2-40e2-81ca-7ea25febc110}': 'mobile/android',
     '{a23983c0-fd0e-11dc-95ff-0800200c9a66}': 'mobile/xul'
@@ -1069,46 +1068,8 @@ PrefCache.prototype = {
         Logger.logException(x);
       }
     }
   },
 
   QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver,
                                           Ci.nsISupportsWeakReference])
 };
-
-this.SettingCache = function SettingCache(aName, aCallback, aOptions = {}) { // jshint ignore:line
-  this.value = aOptions.defaultValue;
-  let runCallback = () => {
-    if (aCallback) {
-      aCallback(aName, this.value);
-      if (aOptions.callbackOnce) {
-        runCallback = () => {};
-      }
-    }
-  };
-
-  let settings = Utils.win.navigator.mozSettings;
-  if (!settings) {
-    if (aOptions.callbackNow) {
-      runCallback();
-    }
-    return;
-  }
-
-
-  let lock = settings.createLock();
-  let req = lock.get(aName);
-
-  req.addEventListener('success', () => {
-    this.value = req.result[aName] === undefined ?
-      aOptions.defaultValue : req.result[aName];
-    if (aOptions.callbackNow) {
-      runCallback();
-    }
-  });
-
-  settings.addObserver(aName,
-                       (evt) => {
-                         this.value = evt.settingValue;
-                         runCallback();
-                       });
-};
--- a/accessible/tests/mochitest/events/test_focus_name.html
+++ b/accessible/tests/mochitest/events/test_focus_name.html
@@ -68,30 +68,30 @@
     var gTooltipElm = null;
 
     function doTests()
     {
       gButtonElm = getNode("button");
       gTextboxElm = getNode("textbox");
       gTooltipElm = getNode("tooltip");
 
-      gButtonElm.addEventListener("focus", gFocusHandler, false);
-      gButtonElm.addEventListener("blur", gBlurHandler, false);
-      gTextboxElm.addEventListener("focus", gFocusHandler, false);
-      gTextboxElm.addEventListener("blur", gBlurHandler, false);
+      gButtonElm.addEventListener("focus", gFocusHandler);
+      gButtonElm.addEventListener("blur", gBlurHandler);
+      gTextboxElm.addEventListener("focus", gFocusHandler);
+      gTextboxElm.addEventListener("blur", gBlurHandler);
 
       // The aria-describedby is changed on DOM focus. Accessible description
       // should be updated when a11y focus is fired.
       gQueue = new eventQueue(nsIAccessibleEvent.EVENT_FOCUS);
       gQueue.onFinish = function()
       {
-        gButtonElm.removeEventListener("focus", gFocusHandler, false);
-        gButtonElm.removeEventListener("blur", gBlurHandler, false);
-        gTextboxElm.removeEventListener("focus", gFocusHandler, false);
-        gTextboxElm.removeEventListener("blur", gBlurHandler, false);
+        gButtonElm.removeEventListener("focus", gFocusHandler);
+        gButtonElm.removeEventListener("blur", gBlurHandler);
+        gTextboxElm.removeEventListener("focus", gFocusHandler);
+        gTextboxElm.removeEventListener("blur", gBlurHandler);
       }
 
       var descr = "It's a tooltip";
       gQueue.push(new synthFocus("button", new actionChecker("button", descr)));
       gQueue.push(new synthTab("textbox", new actionChecker("textbox", descr)));
 
       gQueue.invoke(); // Will call SimpleTest.finish();
     }
--- a/accessible/tests/mochitest/grid.js
+++ b/accessible/tests/mochitest/grid.js
@@ -59,18 +59,18 @@ function grid(aTableIdentifier)
           return cell;
       }
     }
     return null;
   }
 
   this.initGrid = function initGrid()
   {
-    this.table.addEventListener("keypress", this, false);
-    this.table.addEventListener("click", this, false);
+    this.table.addEventListener("keypress", this);
+    this.table.addEventListener("click", this);
   }
 
   this.handleEvent = function handleEvent(aEvent)
   {
     if (aEvent instanceof nsIDOMKeyEvent)
       this.handleKeyEvent(aEvent);
     else
       this.handleClickEvent(aEvent);
--- a/accessible/tests/mochitest/jsat/jsatcommon.js
+++ b/accessible/tests/mochitest/jsat/jsatcommon.js
@@ -144,18 +144,17 @@ var AccessFuTest = {
     AccessFu.attach(getMainChromeWindow(window));
 
     AccessFu.readyCallback = function readyCallback() {
       // Enable logging to the console service.
       Logger.test = true;
       Logger.logLevel = Logger.DEBUG;
     };
 
-    var prefs = [['accessibility.accessfu.notify_output', 1],
-      ['dom.mozSettings.enabled', true]];
+    var prefs = [['accessibility.accessfu.notify_output', 1]];
     prefs.push.apply(prefs, aAdditionalPrefs);
 
     this.originalDwellThreshold = GestureSettings.dwellThreshold;
     this.originalSwipeMaxDuration = GestureSettings.swipeMaxDuration;
     this.originalMaxGestureResolveTimeout =
       GestureSettings.maxGestureResolveTimeout;
     // https://bugzilla.mozilla.org/show_bug.cgi?id=1001945 - sometimes
     // SimpleTest.executeSoon timeout is bigger than the timer settings in
--- a/accessible/tests/mochitest/test_bug420863.html
+++ b/accessible/tests/mochitest/test_bug420863.html
@@ -41,17 +41,17 @@ https://bugzilla.mozilla.org/show_bug.cg
       var td3Node = getNode("td3");
 
       // register 'click' event handler
       gClickHandler = {
         handleEvent: function handleEvent(aEvent)
         {
         }
       };
-      td3Node.addEventListener("click", gClickHandler, false);
+      td3Node.addEventListener("click", gClickHandler);
 
       // check actions
       var actionsArray = [
         {
           ID: "td2", // "onclick" attribute
           actionName: "click",
           actionIndex: 0,
           events: CLICK_EVENTS
@@ -59,17 +59,17 @@ https://bugzilla.mozilla.org/show_bug.cg
         {
           ID: td3Node,
           actionName: "click",
           actionIndex: 0,
           events: CLICK_EVENTS,
           checkOnClickEvent: function check(aEvent)
           {
             // unregister click event handler
-            this.ID.removeEventListener("click", gClickHandler, false);
+            this.ID.removeEventListener("click", gClickHandler);
 
             // check actions
             is(getAccessible(this.ID).actionCount, 0,
                "td3 shouldn't have actions");
           }
         }
       ];
 
--- a/addon-sdk/source/lib/framescript/content.jsm
+++ b/addon-sdk/source/lib/framescript/content.jsm
@@ -69,17 +69,17 @@ cpmm.addMessageListener('sdk/remote/proc
 })
 
 
 var frames = new Set();
 
 this.registerContentFrame = contentFrame => {
   contentFrame.addEventListener("unload", () => {
     unregisterContentFrame(contentFrame);
-  }, false);
+  });
 
   frames.add(contentFrame);
 
   for (let addon of addons.values()) {
     if ("child" in addon)
       addon.child.registerContentFrame(contentFrame);
   }
 };
--- a/addon-sdk/source/lib/sdk/addon/window.js
+++ b/addon-sdk/source/lib/sdk/addon/window.js
@@ -47,19 +47,19 @@ docShell.createAboutBlankContentViewer(a
 // are necessary for hidden frames etc..
 var window = docShell.contentViewer.DOMDocument.defaultView;
 window.location = "data:application/vnd.mozilla.xul+xml;charset=utf-8,<window/>";
 
 // Create a promise that is delivered once add-on window is interactive,
 // used by add-on runner to defer add-on loading until window is ready.
 var { promise, resolve } = defer();
 eventTarget.addEventListener("DOMContentLoaded", function handler(event) {
-  eventTarget.removeEventListener("DOMContentLoaded", handler, false);
+  eventTarget.removeEventListener("DOMContentLoaded", handler);
   resolve();
-}, false);
+});
 
 exports.ready = promise;
 exports.window = window;
 
 // Still close window on unload to claim memory back early.
 unload(function() {
   window.close()
   frame.parentNode.removeChild(frame);
--- a/addon-sdk/source/lib/sdk/content/l10n-html.js
+++ b/addon-sdk/source/lib/sdk/content/l10n-html.js
@@ -65,18 +65,17 @@ function translateElement(element) {
 
     translateElementAttributes(child);
   }
 }
 exports.translateElement = translateElement;
 
 function onDocumentReady2Translate(event) {
   let document = event.target;
-  document.removeEventListener("DOMContentLoaded", onDocumentReady2Translate,
-                               false);
+  document.removeEventListener("DOMContentLoaded", onDocumentReady2Translate);
 
   translateElement(document);
 
   try {
     // Finally display document when we finished replacing all text content
     if (document.defaultView)
       removeSheet(document.defaultView, hideSheetUri, 'user');
   }
@@ -103,18 +102,17 @@ function onContentWindow(document) {
     // First hide content of the document in order to have content blinking
     // between untranslated and translated states
     loadSheet(document.defaultView, hideSheetUri, 'user');
   }
   catch(e) {
     console.exception(e);
   }
   // Wait for DOM tree to be built before applying localization
-  document.addEventListener("DOMContentLoaded", onDocumentReady2Translate,
-                            false);
+  document.addEventListener("DOMContentLoaded", onDocumentReady2Translate);
 }
 
 // Listen to creation of content documents in order to translate them as soon
 // as possible in their loading process
 const ON_CONTENT = "document-element-inserted";
 let enabled = false;
 function enable() {
   if (enabled)
--- a/addon-sdk/source/lib/sdk/context-menu.js
+++ b/addon-sdk/source/lib/sdk/context-menu.js
@@ -703,21 +703,21 @@ var MenuWrapper = Class({
     this.populated = false;
     this.menuMap = new Map();
 
     // updateItemVisibilities will run first, updateOverflowState will run after
     // all other instances of this module have run updateItemVisibilities
     this._updateItemVisibilities = this.updateItemVisibilities.bind(this);
     this.contextMenu.addEventListener("popupshowing", this._updateItemVisibilities, true);
     this._updateOverflowState = this.updateOverflowState.bind(this);
-    this.contextMenu.addEventListener("popupshowing", this._updateOverflowState, false);
+    this.contextMenu.addEventListener("popupshowing", this._updateOverflowState);
   },
 
   destroy: function destroy() {
-    this.contextMenu.removeEventListener("popupshowing", this._updateOverflowState, false);
+    this.contextMenu.removeEventListener("popupshowing", this._updateOverflowState);
     this.contextMenu.removeEventListener("popupshowing", this._updateItemVisibilities, true);
 
     if (!this.populated)
       return;
 
     // If we're getting unloaded at runtime then we must remove all the
     // generated XUL nodes
     let oldParent = null;
@@ -877,17 +877,17 @@ var MenuWrapper = Class({
 
       let self = this;
       xulNode.addEventListener("command", function(event) {
         // Only care about clicks directly on this item
         if (event.target !== xulNode)
           return;
 
         itemActivated(item, xulNode);
-      }, false);
+      });
     }
 
     this.insertIntoXUL(item, xulNode, after);
     this.updateXULClass(xulNode);
     xulNode.data = item.data;
 
     if (item instanceof Menu) {
       let menupopup = this.window.document.createElement("menupopup");
--- a/addon-sdk/source/lib/sdk/deprecated/unit-test.js
+++ b/addon-sdk/source/lib/sdk/deprecated/unit-test.js
@@ -313,19 +313,19 @@ TestRunner.prototype = {
     let wins = windows(null, { includePrivate: true });
     let winPromises = wins.map(win => {
       return new Promise(resolve => {
         if (["interactive", "complete"].indexOf(win.document.readyState) >= 0) {
           resolve()
         }
         else {
           win.addEventListener("DOMContentLoaded", function onLoad() {
-            win.removeEventListener("DOMContentLoaded", onLoad, false);
+            win.removeEventListener("DOMContentLoaded", onLoad);
             resolve();
-          }, false);
+          });
         }
       });
     });
 
     PromiseDebugging.flushUncaughtErrors();
     PromiseDebugging.removeUncaughtErrorObserver(this._uncaughtErrorObserver);
 
 
--- a/addon-sdk/source/lib/sdk/frame/hidden-frame.js
+++ b/addon-sdk/source/lib/sdk/frame/hidden-frame.js
@@ -26,20 +26,20 @@ var cache = new Set();
 var elements = new WeakMap();
 
 function contentLoaded(target) {
   var deferred = defer();
   target.addEventListener("DOMContentLoaded", function DOMContentLoaded(event) {
     // "DOMContentLoaded" events from nested frames propagate up to target,
     // ignore events unless it's DOMContentLoaded for the given target.
     if (event.target === target || event.target === target.contentDocument) {
-      target.removeEventListener("DOMContentLoaded", DOMContentLoaded, false);
+      target.removeEventListener("DOMContentLoaded", DOMContentLoaded);
       deferred.resolve(target);
     }
-  }, false);
+  });
   return deferred.promise;
 }
 
 function FrameOptions(options) {
   options = options || {}
   return validateOptions(options, FrameOptions.validator);
 }
 FrameOptions.validator = {
--- a/addon-sdk/source/lib/sdk/panel.js
+++ b/addon-sdk/source/lib/sdk/panel.js
@@ -142,17 +142,17 @@ var SinglePanelManager = {
       SinglePanelManager.notifyPanelCanOpen(panelToOpen, callback);
     }
   },
   notifyPanelCanOpen: function(panel, callback) {
     let view = viewFor(panel);
     // Can't pass an arrow function as the event handler because we need to be
     // able to call |removeEventListener| later.
     view.addEventListener("popuphidden", SinglePanelManager.onVisiblePanelHidden, true);
-    view.addEventListener("popupshown", SinglePanelManager.onVisiblePanelShown, false);
+    view.addEventListener("popupshown", SinglePanelManager.onVisiblePanelShown);
     SinglePanelManager.enqueuedPanel = null;
     SinglePanelManager.enqueuedPanelCallback = null;
     SinglePanelManager.visiblePanel = Cu.getWeakReference(panel);
     callback();
   },
   onVisiblePanelShown: function(event) {
     let panel = panelFor(event.target);
     if (SinglePanelManager.enqueuedPanel) {
@@ -165,17 +165,17 @@ var SinglePanelManager = {
     let view = event.target;
     let panel = panelFor(view);
     let currentPanel = getPanelFromWeakRef(SinglePanelManager.visiblePanel);
     if (currentPanel && currentPanel != panel) {
       return;
     }
     SinglePanelManager.visiblePanel = null;
     view.removeEventListener("popuphidden", SinglePanelManager.onVisiblePanelHidden, true);
-    view.removeEventListener("popupshown", SinglePanelManager.onVisiblePanelShown, false);
+    view.removeEventListener("popupshown", SinglePanelManager.onVisiblePanelShown);
     let nextPanel = getPanelFromWeakRef(SinglePanelManager.enqueuedPanel);
     let nextPanelCallback = SinglePanelManager.enqueuedPanelCallback;
     if (nextPanel) {
       SinglePanelManager.notifyPanelCanOpen(nextPanel, nextPanelCallback);
     }
   }
 };
 
--- a/addon-sdk/source/lib/sdk/panel/utils.js
+++ b/addon-sdk/source/lib/sdk/panel/utils.js
@@ -326,17 +326,17 @@ function make(document, options) {
       events.emit(type, { subject: panel })
   }
 
   panel.addEventListener("popupshowing", onPopupShowing);
   panel.addEventListener("popuphiding", onPopupHiding);
   for (let event of ["popupshowing", "popuphiding", "popupshown", "popuphidden"])
     panel.addEventListener(event, onPanelStateChange);
 
-  panel.addEventListener("click", onPanelClick, false);
+  panel.addEventListener("click", onPanelClick);
 
   // Panel content document can be either in panel `viewFrame` or in
   // a `backgroundFrame` depending on panel state. Listeners are set
   // on both to avoid setting and removing listeners on panel state changes.
 
   panel.addEventListener("DOMContentLoaded", onContentReady, true);
   backgroundFrame.addEventListener("DOMContentLoaded", onContentReady, true);
 
--- a/addon-sdk/source/lib/sdk/tabs/tab-fennec.js
+++ b/addon-sdk/source/lib/sdk/tabs/tab-fennec.js
@@ -31,29 +31,29 @@ const Tab = Class({
     let tabInternals = tabNS(this);
     rawTabNS(tab).tab = this;
 
     let window = tabInternals.window = options.window || getOwnerWindow(tab);
     tabInternals.tab = tab;
 
     // TabReady
     let onReady = tabInternals.onReady = onTabReady.bind(this);
-    tab.browser.addEventListener(EVENTS.ready.dom, onReady, false);
+    tab.browser.addEventListener(EVENTS.ready.dom, onReady);
 
     // TabPageShow
     let onPageShow = tabInternals.onPageShow = onTabPageShow.bind(this);
-    tab.browser.addEventListener(EVENTS.pageshow.dom, onPageShow, false);
+    tab.browser.addEventListener(EVENTS.pageshow.dom, onPageShow);
 
     // TabLoad
     let onLoad = tabInternals.onLoad = onTabLoad.bind(this);
     tab.browser.addEventListener(EVENTS.load.dom, onLoad, true);
 
     // TabClose
     let onClose = tabInternals.onClose = onTabClose.bind(this);
-    window.BrowserApp.deck.addEventListener(EVENTS.close.dom, onClose, false);
+    window.BrowserApp.deck.addEventListener(EVENTS.close.dom, onClose);
 
     unload(cleanupTab.bind(null, this));
   },
 
   /**
    * The title of the page currently loaded in the tab.
    * Changing this property changes an actual title.
    * @type {String}
@@ -186,24 +186,24 @@ exports.Tab = Tab;
 viewFor.define(Tab, x => tabNS(x).tab);
 
 function cleanupTab(tab) {
   let tabInternals = tabNS(tab);
   if (!tabInternals.tab)
     return;
 
   if (tabInternals.tab.browser) {
-    tabInternals.tab.browser.removeEventListener(EVENTS.ready.dom, tabInternals.onReady, false);
-    tabInternals.tab.browser.removeEventListener(EVENTS.pageshow.dom, tabInternals.onPageShow, false);
+    tabInternals.tab.browser.removeEventListener(EVENTS.ready.dom, tabInternals.onReady);
+    tabInternals.tab.browser.removeEventListener(EVENTS.pageshow.dom, tabInternals.onPageShow);
     tabInternals.tab.browser.removeEventListener(EVENTS.load.dom, tabInternals.onLoad, true);
   }
   tabInternals.onReady = null;
   tabInternals.onPageShow = null;
   tabInternals.onLoad = null;
-  tabInternals.window.BrowserApp.deck.removeEventListener(EVENTS.close.dom, tabInternals.onClose, false);
+  tabInternals.window.BrowserApp.deck.removeEventListener(EVENTS.close.dom, tabInternals.onClose);
   tabInternals.onClose = null;
   rawTabNS(tabInternals.tab).tab = null;
   tabInternals.tab = null;
   tabInternals.window = null;
 }
 
 function onTabReady(event) {
   let win = event.target.defaultView;
--- a/addon-sdk/source/lib/sdk/ui/sidebar.js
+++ b/addon-sdk/source/lib/sdk/ui/sidebar.js
@@ -87,17 +87,17 @@ const Sidebar = Class({
 
         bar.addEventListener('command', function() {
           if (isSidebarShowing(window, self)) {
             hideSidebar(window, self).catch(() => {});
             return;
           }
 
           showSidebar(window, self);
-        }, false);
+        });
 
         function onSidebarLoad() {
           // check if the sidebar is ready
           let isReady = sidebar.docShell && sidebar.contentDocument;
           if (!isReady)
             return;
 
           // check if it is a web panel
@@ -131,23 +131,23 @@ const Sidebar = Class({
             }
             windowNS(window).onWebPanelSidebarUnload = onWebPanelSidebarUnload;
             panelBrowser.contentWindow.addEventListener('unload', onWebPanelSidebarUnload, true);
 
             // check the associated menuitem
             bar.setAttribute('checked', 'true');
 
             function onWebPanelSidebarReady() {
-              panelBrowser.contentWindow.removeEventListener('DOMContentLoaded', onWebPanelSidebarReady, false);
+              panelBrowser.contentWindow.removeEventListener('DOMContentLoaded', onWebPanelSidebarReady);
               windowNS(window).onWebPanelSidebarReady = null;
 
               emit(self, 'ready', worker);
             }
             windowNS(window).onWebPanelSidebarReady = onWebPanelSidebarReady;
-            panelBrowser.contentWindow.addEventListener('DOMContentLoaded', onWebPanelSidebarReady, false);
+            panelBrowser.contentWindow.addEventListener('DOMContentLoaded', onWebPanelSidebarReady);
 
             function onWebPanelSidebarLoad() {
               panelBrowser.contentWindow.removeEventListener('load', onWebPanelSidebarLoad, true);
               windowNS(window).onWebPanelSidebarLoad = null;
 
               // TODO: decide if returning worker is acceptable..
               //emit(self, 'show', { worker: worker });
               emit(self, 'show', {});
@@ -187,17 +187,17 @@ const Sidebar = Class({
 
         let panelBrowser = sidebar && sidebar.contentDocument.getElementById(WEB_PANEL_BROWSER_ID);
         if (windowNS(window).onWebPanelSidebarCreated) {
           panelBrowser && panelBrowser.removeEventListener('DOMWindowCreated', windowNS(window).onWebPanelSidebarCreated, true);
           windowNS(window).onWebPanelSidebarCreated = null;
         }
 
         if (windowNS(window).onWebPanelSidebarReady) {
-          panelBrowser && panelBrowser.contentWindow.removeEventListener('DOMContentLoaded', windowNS(window).onWebPanelSidebarReady, false);
+          panelBrowser && panelBrowser.contentWindow.removeEventListener('DOMContentLoaded', windowNS(window).onWebPanelSidebarReady);
           windowNS(window).onWebPanelSidebarReady = null;
         }
 
         if (windowNS(window).onWebPanelSidebarLoad) {
           panelBrowser && panelBrowser.contentWindow.removeEventListener('load', windowNS(window).onWebPanelSidebarLoad, true);
           windowNS(window).onWebPanelSidebarLoad = null;
         }
 
--- a/addon-sdk/source/lib/sdk/windows/tabs-fennec.js
+++ b/addon-sdk/source/lib/sdk/windows/tabs-fennec.js
@@ -34,20 +34,20 @@ const Tabs = Class({
   initialize: function initialize(options) {
     let tabsInternals = tabsNS(this);
     let window = tabsNS(this).window = options.window || mainWindow;
 
     EventTarget.prototype.initialize.call(this, options);
     List.prototype.initialize.apply(this, getTabs(window).map(Tab));
 
     // TabOpen event
-    window.BrowserApp.deck.addEventListener(EVENTS.open.dom, onTabOpen, false);
+    window.BrowserApp.deck.addEventListener(EVENTS.open.dom, onTabOpen);
 
     // TabSelect
-    window.BrowserApp.deck.addEventListener(EVENTS.activate.dom, onTabSelect, false);
+    window.BrowserApp.deck.addEventListener(EVENTS.activate.dom, onTabSelect);
   },
   get activeTab() {
     return getTabForRawTab(getSelectedTab(tabsNS(this).window));
   },
   open: function(options) {
     options = Options(options);
     let activeWin = browserWindows.activeWindow;
 
@@ -91,18 +91,18 @@ const Tabs = Class({
   }
 });
 var gTabs = exports.tabs = Tabs(mainWindow);
 
 function tabsUnloader(event, window) {
   window = window || (event && event.target);
   if (!(window && window.BrowserApp))
     return;
-  window.BrowserApp.deck.removeEventListener(EVENTS.open.dom, onTabOpen, false);
-  window.BrowserApp.deck.removeEventListener(EVENTS.activate.dom, onTabSelect, false);
+  window.BrowserApp.deck.removeEventListener(EVENTS.open.dom, onTabOpen);
+  window.BrowserApp.deck.removeEventListener(EVENTS.activate.dom, onTabSelect);
 }
 
 // unload handler
 unload(function() {
   for (let window in windowIterator()) {
     tabsUnloader(null, window);
   }
 });
--- a/addon-sdk/source/python-lib/cuddlefish/prefs.py
+++ b/addon-sdk/source/python-lib/cuddlefish/prefs.py
@@ -211,17 +211,16 @@ DEFAULT_TEST_PREFS = {
     'security.default_personal_cert': 'Select Automatically',
     'network.http.prompt-temp-redirect': False,
     'security.warn_viewing_mixed': False,
     'extensions.defaultProviders.enabled': True,
     'datareporting.policy.dataSubmissionPolicyBypassNotification': True,
     'layout.css.report_errors': True,
     'layout.css.grid.enabled': True,
     'layout.spammy_warnings.enabled': False,
-    'dom.mozSettings.enabled': True,
     # Make sure the disk cache doesn't get auto disabled
     'network.http.bypass-cachelock-threshold': 200000,
     # Always use network provider for geolocation tests
     # so we bypass the OSX dialog raised by the corelocation provider
     'geo.provider.testing': True,
     # Background thumbnails in particular cause grief, and disabling thumbnails
     # in general can't hurt - we re-enable them when tests need them.
     'browser.pagethumbnails.capturing_disabled': True,
--- a/addon-sdk/source/test/addons/content-permissions/main.js
+++ b/addon-sdk/source/test/addons/content-permissions/main.js
@@ -17,19 +17,19 @@ exports.testCrossDomainIframe = function
   });
 
   let pageMod = PageMod({
     include: TEST_TAB_URL,
     contentScript: "new " + function ContentScriptScope() {
       self.on("message", function (url) {
         let iframe = document.createElement("iframe");
         iframe.addEventListener("load", function onload() {
-          iframe.removeEventListener("load", onload, false);
+          iframe.removeEventListener("load", onload);
           self.postMessage(iframe.contentWindow.document.body.innerHTML);
-        }, false);
+        });
         iframe.setAttribute("src", url);
         document.documentElement.appendChild(iframe);
       });
     },
     onAttach: function(w) {
       w.on("message", function (body) {
         assert.equal(body, "foo", "received iframe html content");
         pageMod.destroy();
--- a/addon-sdk/source/test/addons/e10s-content/lib/test-content-script.js
+++ b/addon-sdk/source/test/addons/e10s-content/lib/test-content-script.js
@@ -23,29 +23,28 @@ function createProxyTest(html, callback)
       nodeName: "iframe",
       type: "content",
       allowJavascript: true,
       allowPlugins: true,
       allowAuth: true,
       uri: testURI
     });
 
-    element.addEventListener("DOMContentLoaded", onDOMReady, false);
+    element.addEventListener("DOMContentLoaded", onDOMReady);
 
     function onDOMReady() {
       // Reload frame after getting principal from `testURI`
       if (!principalLoaded) {
         element.setAttribute("src", url);
         principalLoaded = true;
         return;
       }
 
       assert.equal(element.getAttribute("src"), url, "correct URL loaded");
-      element.removeEventListener("DOMContentLoaded", onDOMReady,
-                                                  false);
+      element.removeEventListener("DOMContentLoaded", onDOMReady);
       let xrayWindow = element.contentWindow;
       let rawWindow = xrayWindow.wrappedJSObject;
 
       let isDone = false;
       let helper = {
         xrayWindow: xrayWindow,
         rawWindow: rawWindow,
         createWorker: function (contentScript) {
@@ -170,30 +169,30 @@ exports["test Shared To String Proxies"]
 
 // Ensure that postMessage is working correctly across documents with an iframe
 var html = '<iframe id="iframe" name="test" src="data:text/html;charset=utf-8," />';
 exports["test postMessage"] = createProxyTest(html, function (helper, assert) {
   let ifWindow = helper.xrayWindow.document.getElementById("iframe").contentWindow;
   // Listen without proxies, to check that it will work in regular case
   // simulate listening from a web document.
   ifWindow.addEventListener("message", function listener(event) {
-    ifWindow.removeEventListener("message", listener, false);
+    ifWindow.removeEventListener("message", listener);
     // As we are in system principal, event is an XrayWrapper
     // xrays use current compartments when calling postMessage method.
     // Whereas js proxies was using postMessage method compartment,
     // not the caller one.
     assert.strictEqual(event.source, helper.xrayWindow,
                       "event.source is the top window");
     assert.equal(event.origin, testHost, "origin matches testHost");
 
     assert.equal(event.data, "{\"foo\":\"bar\\n \\\"escaped\\\".\"}",
                      "message data is correct");
 
     helper.done();
-  }, false);
+  });
 
   helper.createWorker(
     'new ' + function ContentScriptScope() {
       var json = JSON.stringify({foo : "bar\n \"escaped\"."});
 
       document.getElementById("iframe").contentWindow.postMessage(json, "*");
     }
   );
--- a/addon-sdk/source/test/addons/e10s-content/lib/test-content-worker.js
+++ b/addon-sdk/source/test/addons/e10s-content/lib/test-content-worker.js
@@ -763,17 +763,17 @@ exports["test:check worker API with page
       // We have to wait before going back into history,
       // otherwise `goBack` won't do anything.
       setTimeout(function () {
         browser.goBack();
       }, 0);
 
       // Wait for the document to be hidden
       browser.addEventListener("pagehide", function onpagehide() {
-        browser.removeEventListener("pagehide", onpagehide, false);
+        browser.removeEventListener("pagehide", onpagehide);
         // Now any event sent to this worker should be cached
 
         worker.postMessage("message");
         worker.port.emit("event");
 
         // Display the page with attached content script back in order to resume
         // its timeout and receive the expected message.
         // We have to delay this in order to not break the history.
@@ -803,17 +803,17 @@ exports["test:check worker API with page
               })
             ]);
             promise.then(done);
           });
 
           browser.goForward();
         }, 500);
 
-      }, false);
+      });
     });
 
   }
 );
 
 exports['test:conentScriptFile as URL instance'] = WorkerTest(
   DEFAULT_CONTENT_URL,
   function(assert, browser, done) {
--- a/addon-sdk/source/test/addons/unsafe-content-script/main.js
+++ b/addon-sdk/source/test/addons/unsafe-content-script/main.js
@@ -24,17 +24,17 @@ exports.testMembranelessMode = function(
     nodeName: "iframe",
     type: "content",
     allowJavascript: true,
     allowPlugins: true,
     allowAuth: true,
     uri: url
   });
 
-  element.addEventListener("DOMContentLoaded", onDOMReady, false);
+  element.addEventListener("DOMContentLoaded", onDOMReady);
 
   function onDOMReady() {
     let worker = Worker({
       window: element.contentWindow,
       contentScript:
         'new ' + function () {
           var assert = function assert(v, msg) {
             self.port.emit("assert", { assertion: v, msg: msg });
--- a/addon-sdk/source/test/fixtures/test-addon-extras.html
+++ b/addon-sdk/source/test/fixtures/test-addon-extras.html
@@ -20,12 +20,12 @@
 
     window.addEventListener("message", function getMessage({ data }) {
       if (data.name == "start") {
         window.postMessage({
           name: "extras",
           result: window.extras === undefined
         }, '*');
       }
-    }, false);
+    });
   </script>
 </body>
 </html>
--- a/addon-sdk/source/test/preferences/test.json
+++ b/addon-sdk/source/test/preferences/test.json
@@ -26,17 +26,16 @@
   "security.default_personal_cert": "Select Automatically",
   "network.http.prompt-temp-redirect": false,
   "security.warn_viewing_mixed": false,
   "extensions.defaultProviders.enabled": true,
   "datareporting.policy.dataSubmissionPolicyBypassNotification": true,
   "layout.css.report_errors": true,
   "layout.css.grid.enabled": true,
   "layout.spammy_warnings.enabled": false,
-  "dom.mozSettings.enabled": true,
   "network.http.bypass-cachelock-threshold": 200000,
   "geo.provider.testing": true,
   "browser.pagethumbnails.capturing_disabled": true,
   "browser.download.panel.shown": true,
   "general.useragent.updates.enabled": false,
   "media.eme.enabled": true,
   "media.eme.apiVisible": true,
   "dom.ipc.tabs.shutdownTimeoutSecs": 0,
--- a/addon-sdk/source/test/test-content-script.js
+++ b/addon-sdk/source/test/test-content-script.js
@@ -23,29 +23,28 @@ function createProxyTest(html, callback)
       nodeName: "iframe",
       type: "content",
       allowJavascript: true,
       allowPlugins: true,
       allowAuth: true,
       uri: testURI
     });
 
-    element.addEventListener("DOMContentLoaded", onDOMReady, false);
+    element.addEventListener("DOMContentLoaded", onDOMReady);
 
     function onDOMReady() {
       // Reload frame after getting principal from `testURI`
       if (!principalLoaded) {
         element.setAttribute("src", url);
         principalLoaded = true;
         return;
       }
 
       assert.equal(element.getAttribute("src"), url, "correct URL loaded");
-      element.removeEventListener("DOMContentLoaded", onDOMReady,
-                                                  false);
+      element.removeEventListener("DOMContentLoaded", onDOMReady);
       let xrayWindow = element.contentWindow;
       let rawWindow = xrayWindow.wrappedJSObject;
 
       let isDone = false;
       let helper = {
         xrayWindow: xrayWindow,
         rawWindow: rawWindow,
         createWorker: function (contentScript) {
@@ -170,30 +169,30 @@ exports["test Shared To String Proxies"]
 
 // Ensure that postMessage is working correctly across documents with an iframe
 var html = '<iframe id="iframe" name="test" src="data:text/html;charset=utf-8," />';
 exports["test postMessage"] = createProxyTest(html, function (helper, assert) {
   let ifWindow = helper.xrayWindow.document.getElementById("iframe").contentWindow;
   // Listen without proxies, to check that it will work in regular case
   // simulate listening from a web document.
   ifWindow.addEventListener("message", function listener(event) {
-    ifWindow.removeEventListener("message", listener, false);
+    ifWindow.removeEventListener("message", listener);
     // As we are in system principal, event is an XrayWrapper
     // xrays use current compartments when calling postMessage method.
     // Whereas js proxies was using postMessage method compartment,
     // not the caller one.
     assert.strictEqual(event.source, helper.xrayWindow,
                       "event.source is the top window");
     assert.equal(event.origin, testHost, "origin matches testHost");
 
     assert.equal(event.data, "{\"foo\":\"bar\\n \\\"escaped\\\".\"}",
                      "message data is correct");
 
     helper.done();
-  }, false);
+  });
 
   helper.createWorker(
     'new ' + function ContentScriptScope() {
       var json = JSON.stringify({foo : "bar\n \"escaped\"."});
 
       document.getElementById("iframe").contentWindow.postMessage(json, "*");
     }
   );
--- a/addon-sdk/source/test/test-content-sync-worker.js
+++ b/addon-sdk/source/test/test-content-sync-worker.js
@@ -747,17 +747,17 @@ exports["test:check worker API with page
       // We have to wait before going back into history,
       // otherwise `goBack` won't do anything.
       setTimeout(function () {
         browser.goBack();
       }, 0);
 
       // Wait for the document to be hidden
       browser.addEventListener("pagehide", function onpagehide() {
-        browser.removeEventListener("pagehide", onpagehide, false);
+        browser.removeEventListener("pagehide", onpagehide);
         // Now any event sent to this worker should throw
 
         assert.throws(
             function () { worker.postMessage("data"); },
             /The page is currently hidden and can no longer be used/,
             "postMessage should throw when the page is hidden in history"
             );
 
@@ -776,17 +776,17 @@ exports["test:check worker API with page
         setTimeout(function () {
           worker.on("message", function (data) {
             assert.ok(data, "timeout restored");
             done();
           });
           browser.goForward();
         }, 500);
 
-      }, false);
+      });
     });
 
   }
 );
 
 exports['test:conentScriptFile as URL instance'] = WorkerTest(
   DEFAULT_CONTENT_URL,
   function(assert, browser, done) {
--- a/addon-sdk/source/test/test-content-worker.js
+++ b/addon-sdk/source/test/test-content-worker.js
@@ -764,17 +764,17 @@ exports["test:check worker API with page
       // We have to wait before going back into history,
       // otherwise `goBack` won't do anything.
       setTimeout(function () {
         browser.goBack();
       }, 0);
 
       // Wait for the document to be hidden
       browser.addEventListener("pagehide", function onpagehide() {
-        browser.removeEventListener("pagehide", onpagehide, false);
+        browser.removeEventListener("pagehide", onpagehide);
         // Now any event sent to this worker should be cached
 
         worker.postMessage("message");
         worker.port.emit("event");
 
         // Display the page with attached content script back in order to resume
         // its timeout and receive the expected message.
         // We have to delay this in order to not break the history.
@@ -804,17 +804,17 @@ exports["test:check worker API with page
               })
             ]);
             promise.then(done);
           });
 
           browser.goForward();
         }, 500);
 
-      }, false);
+      });
     });
 
   }
 );
 
 exports['test:conentScriptFile as URL instance'] = WorkerTest(
   DEFAULT_CONTENT_URL,
   function(assert, browser, done) {
--- a/addon-sdk/source/test/test-context-menu.js
+++ b/addon-sdk/source/test/test-context-menu.js
@@ -303,17 +303,17 @@ exports.testSelectionContextInNewTab = f
     context: loader.cm.SelectionContext()
   });
 
   test.withTestDoc(function (window, doc) {
     let link = doc.getElementById("targetlink");
     link.click();
 
     let tablistener = event => {
-      this.tabBrowser.tabContainer.removeEventListener("TabOpen", tablistener, false);
+      this.tabBrowser.tabContainer.removeEventListener("TabOpen", tablistener);
       let tab = event.target;
       let browser = tab.linkedBrowser;
       this.loadFrameScript(browser);
       this.delayedEventListener(browser, "load", () => {
         let window = browser.contentWindow;
         let doc = browser.contentDocument;
         window.getSelection().selectAllChildren(doc.body);
 
@@ -326,17 +326,17 @@ exports.testSelectionContextInNewTab = f
 
           test.showMenu(null, function (popup) {
             test.checkMenu([item], [item], []);
             test.done();
           });
         });
       }, true);
     };
-    this.tabBrowser.tabContainer.addEventListener("TabOpen", tablistener, false);
+    this.tabBrowser.tabContainer.addEventListener("TabOpen", tablistener);
   });
 };
 
 
 // Selection contexts should work when right clicking a form button
 exports.testSelectionContextButtonMatch = function (assert, done) {
   let test = new TestHelper(assert, done);
   let loader = test.newLoader();
--- a/addon-sdk/source/test/test-frame-utils.js
+++ b/addon-sdk/source/test/test-frame-utils.js
@@ -25,35 +25,35 @@ exports['test frame creation'] = functio
 
 exports['test fram has js disabled by default'] = function(assert, done) {
   open('data:text/html;charset=utf-8,window').then(function (window) {
     let frame = create(window.document, {
       uri: 'data:text/html;charset=utf-8,<script>document.documentElement.innerHTML' +
            '= "J" + "S"</script>',
     });
     frame.contentWindow.addEventListener('DOMContentLoaded', function ready() {
-      frame.contentWindow.removeEventListener('DOMContentLoaded', ready, false);
+      frame.contentWindow.removeEventListener('DOMContentLoaded', ready);
       assert.ok(!~frame.contentDocument.documentElement.innerHTML.indexOf('JS'),
                 'JS was executed');
 
       close(window).then(done);
-    }, false);
+    });
   });
 };
 
 exports['test frame with js enabled'] = function(assert, done) {
   open('data:text/html;charset=utf-8,window').then(function (window) {
     let frame = create(window.document, {
       uri: 'data:text/html;charset=utf-8,<script>document.documentElement.innerHTML' +
            '= "J" + "S"</script>',
       allowJavascript: true
     });
     frame.contentWindow.addEventListener('DOMContentLoaded', function ready() {
-      frame.contentWindow.removeEventListener('DOMContentLoaded', ready, false);
+      frame.contentWindow.removeEventListener('DOMContentLoaded', ready);
       assert.ok(~frame.contentDocument.documentElement.innerHTML.indexOf('JS'),
                 'JS was executed');
 
       close(window).then(done);
-    }, false);
+    });
   });
 };
 
 require('sdk/test').run(exports);
--- a/addon-sdk/source/test/test-hidden-frame.js
+++ b/addon-sdk/source/test/test-hidden-frame.js
@@ -11,24 +11,23 @@ exports["test Frame"] = function(assert,
   let url = "data:text/html;charset=utf-8,<!DOCTYPE%20html>";
 
   let hiddenFrame = hiddenFrames.add(HiddenFrame({
     onReady: function () {
       assert.equal(this.element.contentWindow.location, "about:blank",
                        "HiddenFrame loads about:blank by default.");
 
       function onDOMReady() {
-        hiddenFrame.element.removeEventListener("DOMContentLoaded", onDOMReady,
-                                                false);
+        hiddenFrame.element.removeEventListener("DOMContentLoaded", onDOMReady);
         assert.equal(hiddenFrame.element.contentWindow.location, url,
                          "HiddenFrame loads the specified content.");
         done();
       }
 
-      this.element.addEventListener("DOMContentLoaded", onDOMReady, false);
+      this.element.addEventListener("DOMContentLoaded", onDOMReady);
       this.element.setAttribute("src", url);
     }
   }));
 };
 
 exports["test frame removed properly"] = function(assert, done) {
   let url = "data:text/html;charset=utf-8,<!DOCTYPE%20html>";
 
--- a/addon-sdk/source/test/test-page-mod.js
+++ b/addon-sdk/source/test/test-page-mod.js
@@ -417,17 +417,17 @@ exports.testCommunication2 = function*(a
     contentScript: 'new ' + function WorkerScope() {
       document.documentElement.setAttribute('AUQLUE', 42);
 
       window.addEventListener('load', function listener() {
         self.postMessage({
           msg: 'onload',
           AUQLUE: document.documentElement.getAttribute('AUQLUE')
         });
-      }, false);
+      });
 
       self.on("message", function(msg) {
         if (msg == "get window.test") {
           unsafeWindow.changesInWindow();
         }
 
         self.postMessage({
           msg: document.documentElement.getAttribute("test")
@@ -1023,53 +1023,53 @@ exports.testAttachToTabsOnly = function(
 
   function openHiddenFrame() {
     assert.pass('Open iframe in hidden window');
     let hiddenFrames = require('sdk/frame/hidden-frame');
     let hiddenFrame = hiddenFrames.add(hiddenFrames.HiddenFrame({
       onReady: function () {
         let element = this.element;
         element.addEventListener('DOMContentLoaded', function onload() {
-          element.removeEventListener('DOMContentLoaded', onload, false);
+          element.removeEventListener('DOMContentLoaded', onload);
           hiddenFrames.remove(hiddenFrame);
 
           if (!xulApp.is("Fennec")) {
             openToplevelWindow();
           }
           else {
             openBrowserIframe();
           }
-        }, false);
+        });
         element.setAttribute('src', 'data:text/html;charset=utf-8,foo');
       }
     }));
   }
 
   function openToplevelWindow() {
     assert.pass('Open toplevel window');
     let win = open('data:text/html;charset=utf-8,bar');
     win.addEventListener('DOMContentLoaded', function onload() {
-      win.removeEventListener('DOMContentLoaded', onload, false);
+      win.removeEventListener('DOMContentLoaded', onload);
       win.close();
       openBrowserIframe();
-    }, false);
+    });
   }
 
   function openBrowserIframe() {
     assert.pass('Open iframe in browser window');
     let window = require('sdk/deprecated/window-utils').activeBrowserWindow;
     let document = window.document;
     let iframe = document.createElement('iframe');
     iframe.setAttribute('type', 'content');
     iframe.setAttribute('src', 'data:text/html;charset=utf-8,foobar');
     iframe.addEventListener('DOMContentLoaded', function onload() {
-      iframe.removeEventListener('DOMContentLoaded', onload, false);
+      iframe.removeEventListener('DOMContentLoaded', onload);
       iframe.parentNode.removeChild(iframe);
       openTabWithIframes();
-    }, false);
+    });
     document.documentElement.appendChild(iframe);
   }
 
   // Only these three documents will be accepted by the page-mod
   function openTabWithIframes() {
     assert.pass('Open iframes in a tab');
     let subContent = '<iframe src="data:text/html;charset=utf-8,sub frame" />'
     let content = '<iframe src="data:text/html;charset=utf-8,' +
@@ -1581,17 +1581,17 @@ exports.testIFramePostMessage = function
   });
 };
 
 exports.testEvents = function*(assert) {
   let modAttached = defer();
   let content = "<script>\n new " + function DocumentScope() {
     window.addEventListener("ContentScriptEvent", function () {
       window.document.body.setAttribute("receivedEvent", "ok");
-    }, false);
+    });
   } + "\n</script>";
   let url = "data:text/html;charset=utf-8," + encodeURIComponent(content);
 
   let mod = PageMod({
     include: "data:*",
     contentScript: 'new ' + function WorkerScope() {
       let evt = document.createEvent("Event");
       evt.initEvent("ContentScriptEvent", true, true);
--- a/addon-sdk/source/test/test-ui-sidebar.js
+++ b/addon-sdk/source/test/test-ui-sidebar.js
@@ -171,20 +171,20 @@ exports.testSideBarIsShowingInNewWindows
   assert.notEqual(startWindow, window, 'window is new');
 
   let sb = window.document.getElementById('sidebar');
   yield new Promise(resolve => {
     if (sb && sb.docShell && sb.contentDocument && sb.contentDocument.getElementById('web-panels-browser')) {
       end();
     }
     else {
-      sb.addEventListener('DOMWindowCreated', end, false);
+      sb.addEventListener('DOMWindowCreated', end);
     }
     function end () {
-      sb.removeEventListener('DOMWindowCreated', end, false);
+      sb.removeEventListener('DOMWindowCreated', end);
       resolve();
     }
   })
 
   ele = window.document.getElementById(makeID(testName));
   assert.ok(ele, 'sidebar element was added 2');
   assert.ok(isChecked(ele), 'the sidebar is checked');
   assert.notEqual(ele, oldEle, 'there are two different sidebars');
@@ -1091,19 +1091,19 @@ exports.testSidebarLeakCheckDestroyAfter
   sidebar.on('hide', () => {
     assert.fail('the sidebar hide listener should have been removed');
   });
   assert.pass('added a sidebar hide listener');
 
   yield new Promise(resolve => {
     let panelBrowser = window.document.getElementById('sidebar').contentDocument.getElementById('web-panels-browser');
     panelBrowser.contentWindow.addEventListener('unload', function onUnload() {
-      panelBrowser.contentWindow.removeEventListener('unload', onUnload, false);
+      panelBrowser.contentWindow.removeEventListener('unload', onUnload);
       resolve();
-    }, false);
+    });
     sidebar.destroy();
   });
 
   assert.pass('the sidebar web panel was unloaded properly');
 }
 
 exports.testSidebarLeakCheckUnloadAfterAttach = function*(assert) {
   const loader = Loader(module);
@@ -1133,19 +1133,19 @@ exports.testSidebarLeakCheckUnloadAfterA
   sidebar.on('hide', function() {
     assert.fail('the sidebar hide listener should have been removed');
   });
   assert.pass('added a sidebar hide listener');
 
   let panelBrowser = window.document.getElementById('sidebar').contentDocument.getElementById('web-panels-browser');
   yield new Promise(resolve => {
     panelBrowser.contentWindow.addEventListener('unload', function onUnload() {
-      panelBrowser.contentWindow.removeEventListener('unload', onUnload, false);
+      panelBrowser.contentWindow.removeEventListener('unload', onUnload);
       resolve();
-    }, false);
+    });
     loader.unload();
   });
 
   assert.pass('the sidebar web panel was unloaded properly');
 }
 
 exports.testTwoSidebarsWithSameTitleAndURL = function(assert) {
   const { Sidebar } = require('sdk/ui/sidebar');
--- a/addon-sdk/source/test/test-window-utils.js
+++ b/addon-sdk/source/test/test-window-utils.js
@@ -37,17 +37,17 @@ function makeEmptyWindow(options) {
   });
 }
 
 exports.testWindowTracker = function(assert, done) {
   var myWindow = makeEmptyWindow();
   assert.pass('window was created');
 
   myWindow.addEventListener("load", function onload() {
-    myWindow.removeEventListener("load", onload, false);
+    myWindow.removeEventListener("load", onload);
     assert.pass("test window has opened");
 
     // test bug 638007 (new is optional), using new
     var wt = new windowUtils.WindowTracker({
       onTrack: window => {
         if (window === myWindow) {
           assert.pass("onTrack() called with our test window");
           close(window);
@@ -56,17 +56,17 @@ exports.testWindowTracker = function(ass
       onUntrack: window => {
         if (window === myWindow) {
           assert.pass("onUntrack() called with our test window");
           wt.unload();
           timer.setTimeout(done);
         }
       }
     });
-  }, false);
+  });
 };
 
 exports['test window watcher untracker'] = function(assert, done) {
   var myWindow;
   var tracks = 0;
   var unloadCalled = false;
 
   var delegate = {
@@ -143,20 +143,20 @@ exports['test window watcher unregs 4 lo
   // until the window loads, so we must let it load before closing it to be
   // certain that onTrack was removed.
   myWindow.addEventListener("load", function() {
     // allow all of the load handles to execute before closing
     myWindow.setTimeout(function() {
       myWindow.addEventListener("unload", function() {
         // once the window unloads test is done
         done();
-      }, false);
+      });
       myWindow.close();
     }, 0);
-  }, false);
+  });
 }
 
 exports['test window watcher without untracker'] = function(assert, done) {
   let myWindow;
   let wt = new windowUtils.WindowTracker({
     onTrack: function(window) {
       if (window == myWindow) {
         assert.pass("onTrack() called with our test window");
@@ -224,43 +224,43 @@ exports.testWindowIterator = function(as
       "window hasn't loaded yet.");
 
   // this window should only appear in windowIterator() while its loading
   assert.ok(toArray(windowUtils.windowIterator()).indexOf(window) === -1,
             "window isn't in windowIterator()");
 
   // Then it should be in windowIterator()
   window.addEventListener("load", function onload() {
-    window.addEventListener("load", onload, false);
+    window.addEventListener("load", onload);
     assert.ok(toArray(windowUtils.windowIterator()).indexOf(window) !== -1,
               "window is now in windowIterator()");
 
     // Wait for the window unload before ending test
     close(window).then(done);
-  }, false);
+  });
 };
 
 exports.testIgnoreClosingWindow = function(assert, done) {
   assert.equal(windows().length, 1, "Only one window open");
 
   // make a new window
   let window = makeEmptyWindow();
 
   assert.equal(windows().length, 2, "Two windows open");
 
   window.addEventListener("load", function onload() {
-    window.addEventListener("load", onload, false);
+    window.addEventListener("load", onload);
 
     assert.equal(windows().length, 2, "Two windows open");
 
     // Wait for the window unload before ending test
     let checked = false;
 
     close(window).then(function() {
       assert.ok(checked, 'the test is finished');
     }).then(done, assert.fail)
 
     assert.equal(windows().length, 1, "Only one window open");
     checked = true;
-  }, false);
+  });
 };
 
 require("sdk/test").run(exports);
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -273,17 +273,16 @@ pref("ui.graytext", "#b1a598");
 pref("ui.highlighttext", "#1a1a1a");
 pref("ui.threeddarkshadow", "#000");
 pref("ui.threedface", "#ece7e2");
 pref("ui.threedhighlight", "#fff");
 pref("ui.threedlightshadow", "#ece7e2");
 pref("ui.threedshadow", "#aea194");
 pref("ui.windowframe", "#efebe7");
 
-// Themable via mozSettings
 pref("ui.menu", "#f97c17");
 pref("ui.menutext", "#ffffff");
 pref("ui.infobackground", "#343e40");
 pref("ui.infotext", "#686868");
 pref("ui.window", "#ffffff");
 pref("ui.windowtext", "#000000");
 pref("ui.highlight", "#b2f2ff");
 
@@ -404,19 +403,16 @@ pref("dom.phonenumber.substringmatching.
 pref("dom.webapps.firstRunWithSIM", true);
 #endif
 
 #ifdef MOZ_B2G_RIL
 // SingleVariant
 pref("dom.mozApps.single_variant_sourcedir", "/persist/svoperapps");
 #endif
 
-// WebSettings
-pref("dom.mozSettings.enabled", true);
-
 // controls if we want camera support
 pref("device.camera.enabled", true);
 pref("media.realtime_decoder.enabled", true);
 
 // TCPSocket
 pref("dom.mozTCPSocket.enabled", true);
 
 // "Preview" landing of bug 710563, which is bogged down in analysis
@@ -911,37 +907,16 @@ pref("identity.fxaccounts.remote.profile
 pref("identity.fxaccounts.skipDeviceRegistration", true);
 
 // Enable mapped array buffer.
 pref("dom.mapped_arraybuffer.enabled", true);
 
 // UDPSocket API
 pref("dom.udpsocket.enabled", true);
 
-// Enable TV Manager API
-pref("dom.tv.enabled", true);
-
-// Enable Inputport Manager API
-pref("dom.inputport.enabled", true);
-
-pref("dom.mozSettings.SettingsDB.debug.enabled", true);
-pref("dom.mozSettings.SettingsManager.debug.enabled", true);
-pref("dom.mozSettings.SettingsRequestManager.debug.enabled", true);
-pref("dom.mozSettings.SettingsService.debug.enabled", true);
-
-pref("dom.mozSettings.SettingsDB.verbose.enabled", false);
-pref("dom.mozSettings.SettingsManager.verbose.enabled", false);
-pref("dom.mozSettings.SettingsRequestManager.verbose.enabled", false);
-pref("dom.mozSettings.SettingsService.verbose.enabled", false);
-
-// Controlling whether we want to allow forcing some Settings
-// IndexedDB transactions to be opened as readonly or keep everything as
-// readwrite.
-pref("dom.mozSettings.allowForceReadOnly", false);
-
 // Comma separated list of activity names that can only be provided by
 // the system app in dev mode.
 pref("dom.activities.developer_mode_only", "import-app");
 
 // mulet apparently loads firefox.js as well as b2g.js, so we have to explicitly
 // disable serviceworkers and push here to get them disabled in mulet.
 pref("dom.serviceWorkers.enabled", false);
 pref("dom.push.enabled", false);
--- a/b2g/app/nsBrowserApp.cpp
+++ b/b2g/app/nsBrowserApp.cpp
@@ -141,22 +141,22 @@ static int do_main(int argc, char* argv[
 
   if (appini) {
     nsXREAppData *appData;
     rv = XRE_CreateAppData(appini, &appData);
     if (NS_FAILED(rv)) {
       Output("Couldn't read application.ini");
       return 255;
     }
-    int result = XRE_main(argc, argv, appData, 0);
+    int result = XRE_main(argc, argv, appData);
     XRE_FreeAppData(appData);
     return result;
   }
 
-  return XRE_main(argc, argv, &sAppData, 0);
+  return XRE_main(argc, argv, &sAppData);
 }
 
 int main(int argc, char* argv[])
 {
   char exePath[MAXPATHLEN];
 
 #ifdef MOZ_WIDGET_GONK
   // This creates a ThreadPool for binder ipc. A ThreadPool is necessary to
@@ -187,19 +187,16 @@ int main(int argc, char* argv[])
   // process group controller (the normal situation).
   (void)setsid();
 #endif
 
 #ifdef HAS_DLL_BLOCKLIST
   DllBlocklist_Initialize();
 #endif
 
-  // We do this because of data in bug 771745
-  XPCOMGlueEnablePreload();
-
   rv = XPCOMGlueStartup(exePath);
   if (NS_FAILED(rv)) {
     Output("Couldn't load XPCOM.\n");
     return 255;
   }
   // Reset exePath so that it is the directory name and not the xpcom dll name
   *lastSlash = 0;
 
--- a/b2g/chrome/content/desktop.js
+++ b/b2g/chrome/content/desktop.js
@@ -106,18 +106,16 @@ function checkDebuggerPort() {
   let dbgport;
   try {
     dbgport = args.handleFlagWithParam('start-debugger-server', false);
   } catch(e) {}
 
   if (dbgport) {
     dump('Opening debugger server on ' + dbgport + '\n');
     Services.prefs.setCharPref('devtools.debugger.unix-domain-socket', dbgport);
-    navigator.mozSettings.createLock().set(
-      {'debugger.remote-mode': 'adb-devtools'});
   }
 }
 
 
 function initResponsiveDesign() {
   Cu.import('resource://devtools/client/responsivedesign/responsivedesign.jsm');
   ResponsiveUIManager.on('on', function(event, {tab:tab}) {
     let responsive = ResponsiveUIManager.getResponsiveUIForTab(tab);
--- a/b2g/chrome/content/shell.js
+++ b/b2g/chrome/content/shell.js
@@ -71,19 +71,19 @@ window.performance.measure('gecko-shell-
 function debug(str) {
   dump(' -*- Shell.js: ' + str + '\n');
 }
 
 const once = event => {
   let target = shell.contentBrowser;
   return new Promise((resolve, reject) => {
     target.addEventListener(event, function gotEvent(evt) {
-      target.removeEventListener(event, gotEvent, false);
+      target.removeEventListener(event, gotEvent);
       resolve(evt);
-    }, false);
+    });
   });
 }
 
 function clearCache() {
   let cache = Cc["@mozilla.org/netwerk/cache-storage-service;1"]
                 .getService(Ci.nsICacheStorageService);
   cache.clear();
 }
@@ -788,17 +788,17 @@ var permissionMap = new Map([
 ]);
 var permissionMapRev = new Map(Array.from(permissionMap.entries()).reverse());
 
 var CustomEventManager = {
   init: function custevt_init() {
     window.addEventListener("ContentStart", (function(evt) {
       let content = shell.contentBrowser.contentWindow;
       content.addEventListener("mozContentEvent", this, false, true);
-    }).bind(this), false);
+    }).bind(this));
   },
 
   handleEvent: function custevt_handleEvent(evt) {
     let detail = evt.detail;
     dump('XXX FIXME : Got a mozContentEvent: ' + detail.type + "\n");
 
     switch(detail.type) {
       case 'system-message-listener-ready':
--- a/b2g/chrome/content/test/mochitest/file_getusermedia_iframe.html
+++ b/b2g/chrome/content/test/mochitest/file_getusermedia_iframe.html
@@ -23,14 +23,14 @@ window.addEventListener('message', funct
                                        event.source.postMessage('start-finished', window.location.origin);
                                      });
       break;
     case 'stop':
       localStream.stop();
       localStream = null;
       break;
   }
-}, false);
+});
 
 </script>
 </pre>
 </body>
 </html>
--- a/b2g/chrome/content/test/mochitest/test_recordingStatus_iframe.html
+++ b/b2g/chrome/content/test/mochitest/test_recordingStatus_iframe.html
@@ -26,17 +26,17 @@ function test() {
     let loadDeferred = new Promise(function(resolve, reject) {
       let gumIframe = document.getElementById('gum-iframe');
       gumIframe.src = 'file_getusermedia_iframe.html';
 
       window.addEventListener('message', function(event) {
         if (event.data === 'start-finished') {
           resolve();
         }
-      }, false);
+      });
 
       gumIframe.onload = function() {
         info('start audio stream in iframe');
         gumIframe.contentWindow.postMessage('start', window.location.origin);
       };
     });
 
     return expectAll([eventDeferred, loadDeferred]);
--- a/b2g/components/LogShake.jsm
+++ b/b2g/components/LogShake.jsm
@@ -147,18 +147,18 @@ var LogShake = {
     // either due to the phone starting up or a user enabling us directly.
     this.handleScreenChangeEvent({ detail: {
       screenEnabled: true
     }});
 
     // Reset excitement to clear residual motion
     this.excitement = 0;
 
-    SystemAppProxy.addEventListener(CAPTURE_LOGS_CONTENT_EVENT, this, false);
-    SystemAppProxy.addEventListener(SCREEN_CHANGE_EVENT, this, false);
+    SystemAppProxy.addEventListener(CAPTURE_LOGS_CONTENT_EVENT, this);
+    SystemAppProxy.addEventListener(SCREEN_CHANGE_EVENT, this);
 
     Services.obs.addObserver(this, "xpcom-shutdown", false);
   },
 
   /**
    * Handle an arbitrary event, passing it along to the proper function
    */
   handleEvent: function(event) {
@@ -208,23 +208,23 @@ var LogShake = {
     this.listenToDeviceMotion = false;
     this.stopDeviceMotionListener();
   },
 
   startDeviceMotionListener: function() {
     if (!this.deviceMotionEnabled &&
         this.listenToDeviceMotion &&
         this.screenEnabled) {
-      SystemAppProxy.addEventListener(DEVICE_MOTION_EVENT, this, false);
+      SystemAppProxy.addEventListener(DEVICE_MOTION_EVENT, this);
       this.deviceMotionEnabled = true;
     }
   },
 
   stopDeviceMotionListener: function() {
-    SystemAppProxy.removeEventListener(DEVICE_MOTION_EVENT, this, false);
+    SystemAppProxy.removeEventListener(DEVICE_MOTION_EVENT, this);
     this.deviceMotionEnabled = false;
   },
 
   /**
    * Handle a motion event, keeping track of "excitement", the magnitude
    * of the device"s acceleration.
    */
   handleDeviceMotionEvent: function(event) {
@@ -384,17 +384,17 @@ var LogShake = {
     }
   },
 
   /**
    * Stop logshake, removing all listeners
    */
   uninit: function() {
     this.stopDeviceMotionListener();
-    SystemAppProxy.removeEventListener(SCREEN_CHANGE_EVENT, this, false);
+    SystemAppProxy.removeEventListener(SCREEN_CHANGE_EVENT, this);
     Services.obs.removeObserver(this, "xpcom-shutdown");
   }
 };
 
 function getLogFilename(logLocation) {
   // sanitize the log location
   let logName = logLocation.replace(/\//g, "-");
   if (logName[0] === "-") {
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -797,16 +797,16 @@ bin/libfreebl_32int64_3.so
 #endif
 
 #ifdef PACKAGE_MOZTT
 @RESPATH@/fonts/*
 #endif
 
 ; media
 @RESPATH@/gmp-clearkey/0.1/@DLL_PREFIX@clearkey@DLL_SUFFIX@
-@RESPATH@/gmp-clearkey/0.1/clearkey.info
+@RESPATH@/gmp-clearkey/0.1/manifest.json
 
 #ifdef PKG_LOCALE_MANIFEST
 #include @PKG_LOCALE_MANIFEST@
 #endif
 
 @RESPATH@/components/simpleServices.js
 @RESPATH@/components/utils.manifest
--- a/browser/app/nsBrowserApp.cpp
+++ b/browser/app/nsBrowserApp.cpp
@@ -156,89 +156,41 @@ static bool IsArg(const char* arg, const
 #if defined(XP_WIN)
   if (*arg == '/')
     return !strcasecmp(++arg, s);
 #endif
 
   return false;
 }
 
-XRE_GetFileFromPathType XRE_GetFileFromPath;
-XRE_ParseAppDataType XRE_ParseAppData;
-XRE_TelemetryAccumulateType XRE_TelemetryAccumulate;
-XRE_StartupTimelineRecordType XRE_StartupTimelineRecord;
-XRE_mainType XRE_main;
-XRE_StopLateWriteChecksType XRE_StopLateWriteChecks;
-XRE_XPCShellMainType XRE_XPCShellMain;
-XRE_GetProcessTypeType XRE_GetProcessType;
-XRE_SetProcessTypeType XRE_SetProcessType;
-XRE_InitChildProcessType XRE_InitChildProcess;
-XRE_EnableSameExecutableForContentProcType XRE_EnableSameExecutableForContentProc;
-#ifdef LIBFUZZER
-XRE_LibFuzzerSetMainType XRE_LibFuzzerSetMain;
-XRE_LibFuzzerGetFuncsType XRE_LibFuzzerGetFuncs;
-#endif
-
-static const nsDynamicFunctionLoad kXULFuncs[] = {
-    { "XRE_GetFileFromPath", (NSFuncPtr*) &XRE_GetFileFromPath },
-    { "XRE_ParseAppData", (NSFuncPtr*) &XRE_ParseAppData },
-    { "XRE_TelemetryAccumulate", (NSFuncPtr*) &XRE_TelemetryAccumulate },
-    { "XRE_StartupTimelineRecord", (NSFuncPtr*) &XRE_StartupTimelineRecord },
-    { "XRE_main", (NSFuncPtr*) &XRE_main },
-    { "XRE_StopLateWriteChecks", (NSFuncPtr*) &XRE_StopLateWriteChecks },
-    { "XRE_XPCShellMain", (NSFuncPtr*) &XRE_XPCShellMain },
-    { "XRE_GetProcessType", (NSFuncPtr*) &XRE_GetProcessType },
-    { "XRE_SetProcessType", (NSFuncPtr*) &XRE_SetProcessType },
-    { "XRE_InitChildProcess", (NSFuncPtr*) &XRE_InitChildProcess },
-    { "XRE_EnableSameExecutableForContentProc", (NSFuncPtr*) &XRE_EnableSameExecutableForContentProc },
-#ifdef LIBFUZZER
-    { "XRE_LibFuzzerSetMain", (NSFuncPtr*) &XRE_LibFuzzerSetMain },
-    { "XRE_LibFuzzerGetFuncs", (NSFuncPtr*) &XRE_LibFuzzerGetFuncs },
-#endif
-    { nullptr, nullptr }
-};
+Bootstrap::UniquePtr gBootstrap;
 
 #ifdef LIBFUZZER
 int libfuzzer_main(int argc, char **argv);
 
 /* This wrapper is used by the libFuzzer main to call into libxul */
 
 void libFuzzerGetFuncs(const char* moduleName, LibFuzzerInitFunc* initFunc,
                        LibFuzzerTestingFunc* testingFunc) {
-  return XRE_LibFuzzerGetFuncs(moduleName, initFunc, testingFunc);
+  return gBootstrap->XRE_LibFuzzerGetFuncs(moduleName, initFunc, testingFunc);
 }
 #endif
 
-static int do_main(int argc, char* argv[], char* envp[], nsIFile *xreDirectory)
+static int do_main(int argc, char* argv[], char* envp[])
 {
-  nsCOMPtr<nsIFile> appini;
-  nsresult rv;
-  uint32_t mainFlags = 0;
-
   // Allow firefox.exe to launch XULRunner apps via -app <application.ini>
   // Note that -app must be the *first* argument.
   const char *appDataFile = getenv("XUL_APP_FILE");
-  if (appDataFile && *appDataFile) {
-    rv = XRE_GetFileFromPath(appDataFile, getter_AddRefs(appini));
-    if (NS_FAILED(rv)) {
-      Output("Invalid path found: '%s'", appDataFile);
-      return 255;
-    }
-  }
-  else if (argc > 1 && IsArg(argv[1], "app")) {
+  if ((!appDataFile || !*appDataFile) &&
+      (argc > 1 && IsArg(argv[1], "app"))) {
     if (argc == 2) {
       Output("Incorrect number of arguments passed to -app");
       return 255;
     }
-
-    rv = XRE_GetFileFromPath(argv[2], getter_AddRefs(appini));
-    if (NS_FAILED(rv)) {
-      Output("application.ini path not recognized: '%s'", argv[2]);
-      return 255;
-    }
+    appDataFile = argv[2];
 
     char appEnv[MAXPATHLEN];
     SprintfLiteral(appEnv, "XUL_APP_FILE=%s", argv[2]);
     if (putenv(strdup(appEnv))) {
       Output("Couldn't set %s.\n", appEnv);
       return 255;
     }
     argv[2] = argv[0];
@@ -250,95 +202,65 @@ static int do_main(int argc, char* argv[
     }
 
     XREShellData shellData;
 #if defined(XP_WIN) && defined(MOZ_SANDBOX)
     shellData.sandboxBrokerServices =
       sandboxing::GetInitializedBrokerServices();
 #endif
 
-    return XRE_XPCShellMain(--argc, argv, envp, &shellData);
+    return gBootstrap->XRE_XPCShellMain(--argc, argv, envp, &shellData);
   }
 
-  XREAppData appData;
-  appData.xreDirectory = xreDirectory;
+  BootstrapConfig config;
 
-  if (appini) {
-    rv = XRE_ParseAppData(appini, appData);
-    if (NS_FAILED(rv)) {
-      Output("Couldn't read application.ini");
-      return 255;
-    }
-
-    appini->GetParent(getter_AddRefs(appData.directory));
+  if (appDataFile && *appDataFile) {
+    config.appData = nullptr;
+    config.appDataPath = appDataFile;
   } else {
     // no -app flag so we use the compiled-in app data
-    appData = sAppData;
-
-    nsCOMPtr<nsIFile> exeFile;
-    rv = mozilla::BinaryPath::GetFile(argv[0], getter_AddRefs(exeFile));
-    if (NS_FAILED(rv)) {
-      Output("Couldn't find the application directory.\n");
-      return 255;
-    }
-
-    nsCOMPtr<nsIFile> greDir;
-    exeFile->GetParent(getter_AddRefs(greDir));
-#ifdef XP_MACOSX
-    greDir->SetNativeLeafName(NS_LITERAL_CSTRING(kOSXResourcesFolder));
-#endif
-    nsCOMPtr<nsIFile> appSubdir;
-    greDir->Clone(getter_AddRefs(appSubdir));
-    appSubdir->Append(NS_LITERAL_STRING(kDesktopFolder));
-    appData.directory = appSubdir;
+    config.appData = &sAppData;
+    config.appDataPath = kDesktopFolder;
   }
 
-#if defined(HAS_DLL_BLOCKLIST)
-  // The dll blocklist operates in the exe vs. xullib. Pass a flag to
-  // xullib so automated tests can check the result once the browser
-  // is up and running.
-  appData.flags |=
-    DllBlocklist_CheckStatus() ? NS_XRE_DLL_BLOCKLIST_ENABLED : 0;
-#endif
-
 #if defined(XP_WIN) && defined(MOZ_SANDBOX)
   sandbox::BrokerServices* brokerServices =
     sandboxing::GetInitializedBrokerServices();
 #if defined(MOZ_CONTENT_SANDBOX)
   if (!brokerServices) {
     Output("Couldn't initialize the broker services.\n");
     return 255;
   }
 #endif
-  appData.sandboxBrokerServices = brokerServices;
+  config.sandboxBrokerServices = brokerServices;
 #endif
 
 #ifdef LIBFUZZER
   if (getenv("LIBFUZZER"))
-    XRE_LibFuzzerSetMain(argc, argv, libfuzzer_main);
+    gBootstrap->XRE_LibFuzzerSetMain(argc, argv, libfuzzer_main);
 #endif
 
-  return XRE_main(argc, argv, appData, mainFlags);
+  return gBootstrap->XRE_main(argc, argv, config);
 }
 
 static bool
 FileExists(const char *path)
 {
 #ifdef XP_WIN
   wchar_t wideDir[MAX_PATH];
   MultiByteToWideChar(CP_UTF8, 0, path, -1, wideDir, MAX_PATH);
   DWORD fileAttrs = GetFileAttributesW(wideDir);
   return fileAttrs != INVALID_FILE_ATTRIBUTES;
 #else
   return access(path, R_OK) == 0;
 #endif
 }
 
 static nsresult
-InitXPCOMGlue(const char *argv0, nsIFile **xreDirectory)
+InitXPCOMGlue(const char *argv0)
 {
   char exePath[MAXPATHLEN];
 
   nsresult rv = mozilla::BinaryPath::Get(argv0, exePath);
   if (NS_FAILED(rv)) {
     Output("Couldn't find the application directory.\n");
     return rv;
   }
@@ -350,51 +272,26 @@ InitXPCOMGlue(const char *argv0, nsIFile
 
   strcpy(lastSlash + 1, XPCOM_DLL);
 
   if (!FileExists(exePath)) {
     Output("Could not find the Mozilla runtime.\n");
     return NS_ERROR_FAILURE;
   }
 
-  // We do this because of data in bug 771745
-  XPCOMGlueEnablePreload();
-
-  rv = XPCOMGlueStartup(exePath);
-  if (NS_FAILED(rv)) {
+  gBootstrap = mozilla::GetBootstrap(exePath);
+  if (!gBootstrap) {
     Output("Couldn't load XPCOM.\n");
-    return rv;
-  }
-
-  rv = XPCOMGlueLoadXULFunctions(kXULFuncs);
-  if (NS_FAILED(rv)) {
-    Output("Couldn't load XRE functions.\n");
-    return rv;
+    return NS_ERROR_FAILURE;
   }
 
   // This will set this thread as the main thread.
-  NS_LogInit();
+  gBootstrap->NS_LogInit();
 
-  if (xreDirectory) {
-    // chop XPCOM_DLL off exePath
-    *lastSlash = '\0';
-#ifdef XP_MACOSX
-    lastSlash = strrchr(exePath, XPCOM_FILE_PATH_SEPARATOR[0]);
-    strcpy(lastSlash + 1, kOSXResourcesFolder);
-#endif
-#ifdef XP_WIN
-    rv = NS_NewLocalFile(NS_ConvertUTF8toUTF16(exePath), false,
-                         xreDirectory);
-#else
-    rv = NS_NewNativeLocalFile(nsDependentCString(exePath), false,
-                               xreDirectory);
-#endif
-  }
-
-  return rv;
+  return NS_OK;
 }
 
 int main(int argc, char* argv[], char* envp[])
 {
   mozilla::TimeStamp start = mozilla::TimeStamp::Now();
 
 #ifdef HAS_DLL_BLOCKLIST
   DllBlocklist_Initialize();
@@ -416,52 +313,51 @@ int main(int argc, char* argv[], char* e
     // We need to initialize the sandbox TargetServices before InitXPCOMGlue
     // because we might need the sandbox broker to give access to some files.
     if (IsSandboxedProcess() && !sandboxing::GetInitializedTargetServices()) {
       Output("Failed to initialize the sandbox target services.");
       return 255;
     }
 #endif
 
-    nsresult rv = InitXPCOMGlue(argv[0], nullptr);
+    nsresult rv = InitXPCOMGlue(argv[0]);
     if (NS_FAILED(rv)) {
       return 255;
     }
 
-    int result = content_process_main(argc, argv);
+    int result = content_process_main(gBootstrap.get(), argc, argv);
 
     // InitXPCOMGlue calls NS_LogInit, so we need to balance it here.
-    NS_LogTerm();
+    gBootstrap->NS_LogTerm();
 
     return result;
   }
 #endif
 
 
-  nsCOMPtr<nsIFile> xreDirectory;
-
-  nsresult rv = InitXPCOMGlue(argv[0], getter_AddRefs(xreDirectory));
+  nsresult rv = InitXPCOMGlue(argv[0]);
   if (NS_FAILED(rv)) {
     return 255;
   }
 
-  XRE_StartupTimelineRecord(mozilla::StartupTimeline::START, start);
+  gBootstrap->XRE_StartupTimelineRecord(mozilla::StartupTimeline::START, start);
 
 #ifdef MOZ_BROWSER_CAN_BE_CONTENTPROC
-  XRE_EnableSameExecutableForContentProc();
+  gBootstrap->XRE_EnableSameExecutableForContentProc();
 #endif
 
-  int result = do_main(argc, argv, envp, xreDirectory);
+  int result = do_main(argc, argv, envp);
 
-  xreDirectory = nullptr;
-  NS_LogTerm();
+  gBootstrap->NS_LogTerm();
 
 #ifdef XP_MACOSX
   // Allow writes again. While we would like to catch writes from static
   // destructors to allow early exits to use _exit, we know that there is
   // at least one such write that we don't control (see bug 826029). For
   // now we enable writes again and early exits will have to use exit instead
   // of _exit.
-  XRE_StopLateWriteChecks();
+  gBootstrap->XRE_StopLateWriteChecks();
 #endif
 
+  gBootstrap.reset();
+
   return result;
 }
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -171,17 +171,17 @@ pref("extensions.dss.switchPending", fal
 
 pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.name", "chrome://browser/locale/browser.properties");
 pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.description", "chrome://browser/locale/browser.properties");
 
 pref("lightweightThemes.update.enabled", true);
 pref("lightweightThemes.getMoreURL", "https://addons.mozilla.org/%LOCALE%/firefox/themes");
 pref("lightweightThemes.recommendedThemes", "[{\"id\":\"recommended-1\",\"homepageURL\":\"https://addons.mozilla.org/firefox/addon/a-web-browser-renaissance/\",\"headerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/1.header.jpg\",\"footerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/1.footer.jpg\",\"textcolor\":\"#000000\",\"accentcolor\":\"#f2d9b1\",\"iconURL\":\"resource:///chrome/browser/content/browser/defaultthemes/1.icon.jpg\",\"previewURL\":\"resource:///chrome/browser/content/browser/defaultthemes/1.preview.jpg\",\"author\":\"Sean.Martell\",\"version\":\"0\"},{\"id\":\"recommended-2\",\"homepageURL\":\"https://addons.mozilla.org/firefox/addon/space-fantasy/\",\"headerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/2.header.jpg\",\"footerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/2.footer.jpg\",\"textcolor\":\"#ffffff\",\"accentcolor\":\"#d9d9d9\",\"iconURL\":\"resource:///chrome/browser/content/browser/defaultthemes/2.icon.jpg\",\"previewURL\":\"resource:///chrome/browser/content/browser/defaultthemes/2.preview.jpg\",\"author\":\"fx5800p\",\"version\":\"1.0\"},{\"id\":\"recommended-3\",\"homepageURL\":\"https://addons.mozilla.org/firefox/addon/linen-light/\",\"headerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/3.header.png\",\"footerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/3.footer.png\",\"accentcolor\":\"#ada8a8\",\"iconURL\":\"resource:///chrome/browser/content/browser/defaultthemes/3.icon.png\",\"previewURL\":\"resource:///chrome/browser/content/browser/defaultthemes/3.preview.png\",\"author\":\"DVemer\",\"version\":\"1.0\"},{\"id\":\"recommended-4\",\"homepageURL\":\"https://addons.mozilla.org/firefox/addon/pastel-gradient/\",\"headerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/4.header.png\",\"footerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/4.footer.png\",\"textcolor\":\"#000000\",\"accentcolor\":\"#000000\",\"iconURL\":\"resource:///chrome/browser/content/browser/defaultthemes/4.icon.png\",\"previewURL\":\"resource:///chrome/browser/content/browser/defaultthemes/4.preview.png\",\"author\":\"darrinhenein\",\"version\":\"1.0\"},{\"id\":\"recommended-5\",\"homepageURL\":\"https://addons.mozilla.org/firefox/addon/carbon-light/\",\"headerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/5.header.png\",\"footerURL\":\"resource:///chrome/browser/content/browser/defaultthemes/5.footer.png\",\"textcolor\":\"#3b3b3b\",\"accentcolor\":\"#2e2e2e\",\"iconURL\":\"resource:///chrome/browser/content/browser/defaultthemes/5.icon.jpg\",\"previewURL\":\"resource:///chrome/browser/content/browser/defaultthemes/5.preview.jpg\",\"author\":\"Jaxivo\",\"version\":\"1.0\"}]");
 
-#if defined(MOZ_ADOBE_EME) || defined(MOZ_WIDEVINE_EME)
+#if defined(MOZ_WIDEVINE_EME)
 pref("browser.eme.ui.enabled", true);
 #else
 pref("browser.eme.ui.enabled", false);
 #endif
 
 // UI tour experience.
 pref("browser.uitour.enabled", true);
 pref("browser.uitour.loglevel", "Error");
@@ -1019,16 +1019,27 @@ pref("security.sandbox.content.level", 2
 #if defined(MOZ_SANDBOX) && defined(MOZ_CONTENT_SANDBOX)
 // ID (a UUID when set by gecko) that is used to form the name of a
 // sandbox-writable temporary directory to be used by content processes
 // when a temporary writable file is required in a level 1 sandbox.
 pref("security.sandbox.content.tempDirSuffix", "");
 #endif
 #endif
 
+#if defined(MOZ_SANDBOX)
+#if defined(XP_MACOSX)
+// This pref determines if messages relevant to sandbox violations are
+// logged.
+// At present, this setting refers only to mac sandbox messages sent to
+// the system console but the setting will be used on other platforms
+// in the future.
+pref("security.sandbox.logging.enabled", true);
+#endif
+#endif
+
 // This pref governs whether we attempt to work around problems caused by
 // plugins using OS calls to manipulate the cursor while running out-of-
 // process.  These workarounds all involve intercepting (hooking) certain
 // OS calls in the plugin process, then arranging to make certain OS calls
 // in the browser process.  Eventually plugins will be required to use the
 // NPAPI to manipulate the cursor, and these workarounds will be removed.
 // See bug 621117.
 #ifdef XP_MACOSX
@@ -1351,47 +1362,28 @@ pref("ui.key.menuAccessKeyFocuses", true
 // enable DRM, whereupon the EME plugin binaries will be downloaded if
 // permission is granted.
 pref("media.eme.enabled", false);
 #else
 pref("media.eme.enabled", true);
 #endif
 pref("media.eme.apiVisible", true);
 
-// Decode using Gecko Media Plugins in <video>, if a system decoder is not
-// availble and the preferred GMP is available.
-pref("media.gmp.decoder.enabled", false);
-
-// If decoding-via-GMP is turned on for <video>, use Adobe's GMP for decoding,
-// if it's available. Note: We won't fallback to another GMP if Adobe's is not
-// installed.
-pref("media.gmp.decoder.aac", 2);
-pref("media.gmp.decoder.h264", 2);
-
 // Whether we should run a test-pattern through EME GMPs before assuming they'll
 // decode H.264.
 pref("media.gmp.trial-create.enabled", true);
 
 // Note: when media.gmp-*.visible is true, provided we're running on a
 // supported platform/OS version, the corresponding CDM appears in the
 // plugins list, Firefox will download the GMP/CDM if enabled, and our
 // UI to re-enable EME prompts the user to re-enable EME if it's disabled
 // and script requests EME. If *.visible is false, we won't show the UI
 // to enable the CDM if its disabled; it's as if the keysystem is completely
 // unsupported.
 
-#ifdef MOZ_ADOBE_EME
-pref("media.gmp-eme-adobe.visible", true);
-// When Adobe EME is enabled in the build system, we don't actually enable
-// the plugin by default, so that it doesn't download and install by default.
-// When Adobe EME is first used, Firefox will prompt the user to enable it,
-// and then download the CDM.
-pref("media.gmp-eme-adobe.enabled", false);
-#endif
-
 #ifdef MOZ_WIDEVINE_EME
 pref("media.gmp-widevinecdm.visible", true);
 pref("media.gmp-widevinecdm.enabled", true);
 #endif
 
 // Play with different values of the decay time and get telemetry,
 // 0 means to randomize (and persist) the experiment value in users' profiles,
 // -1 means no experiment is run and we use the preferred value for frecency (6h)
--- a/browser/base/content/aboutNetError.xhtml
+++ b/browser/base/content/aboutNetError.xhtml
@@ -136,17 +136,17 @@
             var event = new CustomEvent("AboutNetErrorUIExpanded", {bubbles:true});
             document.dispatchEvent(event);
           }
         });
 
         if (allowOverride) {
           document.getElementById("overrideWeakCryptoPanel").style.display = "flex";
           var overrideLink = document.getElementById("overrideWeakCrypto");
-          overrideLink.addEventListener("click", () => doOverride(overrideLink), false);
+          overrideLink.addEventListener("click", () => doOverride(overrideLink));
         }
 
         if (!gIsCertError) {
           return;
         }
 
         if (getCSSClass() == "expertBadCert") {
           toggleDisplay(document.getElementById("badCertAdvancedPanel"));
@@ -286,17 +286,17 @@
                 checkbox.checked = true;
               }
 
               checkbox.addEventListener("change", function(changeEvt) {
                   var event = new CustomEvent("AboutNetErrorSetAutomatic",
                     {bubbles: true,
                      detail: changeEvt.target.checked});
                   document.dispatchEvent(event);
-                }, false);
+                });
             }
             const hasPrefStyleError = [
               "interrupted", // This happens with subresources that are above the max tls
               "SSL_ERROR_PROTOCOL_VERSION_ALERT",
               "SSL_ERROR_UNSUPPORTED_VERSION",
               "SSL_ERROR_NO_CYPHER_OVERLAP",
               "SSL_ERROR_NO_CIPHERS_SUPPORTED"
             ].some((substring) => getDescription().includes(substring));
@@ -436,17 +436,17 @@
           // display debug information about the cert error.
           var errorCode = document.getElementById("errorCode");
           if (errorCode) {
             errorCode.href = "javascript:void(0)";
             errorCode.addEventListener("click", () => {
               let debugInfo = document.getElementById("certificateErrorDebugInformation");
               debugInfo.style.display = "block";
               debugInfo.scrollIntoView({block: "start", behavior: "smooth"});
-            }, false);
+            });
           }
         }
 
         // Initialize the cert domain link.
         var link = document.getElementById("cert_domain_link");
         if (!link)
           return;
 
--- a/browser/base/content/aboutRobots.xhtml
+++ b/browser/base/content/aboutRobots.xhtml
@@ -24,17 +24,17 @@
   <head>
     <title>&robots.pagetitle;</title>
     <link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all" />
     <link rel="icon" type="image/png" id="favicon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAACGFjVEwAAAASAAAAAJNtBPIAAAAaZmNUTAAAAAAAAAAQAAAAEAAAAAAAAAAALuAD6AABhIDeugAAALhJREFUOI2Nk8sNxCAMRDlGohauXFOMpfTiAlxICqAELltHLqlgctg1InzMRhpFAc%2BLGWTnmoeZYamt78zXdZmaQtQMADlnU0OIAlbmJUBEcO4bRKQY2rUXIPmAGnDuG%2FBx3%2FfvOPVaDUg%2BoAPUf1PArIMCSD5glMEsUGaG%2BkyAFWIBaCsKuA%2BHGCNijLgP133XgOEtaPFMy2vUolEGJoCIzBmoRUR9%2B7rxj16DZaW%2FmgtmxnJ8V3oAnApQwNS5zpcAAAAaZmNUTAAAAAEAAAAQAAAAEAAAAAAAAAAAAB4D6AIB52fclgAAACpmZEFUAAAAAjiNY2AYBVhBc3Pzf2LEcGreqcbwH1kDNjHauWAUjAJyAADymxf9WF%2Bu8QAAABpmY1RMAAAAAwAAABAAAAAQAAAAAAAAAAAAHgPoAgEK8Q9%2FAAAAFmZkQVQAAAAEOI1jYBgFo2AUjAIIAAAEEAAB0xIn4wAAABpmY1RMAAAABQAAABAAAAAQAAAAAAAAAAAAHgPoAgHnO30FAAAAQGZkQVQAAAAGOI1jYBieYKcaw39ixHCC%2F6cwFWMTw2rz%2F1MM%2F6Vu%2Ff%2F%2F%2FxTD%2F51qEIwuRjsXILuEGLFRMApgAADhNCsVfozYcAAAABpmY1RMAAAABwAAABAAAAAQAAAAAAAAAAAAHgPoAgEKra7sAAAAFmZkQVQAAAAIOI1jYBgFo2AUjAIIAAAEEAABM9s3hAAAABpmY1RMAAAACQAAABAAAAAQAAAAAAAAAAAAHgPoAgHn3p%2BwAAAAKmZkQVQAAAAKOI1jYBgFWEFzc%2FN%2FYsRwat6pxvAfWQM2Mdq5YBSMAnIAAPKbF%2F1BhPl6AAAAGmZjVEwAAAALAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAQpITFkAAAAWZmRBVAAAAAw4jWNgGAWjYBSMAggAAAQQAAHaszpmAAAAGmZjVEwAAAANAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAeeCPiMAAABAZmRBVAAAAA44jWNgGJ5gpxrDf2LEcIL%2FpzAVYxPDavP%2FUwz%2FpW79%2F%2F%2F%2FFMP%2FnWoQjC5GOxcgu4QYsVEwCmAAAOE0KxUmBL0KAAAAGmZjVEwAAAAPAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAQoU7coAAAAWZmRBVAAAABA4jWNgGAWjYBSMAggAAAQQAAEpOBELAAAAGmZjVEwAAAARAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAeYVWtoAAAAqZmRBVAAAABI4jWNgGAVYQXNz839ixHBq3qnG8B9ZAzYx2rlgFIwCcgAA8psX%2FWvpAecAAAAaZmNUTAAAABMAAAAQAAAAEAAAAAAAAAAAAB4D6AIBC4OJMwAAABZmZEFUAAAAFDiNY2AYBaNgFIwCCAAABBAAAcBQHOkAAAAaZmNUTAAAABUAAAAQAAAAEAAAAAAAAAAAAB4D6AIB5kn7SQAAAEBmZEFUAAAAFjiNY2AYnmCnGsN%2FYsRwgv%2BnMBVjE8Nq8%2F9TDP%2Blbv3%2F%2F%2F8Uw%2F%2BdahCMLkY7FyC7hBixUTAKYAAA4TQrFc%2BcEoQAAAAaZmNUTAAAABcAAAAQAAAAEAAAAAAAAAAAAB4D6AIBC98ooAAAABZmZEFUAAAAGDiNY2AYBaNgFIwCCAAABBAAASCZDI4AAAAaZmNUTAAAABkAAAAQAAAAEAAAAAAAAAAAAB4D6AIB5qwZ%2FAAAACpmZEFUAAAAGjiNY2AYBVhBc3Pzf2LEcGreqcbwH1kDNjHauWAUjAJyAADymxf9cjJWbAAAABpmY1RMAAAAGwAAABAAAAAQAAAAAAAAAAAAHgPoAgELOsoVAAAAFmZkQVQAAAAcOI1jYBgFo2AUjAIIAAAEEAAByfEBbAAAABpmY1RMAAAAHQAAABAAAAAQAAAAAAAAAAAAHgPoAgHm8LhvAAAAQGZkQVQAAAAeOI1jYBieYKcaw39ixHCC%2F6cwFWMTw2rz%2F1MM%2F6Vu%2Ff%2F%2F%2FxTD%2F51qEIwuRjsXILuEGLFRMApgAADhNCsVlxR3%2FgAAABpmY1RMAAAAHwAAABAAAAAQAAAAAAAAAAAAHgPoAgELZmuGAAAAFmZkQVQAAAAgOI1jYBgFo2AUjAIIAAAEEAABHP5cFQAAABpmY1RMAAAAIQAAABAAAAAQAAAAAAAAAAAAHgPoAgHlgtAOAAAAKmZkQVQAAAAiOI1jYBgFWEFzc%2FN%2FYsRwat6pxvAfWQM2Mdq5YBSMAnIAAPKbF%2F0%2FMvDdAAAAAElFTkSuQmCC"/>
 
     <script type="application/javascript"><![CDATA[
       var buttonClicked = false;
       function robotButton() {
-        var button = document.getElementById('errorTryAgain');
+        var button = document.getElementById("errorTryAgain");
         if (buttonClicked) {
           button.style.visibility = "hidden";
         } else {
           var newLabel = button.getAttribute("label2");
           button.textContent = newLabel;
           buttonClicked = true;
         }
       }
--- a/browser/base/content/aboutaccounts/aboutaccounts.js
+++ b/browser/base/content/aboutaccounts/aboutaccounts.js
@@ -265,17 +265,17 @@ var wrapper = {
 
     fxAccounts.signOut().then(
       () => this.injectData("message", { status: "sign_out" }),
       (err) => this.injectData("message", { status: "error", error: err })
     );
   },
 
   handleRemoteCommand(evt) {
-    log('command: ' + evt.detail.command);
+    log("command: " + evt.detail.command);
     let data = evt.detail.data;
 
     switch (evt.detail.command) {
       case "login":
         this.onLogin(data);
         break;
       case "can_link_account":
         this.onCanLinkAccount(data);
@@ -415,29 +415,29 @@ function setErrorPage(errorType) {
 // Causes the "top-level" element with |id| to be shown - all other top-level
 // elements are hidden.  Optionally, ensures that only 1 "second-level" element
 // inside the top-level one is shown.
 function show(id, childId) {
   // top-level items are either <div> or <iframe>
   let allTop = document.querySelectorAll("body > div, iframe");
   for (let elt of allTop) {
     if (elt.getAttribute("id") == id) {
-      elt.style.display = 'block';
+      elt.style.display = "block";
     } else {
-      elt.style.display = 'none';
+      elt.style.display = "none";
     }
   }
   if (childId) {
     // child items are all <div>
     let allSecond = document.querySelectorAll("#" + id + " > div");
     for (let elt of allSecond) {
       if (elt.getAttribute("id") == childId) {
-        elt.style.display = 'block';
+        elt.style.display = "block";
       } else {
-        elt.style.display = 'none';
+        elt.style.display = "none";
       }
     }
   }
 }
 
 // Migrate sync data from the default profile to the dev-edition profile.
 // Returns a promise of a true value if migration succeeded, or false if it
 // failed.
@@ -495,27 +495,27 @@ function getDefaultProfilePath() {
                         .getService(Ci.nsIToolkitProfileService)
                         .defaultProfile;
   return defaultProfile.rootDir.path;
 }
 
 document.addEventListener("DOMContentLoaded", function onload() {
   document.removeEventListener("DOMContentLoaded", onload, true);
   init();
-  var buttonGetStarted = document.getElementById('buttonGetStarted');
-  buttonGetStarted.addEventListener('click', getStarted);
+  var buttonGetStarted = document.getElementById("buttonGetStarted");
+  buttonGetStarted.addEventListener("click", getStarted);
 
-  var buttonRetry = document.getElementById('buttonRetry');
-  buttonRetry.addEventListener('click', retry);
+  var buttonRetry = document.getElementById("buttonRetry");
+  buttonRetry.addEventListener("click", retry);
 
-  var oldsync = document.getElementById('oldsync');
-  oldsync.addEventListener('click', handleOldSync);
+  var oldsync = document.getElementById("oldsync");
+  oldsync.addEventListener("click", handleOldSync);
 
-  var buttonOpenPrefs = document.getElementById('buttonOpenPrefs')
-  buttonOpenPrefs.addEventListener('click', openPrefs);
+  var buttonOpenPrefs = document.getElementById("buttonOpenPrefs")
+  buttonOpenPrefs.addEventListener("click", openPrefs);
 }, true);
 
 function initObservers() {
   function observe(subject, topic, data) {
     log("about:accounts observed " + topic);
     if (topic == fxAccountsCommon.ONLOGOUT_NOTIFICATION) {
       // All about:account windows get changed to action=signin on logout.
       window.location = "about:accounts?action=signin";
--- a/browser/base/content/abouthealthreport/abouthealth.js
+++ b/browser/base/content/abouthealthreport/abouthealth.js
@@ -12,17 +12,17 @@ Cu.import("resource://gre/modules/Servic
 const prefs = new Preferences("datareporting.healthreport.");
 
 const PREF_UNIFIED = "toolkit.telemetry.unified";
 const PREF_REPORTING_URL = "datareporting.healthreport.about.reportUrl";
 
 var healthReportWrapper = {
   init() {
     let iframe = document.getElementById("remote-report");
-    iframe.addEventListener("load", healthReportWrapper.initRemotePage, false);
+    iframe.addEventListener("load", healthReportWrapper.initRemotePage);
     iframe.src = this._getReportURI().spec;
     prefs.observe("uploadEnabled", this.updatePrefState, healthReportWrapper);
   },
 
   uninit() {
     prefs.ignore("uploadEnabled", this.updatePrefState, healthReportWrapper);
   },
 
@@ -144,18 +144,17 @@ var healthReportWrapper = {
         Cu.reportError("Unexpected remote command received: " + evt.detail.command + ". Ignoring command.");
         break;
     }
   },
 
   initRemotePage() {
     let iframe = document.getElementById("remote-report").contentDocument;
     iframe.addEventListener("RemoteHealthReportCommand",
-                            function onCommand(e) { healthReportWrapper.handleRemoteCommand(e); },
-                            false);
+                            function onCommand(e) { healthReportWrapper.handleRemoteCommand(e); });
     healthReportWrapper.updatePrefState();
   },
 
   // error handling
   ERROR_INIT_FAILED:    1,
   ERROR_PAYLOAD_FAILED: 2,
   ERROR_PREFS_FAILED:   3,
 
--- a/browser/base/content/blockedSite.xhtml
+++ b/browser/base/content/blockedSite.xhtml
@@ -130,17 +130,17 @@
         if (!getOverride()) {
           var btn = document.getElementById("ignoreWarningButton");
           if (btn) {
             btn.parentNode.removeChild(btn);
           }
         }
 
         // Inform the test harness that we're done loading the page
-        var event = new CustomEvent("AboutBlockedLoaded");
+        var event = new CustomEvent("AboutBlockedLoaded", {bubbles:true});
         document.dispatchEvent(event);
       }
     ]]></script>
   </head>
 
   <body dir="&locale.dir;">
     <div id="errorPageContainer" class="container">
 
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -464,16 +464,72 @@ const gXPInstallObserver = {
   },
   _removeProgressNotification(aBrowser) {
     let notification = PopupNotifications.getNotification("addon-progress", aBrowser);
     if (notification)
       notification.remove();
   }
 };
 
+const gExtensionsNotifications = {
+  initialized: false,
+  init() {
+    this.updateAlerts();
+    this.boundUpdate = this.updateAlerts.bind(this);
+    ExtensionsUI.on("change", this.boundUpdate);
+    this.initialized = true;
+  },
+
+  uninit() {
+    // uninit() can race ahead of init() in some cases, if that happens,
+    // we have no handler to remove.
+    if (!this.initialized) {
+      return;
+    }
+    ExtensionsUI.off("change", this.boundUpdate);
+  },
+
+  updateAlerts() {
+    let sideloaded = ExtensionsUI.sideloaded;
+    if (sideloaded.size == 0) {
+      gMenuButtonBadgeManager.removeBadge(gMenuButtonBadgeManager.BADGEID_ADDONS);
+    } else {
+      gMenuButtonBadgeManager.addBadge(gMenuButtonBadgeManager.BADGEID_ADDONS,
+                                       "addon-alert");
+    }
+
+    let container = document.getElementById("PanelUI-footer-addons");
+
+    while (container.firstChild) {
+      container.firstChild.remove();
+    }
+
+    // Strings below to be properly localized in bug 1316996
+    const DEFAULT_EXTENSION_ICON =
+      "chrome://mozapps/skin/extensions/extensionGeneric.svg";
+    let items = 0;
+    for (let addon of sideloaded) {
+      if (++items > 4) {
+        break;
+      }
+      let button = document.createElement("toolbarbutton");
+      button.setAttribute("label", `"${addon.name}" added to Firefox`);
+
+      let icon = addon.iconURL || DEFAULT_EXTENSION_ICON;
+      button.setAttribute("image", icon);
+
+      button.addEventListener("click", evt => {
+        ExtensionsUI.showSideloaded(gBrowser, addon);
+      });
+
+      container.appendChild(button);
+    }
+  },
+};
+
 var LightWeightThemeWebInstaller = {
   init() {
     let mm = window.messageManager;
     mm.addMessageListener("LightWeightThemeWebInstaller:Install", this);
     mm.addMessageListener("LightWeightThemeWebInstaller:Preview", this);
     mm.addMessageListener("LightWeightThemeWebInstaller:ResetPreview", this);
   },
 
@@ -661,24 +717,24 @@ var LightWeightThemeWebInstaller = {
     if (!this._isAllowed(baseURI))
       return;
 
     let data = this._manager.parseTheme(dataString, baseURI);
     if (!data)
       return;
 
     this._resetPreview();
-    gBrowser.tabContainer.addEventListener("TabSelect", this, false);
+    gBrowser.tabContainer.addEventListener("TabSelect", this);
     this._manager.previewTheme(data);
   },
 
   _resetPreview(baseURI) {
     if (baseURI && !this._isAllowed(baseURI))
       return;
-    gBrowser.tabContainer.removeEventListener("TabSelect", this, false);
+    gBrowser.tabContainer.removeEventListener("TabSelect", this);
     this._manager.resetPreview();
   },
 
   _isAllowed(srcURIString) {
     let uri;
     try {
       uri = makeURI(srcURIString);
     } catch (e) {
--- a/browser/base/content/browser-ctrlTab.js
+++ b/browser/base/content/browser-ctrlTab.js
@@ -6,18 +6,18 @@
  * Tab previews utility, produces thumbnails
  */
 var tabPreviews = {
   init: function tabPreviews_init() {
     if (this._selectedTab)
       return;
     this._selectedTab = gBrowser.selectedTab;
 
-    gBrowser.tabContainer.addEventListener("TabSelect", this, false);
-    gBrowser.tabContainer.addEventListener("SSTabRestored", this, false);
+    gBrowser.tabContainer.addEventListener("TabSelect", this);
+    gBrowser.tabContainer.addEventListener("SSTabRestored", this);
 
     let screenManager = Cc["@mozilla.org/gfx/screenmanager;1"]
                           .getService(Ci.nsIScreenManager);
     let left = {}, top = {}, width = {}, height = {};
     screenManager.primaryScreen.GetRectDisplayPix(left, top, width, height);
     this.aspectRatio = height.value / width.value;
   },
 
@@ -95,26 +95,26 @@ var tabPreviews = {
   }
 };
 
 var tabPreviewPanelHelper = {
   opening(host) {
     host.panel.hidden = false;
 
     var handler = this._generateHandler(host);
-    host.panel.addEventListener("popupshown", handler, false);
-    host.panel.addEventListener("popuphiding", handler, false);
+    host.panel.addEventListener("popupshown", handler);
+    host.panel.addEventListener("popuphiding", handler);
 
     host._prevFocus = document.commandDispatcher.focusedElement;
   },
   _generateHandler(host) {
     var self = this;
     return function(event) {
       if (event.target == host.panel) {
-        host.panel.removeEventListener(event.type, arguments.callee, false);
+        host.panel.removeEventListener(event.type, arguments.callee);
         self["_" + event.type](host);
       }
     };
   },
   _popupshown(host) {
     if ("setupGUI" in host)
       host.setupGUI();
   },
--- a/browser/base/content/browser-data-submission-info-bar.js
+++ b/browser/base/content/browser-data-submission-info-bar.js
@@ -27,17 +27,17 @@ var gDataNotificationInfoBar = {
     return this._log = Log.repository.getLoggerWithMessagePrefix(LOGGER_NAME, LOGGER_PREFIX);
   },
 
   init() {
     window.addEventListener("unload", () => {
       for (let o of this._OBSERVERS) {
         Services.obs.removeObserver(this, o);
       }
-    }, false);
+    });
 
     for (let o of this._OBSERVERS) {
       Services.obs.addObserver(this, o, true);
     }
   },
 
   _getDataReportingNotification(name = this._DATA_REPORTING_NOTIFICATION) {
     return this._notificationBox.getNotificationWithValue(name);
--- a/browser/base/content/browser-fullScreenAndPointerLock.js
+++ b/browser/base/content/browser-fullScreenAndPointerLock.js
@@ -289,18 +289,18 @@ var FullScreen = {
     if (AppConstants.platform == "macosx") {
       // Make sure the menu items are adjusted.
       document.getElementById("enterFullScreenItem").hidden = enterFS;
       document.getElementById("exitFullScreenItem").hidden = !enterFS;
     }
 
     if (!this._fullScrToggler) {
       this._fullScrToggler = document.getElementById("fullscr-toggler");
-      this._fullScrToggler.addEventListener("mouseover", this._expandCallback, false);
-      this._fullScrToggler.addEventListener("dragenter", this._expandCallback, false);
+      this._fullScrToggler.addEventListener("mouseover", this._expandCallback);
+      this._fullScrToggler.addEventListener("dragenter", this._expandCallback);
     }
 
     if (enterFS) {
       gNavToolbox.setAttribute("inFullscreen", true);
       document.documentElement.setAttribute("inFullscreen", true);
       if (!document.fullscreenElement && this.useLionFullScreen)
         document.documentElement.setAttribute("OSXLionFullscreen", true);
     } else {
@@ -308,19 +308,19 @@ var FullScreen = {
       document.documentElement.removeAttribute("inFullscreen");
       document.documentElement.removeAttribute("OSXLionFullscreen");
     }
 
     if (!document.fullscreenElement)
       this._updateToolbars(enterFS);
 
     if (enterFS) {
-      document.addEventListener("keypress", this._keyToggleCallback, false);
-      document.addEventListener("popupshown", this._setPopupOpen, false);
-      document.addEventListener("popuphidden", this._setPopupOpen, false);
+      document.addEventListener("keypress", this._keyToggleCallback);
+      document.addEventListener("popupshown", this._setPopupOpen);
+      document.addEventListener("popuphidden", this._setPopupOpen);
       // In DOM fullscreen mode, we hide toolbars with CSS
       if (!document.fullscreenElement)
         this.hideNavToolbox(true);
     } else {
       this.showNavToolbox(false);
       // This is needed if they use the context menu to quit fullscreen
       this._isPopupOpen = false;
       this.cleanup();
@@ -450,19 +450,19 @@ var FullScreen = {
     // If a fullscreen window loses focus, we show a warning when the
     // fullscreen window is refocused.
     window.addEventListener("activate", this);
   },
 
   cleanup() {
     if (!window.fullScreen) {
       MousePosTracker.removeListener(this);
-      document.removeEventListener("keypress", this._keyToggleCallback, false);
-      document.removeEventListener("popupshown", this._setPopupOpen, false);
-      document.removeEventListener("popuphidden", this._setPopupOpen, false);
+      document.removeEventListener("keypress", this._keyToggleCallback);
+      document.removeEventListener("popupshown", this._setPopupOpen);
+      document.removeEventListener("popuphidden", this._setPopupOpen);
     }
   },
 
   cleanupDomFullscreen() {
     window.messageManager
           .broadcastAsyncMessage("DOMFullscreen:CleanUp");
 
     PointerlockFsWarning.close();
--- a/browser/base/content/browser-fxaccounts.js
+++ b/browser/base/content/browser-fxaccounts.js
@@ -78,16 +78,38 @@ var gFxAccounts = {
     // away by themselves, so aren't reflected here.
     return Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED;
   },
 
   get sendTabToDeviceEnabled() {
     return Services.prefs.getBoolPref("services.sync.sendTabToDevice.enabled");
   },
 
+  isSendableURI(aURISpec) {
+    if (!aURISpec) {
+      return false;
+    }
+    // Disallow sending tabs with more than 65535 characters.
+    if (aURISpec.length > 65535) {
+      return false;
+    }
+    try {
+      // Filter out un-sendable URIs -- things like local files, object urls, etc.
+      const unsendableRegexp = new RegExp(
+        Services.prefs.getCharPref("services.sync.engine.tabs.filteredUrls"), "i");
+      return !unsendableRegexp.test(aURISpec);
+    } catch (e) {
+      // The preference has been removed, or is an invalid regexp, so we log an
+      // error and treat it as a valid URI -- and the more problematic case is
+      // the length, which we've already addressed.
+      Cu.reportError(`Failed to build url filter regexp for send tab: ${e}`);
+      return true;
+    }
+  },
+
   get remoteClients() {
     return Weave.Service.clientsEngine.remoteClients
            .sort((a, b) => a.name.localeCompare(b.name));
   },
 
   init() {
     // Bail out if we're already initialized and for pop-up windows.
     if (this._initialized || !window.toolbar.visible) {
@@ -405,40 +427,49 @@ var gFxAccounts = {
       fragment.appendChild(separator);
       const allDevicesLabel = this.strings.GetStringFromName("sendTabToAllDevices.menuitem");
       addTargetDevice("", allDevicesLabel);
     }
 
     devicesPopup.appendChild(fragment);
   },
 
-  updateTabContextMenu(aPopupMenu) {
+  updateTabContextMenu(aPopupMenu, aTargetTab) {
     if (!this.sendTabToDeviceEnabled) {
       return;
     }
 
-    const remoteClientPresent = this.remoteClients.length > 0;
+    const targetURI = aTargetTab.linkedBrowser.currentURI.spec;
+    const showSendTab = this.remoteClients.length > 0 && this.isSendableURI(targetURI);
+
     ["context_sendTabToDevice", "context_sendTabToDevice_separator"]
-    .forEach(id => { document.getElementById(id).hidden = !remoteClientPresent });
+    .forEach(id => { document.getElementById(id).hidden = !showSendTab });
   },
 
   initPageContextMenu(contextMenu) {
     if (!this.sendTabToDeviceEnabled) {
       return;
     }
 
     const remoteClientPresent = this.remoteClients.length > 0;
     // showSendLink and showSendPage are mutually exclusive
-    const showSendLink = remoteClientPresent
-                         && (contextMenu.onSaveableLink || contextMenu.onPlainTextLink);
+    let showSendLink = remoteClientPresent
+                       && (contextMenu.onSaveableLink || contextMenu.onPlainTextLink);
     const showSendPage = !showSendLink && remoteClientPresent
                          && !(contextMenu.isContentSelected ||
                               contextMenu.onImage || contextMenu.onCanvas ||
                               contextMenu.onVideo || contextMenu.onAudio ||
-                              contextMenu.onLink || contextMenu.onTextInput);
+                              contextMenu.onLink || contextMenu.onTextInput)
+                         && this.isSendableURI(contextMenu.browser.currentURI.spec);
+
+    if (showSendLink) {
+      // This isn't part of the condition above since we don't want to try and
+      // send the page if a link is clicked on or selected but is not sendable.
+      showSendLink = this.isSendableURI(contextMenu.linkURL);
+    }
 
     ["context-sendpagetodevice", "context-sep-sendpagetodevice"]
     .forEach(id => contextMenu.showItem(id, showSendPage));
     ["context-sendlinktodevice", "context-sep-sendlinktodevice"]
     .forEach(id => contextMenu.showItem(id, showSendLink));
   }
 };
 
--- a/browser/base/content/browser-gestureSupport.js
+++ b/browser/base/content/browser-gestureSupport.js
@@ -593,33 +593,33 @@ var gHistorySwipeAnimation = {
     this._maxSnapshots = this._getMaxSnapshots();
     this._lastSwipeDir = "";
     this._direction = "horizontal";
 
     // We only want to activate history swipe animations if we store snapshots.
     // If we don't store any, we handle horizontal swipes without animations.
     if (this._maxSnapshots > 0) {
       this.active = true;
-      gBrowser.addEventListener("pagehide", this, false);
-      gBrowser.addEventListener("pageshow", this, false);
-      gBrowser.addEventListener("popstate", this, false);
-      gBrowser.addEventListener("DOMModalDialogClosed", this, false);
-      gBrowser.tabContainer.addEventListener("TabClose", this, false);
+      gBrowser.addEventListener("pagehide", this);
+      gBrowser.addEventListener("pageshow", this);
+      gBrowser.addEventListener("popstate", this);
+      gBrowser.addEventListener("DOMModalDialogClosed", this);
+      gBrowser.tabContainer.addEventListener("TabClose", this);
     }
   },
 
   /**
    * Uninitializes the support for history swipe animations.
    */
   uninit: function HSA_uninit() {
-    gBrowser.removeEventListener("pagehide", this, false);
-    gBrowser.removeEventListener("pageshow", this, false);
-    gBrowser.removeEventListener("popstate", this, false);
-    gBrowser.removeEventListener("DOMModalDialogClosed", this, false);
-    gBrowser.tabContainer.removeEventListener("TabClose", this, false);
+    gBrowser.removeEventListener("pagehide", this);
+    gBrowser.removeEventListener("pageshow", this);
+    gBrowser.removeEventListener("popstate", this);
+    gBrowser.removeEventListener("DOMModalDialogClosed", this);
+    gBrowser.tabContainer.removeEventListener("TabClose", this);
 
     this.active = false;
     this.isLTR = false;
   },
 
   /**
    * Starts the swipe animation and handles fast swiping (i.e. a swipe animation
    * is already in progress when a new one is initiated).
--- a/browser/base/content/browser-media.js
+++ b/browser/base/content/browser-media.js
@@ -11,37 +11,28 @@ var gEMEHandler = {
     // Force-disable on WinXP:
     if (navigator.platform.toLowerCase().startsWith("win")) {
       emeUIEnabled = emeUIEnabled && parseFloat(Services.sysinfo.get("version")) >= 6;
     }
     return emeUIEnabled;
   },
   ensureEMEEnabled(browser, keySystem) {
     Services.prefs.setBoolPref("media.eme.enabled", true);
-    if (keySystem) {
-      if (keySystem.startsWith("com.adobe") &&
-          Services.prefs.getPrefType("media.gmp-eme-adobe.enabled") &&
-          !Services.prefs.getBoolPref("media.gmp-eme-adobe.enabled")) {
-        Services.prefs.setBoolPref("media.gmp-eme-adobe.enabled", true);
-      } else if (keySystem == "com.widevine.alpha" &&
-                 Services.prefs.getPrefType("media.gmp-widevinecdm.enabled") &&
-                 !Services.prefs.getBoolPref("media.gmp-widevinecdm.enabled")) {
-        Services.prefs.setBoolPref("media.gmp-widevinecdm.enabled", true);
-      }
+    if (keySystem &&
+        keySystem == "com.widevine.alpha" &&
+        Services.prefs.getPrefType("media.gmp-widevinecdm.enabled") &&
+        !Services.prefs.getBoolPref("media.gmp-widevinecdm.enabled")) {
+      Services.prefs.setBoolPref("media.gmp-widevinecdm.enabled", true);
     }
     browser.reload();
   },
   isKeySystemVisible(keySystem) {
     if (!keySystem) {
       return false;
     }
-    if (keySystem.startsWith("com.adobe") &&
-        Services.prefs.getPrefType("media.gmp-eme-adobe.visible")) {
-      return Services.prefs.getBoolPref("media.gmp-eme-adobe.visible");
-    }
     if (keySystem == "com.widevine.alpha" &&
         Services.prefs.getPrefType("media.gmp-widevinecdm.visible")) {
       return Services.prefs.getBoolPref("media.gmp-widevinecdm.visible");
     }
     return true;
   },
   getLearnMoreLink(msgId) {
     let text = gNavigatorBundle.getString("emeNotifications." + msgId + ".learnMoreLabel");
@@ -342,9 +333,9 @@ let gDecoderDoctorHandler = {
   },
 }
 
 window.getGroupMessageManager("browsers").addMessageListener("DecoderDoctor:Notification", gDecoderDoctorHandler);
 window.getGroupMessageManager("browsers").addMessageListener("EMEVideo:ContentMediaKeysRequest", gEMEHandler);
 window.addEventListener("unload", function() {
   window.getGroupMessageManager("browsers").removeMessageListener("EMEVideo:ContentMediaKeysRequest", gEMEHandler);
   window.getGroupMessageManager("browsers").removeMessageListener("DecoderDoctor:Notification", gDecoderDoctorHandler);
-}, false);
+});
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -2,34 +2,38 @@
  * 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/. */
 
 var StarUI = {
   _itemId: -1,
   uri: null,
   _batching: false,
   _isNewBookmark: false,
+  _isComposing: false,
   _autoCloseTimer: 0,
 
   _element(aID) {
     return document.getElementById(aID);
   },
 
   // Edit-bookmark panel
   get panel() {
     delete this.panel;
     var element = this._element("editBookmarkPanel");
     // initially the panel is hidden
     // to avoid impacting startup / new window performance
     element.hidden = false;
-    element.addEventListener("keypress", this, false);
-    element.addEventListener("mouseout", this, false);
-    element.addEventListener("mousemove", this, false);
-    element.addEventListener("popuphidden", this, false);
-    element.addEventListener("popupshown", this, false);
+    element.addEventListener("keypress", this);
+    element.addEventListener("mouseout", this);
+    element.addEventListener("mousemove", this);
+    element.addEventListener("compositionstart", this);
+    element.addEventListener("compositionend", this);
+    element.addEventListener("input", this);
+    element.addEventListener("popuphidden", this);
+    element.addEventListener("popupshown", this);
     return this.panel = element;
   },
 
   // Array of command elements to disable when the panel is opened.
   get _blockedCommands() {
     delete this._blockedCommands;
     return this._blockedCommands =
       ["cmd_close", "cmd_closeWindow"].map(id => this._element(id));
@@ -130,31 +134,51 @@ var StarUI = {
           case 0:
             let accessKey = document.getElementById("key_close");
             if (eventMatchesKey(aEvent, accessKey)) {
                 this.panel.hidePopup();
             }
             break;
         }
         break;
+      case "compositionstart":
+        if (aEvent.defaultPrevented) {
+          // If the composition was canceled, nothing to do here.
+          break;
+        }
+        // During composition, panel shouldn't be hidden automatically.
+        clearTimeout(this._autoCloseTimer);
+        this._isComposing = true;
+        break;
+      case "compositionend":
+        // After composition is committed, "mouseout" or something can set
+        // auto close timer.
+        this._isComposing = false;
+        break;
+      case "input":
+        // Might be edited some text without keyboard events nor composition
+        // events. Let's cancel auto close in such case.
+        clearTimeout(this._autoCloseTimer);
+        break;
       case "mouseout":
         // Explicit fall-through
       case "popupshown":
         // Don't handle events for descendent elements.
         if (aEvent.target != aEvent.currentTarget) {
           break;
         }
         // auto-close if new and not interacted with
-        if (this._isNewBookmark) {
+        if (this._isNewBookmark && !this._isComposing) {
           // 3500ms matches the timeout that Pocket uses in
           // browser/extensions/pocket/content/panels/js/saved.js
           let delay = 3500;
           if (this._closePanelQuickForTesting) {
             delay /= 10;
           }
+          clearTimeout(this._autoCloseTimer);
           this._autoCloseTimer = setTimeout(() => {
             this.panel.hidePopup();
           }, delay);
         }
         break;
     }
   },
 
@@ -1692,17 +1716,17 @@ var BookmarkingUI = {
       let widthDiff = referenceRect.width - rectToPosition.width;
       return [(leftDiff + .5 * widthDiff) + "px", (topDiff + .5 * heightDiff) + "px"];
     }
 
     if (this._notificationTimeout) {
       clearTimeout(this._notificationTimeout);
     }
 
-    if (this.notifier.style.transform == '') {
+    if (this.notifier.style.transform == "") {
       // Get all the relevant nodes and computed style objects
       let dropmarker = document.getAnonymousElementByAttribute(this.button, "anonid", "dropmarker");
       let dropmarkerIcon = document.getAnonymousElementByAttribute(dropmarker, "class", "dropmarker-icon");
       let dropmarkerStyle = getComputedStyle(dropmarkerIcon);
 
       // Check for RTL and get bounds
       let isRTL = getComputedStyle(this.button).direction == "rtl";
       let buttonRect = this.button.getBoundingClientRect();
@@ -1737,18 +1761,18 @@ var BookmarkingUI = {
       this.dropmarkerNotifier.setAttribute("notification", "finish");
     }
 
     this._notificationTimeout = setTimeout( () => {
       this.notifier.removeAttribute("notification");
       this.dropmarkerNotifier.removeAttribute("notification");
       this.button.removeAttribute("notification");
 
-      this.dropmarkerNotifier.style.transform = '';
-      this.notifier.style.transform = '';
+      this.dropmarkerNotifier.style.transform = "";
+      this.notifier.style.transform = "";
     }, 1000);
   },
 
   _showSubview() {
     let view = document.getElementById("PanelUI-bookmarks");
     view.addEventListener("ViewShowing", this);
     view.addEventListener("ViewHiding", this);
     let anchor = document.getElementById(this.BOOKMARK_BUTTON_ID);
--- a/browser/base/content/browser-plugins.js
+++ b/browser/base/content/browser-plugins.js
@@ -413,17 +413,17 @@ var gPluginHandler = {
             }
           }
         }
       ];
       n = notificationBox.
         appendNotification(message, "plugin-hidden", null,
                            notificationBox.PRIORITY_INFO_HIGH, buttons);
       if (haveInsecure) {
-        n.classList.add('pluginVulnerable');
+        n.classList.add("pluginVulnerable");
       }
     }
 
     if (actions.length == 0) {
       hideNotification();
     } else {
       let notificationPermission = Services.perms.testPermissionFromPrincipal(
         principal, "plugin-hidden-notification");
--- a/browser/base/content/browser-syncui.js
+++ b/browser/base/content/browser-syncui.js
@@ -57,26 +57,26 @@ var gSyncUI = {
 
     Services.obs.addObserver(this, "weave:service:ready", true);
     Services.obs.addObserver(this, "quit-application", true);
 
     // Remove the observer if the window is closed before the observer
     // was triggered.
     window.addEventListener("unload", function onUnload() {
       gSyncUI._unloaded = true;
-      window.removeEventListener("unload", onUnload, false);
+      window.removeEventListener("unload", onUnload);
       Services.obs.removeObserver(gSyncUI, "weave:service:ready");
       Services.obs.removeObserver(gSyncUI, "quit-application");
 
       if (Weave.Status.ready) {
         gSyncUI._obs.forEach(function(topic) {
           Services.obs.removeObserver(gSyncUI, topic);
         });
       }
-    }, false);
+    });
   },
 
   initUI: function SUI_initUI() {
     // If this is a browser window?
     if (gBrowser) {
       this._obs.push("weave:notification:added");
     }
 
@@ -427,19 +427,19 @@ var gSyncUI = {
     let sixDaysAgo = (() => {
       let tempDate = new Date();
       tempDate.setDate(tempDate.getDate() - 6);
       tempDate.setHours(0, 0, 0, 0);
       return tempDate;
     })();
     // It may be confusing for the user to see "Last Sync: Monday" when the last sync was a indeed a Monday but 3 weeks ago
     if (date < sixDaysAgo) {
-      dateFormat = {month: 'long', day: 'numeric'};
+      dateFormat = {month: "long", day: "numeric"};
     } else {
-      dateFormat = {weekday: 'long', hour: 'numeric', minute: 'numeric'};
+      dateFormat = {weekday: "long", hour: "numeric", minute: "numeric"};
     }
     let lastSyncDateString = date.toLocaleDateString(undefined, dateFormat);
     return this._stringBundle.formatStringFromName("lastSync2.label", [lastSyncDateString], 1);
   },
 
   onClientsSynced() {
     let broadcaster = document.getElementById("sync-syncnow-state");
     if (broadcaster) {
--- a/browser/base/content/browser-thumbnails.js
+++ b/browser/base/content/browser-thumbnails.js
@@ -32,29 +32,29 @@ var gBrowserThumbnails = {
     PageThumbs.addExpirationFilter(this);
     gBrowser.addTabsProgressListener(this);
     Services.prefs.addObserver(this.PREF_DISK_CACHE_SSL, this, false);
 
     this._sslDiskCacheEnabled =
       Services.prefs.getBoolPref(this.PREF_DISK_CACHE_SSL);
 
     this._tabEvents.forEach(function(aEvent) {
-      gBrowser.tabContainer.addEventListener(aEvent, this, false);
+      gBrowser.tabContainer.addEventListener(aEvent, this);
     }, this);
 
     this._timeouts = new WeakMap();
   },
 
   uninit: function Thumbnails_uninit() {
     PageThumbs.removeExpirationFilter(this);
     gBrowser.removeTabsProgressListener(this);
     Services.prefs.removeObserver(this.PREF_DISK_CACHE_SSL, this);
 
     this._tabEvents.forEach(function(aEvent) {
-      gBrowser.tabContainer.removeEventListener(aEvent, this, false);
+      gBrowser.tabContainer.removeEventListener(aEvent, this);
     }, this);
   },
 
   handleEvent: function Thumbnails_handleEvent(aEvent) {
     switch (aEvent.type) {
       case "scroll":
         let browser = aEvent.currentTarget;
         if (this._timeouts.has(browser))
@@ -129,14 +129,14 @@ var gBrowserThumbnails = {
       if (link)
         urls.push(link.url);
       return urls;
     }, []);
   },
 
   _clearTimeout: function Thumbnails_clearTimeout(aBrowser) {
     if (this._timeouts.has(aBrowser)) {
-      aBrowser.removeEventListener("scroll", this, false);
+      aBrowser.removeEventListener("scroll", this);
       clearTimeout(this._timeouts.get(aBrowser));
       this._timeouts.delete(aBrowser);
     }
   }
 };
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -42,16 +42,17 @@ Cu.import("resource://gre/modules/Notifi
   ["BrowserUsageTelemetry", "resource:///modules/BrowserUsageTelemetry.jsm"],
   ["BrowserUtils", "resource://gre/modules/BrowserUtils.jsm"],
   ["CastingApps", "resource:///modules/CastingApps.jsm"],
   ["CharsetMenu", "resource://gre/modules/CharsetMenu.jsm"],
   ["Color", "resource://gre/modules/Color.jsm"],
   ["ContentSearch", "resource:///modules/ContentSearch.jsm"],
   ["Deprecated", "resource://gre/modules/Deprecated.jsm"],
   ["E10SUtils", "resource:///modules/E10SUtils.jsm"],
+  ["ExtensionsUI", "resource:///modules/ExtensionsUI.jsm"],
   ["FormValidationHandler", "resource:///modules/FormValidationHandler.jsm"],
   ["GMPInstallManager", "resource://gre/modules/GMPInstallManager.jsm"],
   ["LightweightThemeManager", "resource://gre/modules/LightweightThemeManager.jsm"],
   ["Log", "resource://gre/modules/Log.jsm"],
   ["LoginManagerParent", "resource://gre/modules/LoginManagerParent.jsm"],
   ["NewTabUtils", "resource://gre/modules/NewTabUtils.jsm"],
   ["PageThumbs", "resource://gre/modules/PageThumbs.jsm"],
   ["PluralForm", "resource://gre/modules/PluralForm.jsm"],
@@ -113,17 +114,17 @@ if (AppConstants.MOZ_CRASHREPORTER) {
 
 XPCOMUtils.defineLazyGetter(this, "BrowserToolboxProcess", function() {
   let tmp = {};
   Cu.import("resource://devtools/client/framework/ToolboxProcess.jsm", tmp);
   return tmp.BrowserToolboxProcess;
 });
 
 XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() {
-  return Services.strings.createBundle('chrome://browser/locale/browser.properties');
+  return Services.strings.createBundle("chrome://browser/locale/browser.properties");
 });
 
 XPCOMUtils.defineLazyGetter(this, "gCustomizeMode", function() {
   let scope = {};
   Cu.import("resource:///modules/CustomizeMode.jsm", scope);
   return new scope.CustomizeMode(window);
 });
 
@@ -318,18 +319,18 @@ const gClickAndHoldListenersOnElement = 
     if (aEvent.button != 0 ||
         aEvent.currentTarget.open ||
         aEvent.currentTarget.disabled)
       return;
 
     // Prevent the menupopup from opening immediately
     aEvent.currentTarget.firstChild.hidden = true;
 
-    aEvent.currentTarget.addEventListener("mouseout", this, false);
-    aEvent.currentTarget.addEventListener("mouseup", this, false);
+    aEvent.currentTarget.addEventListener("mouseout", this);
+    aEvent.currentTarget.addEventListener("mouseup", this);
     this._timers.set(aEvent.currentTarget, setTimeout((b) => this._openMenu(b), 500, aEvent.currentTarget));
   },
 
   _clickHandler(aEvent) {
     if (aEvent.button == 0 &&
         aEvent.target == aEvent.currentTarget &&
         !aEvent.currentTarget.open &&
         !aEvent.currentTarget.disabled) {
@@ -363,18 +364,18 @@ const gClickAndHoldListenersOnElement = 
   },
 
   _mouseupHandler(aEvent) {
     this._cancelHold(aEvent.currentTarget);
   },
 
   _cancelHold(aButton) {
     clearTimeout(this._timers.get(aButton));
-    aButton.removeEventListener("mouseout", this, false);
-    aButton.removeEventListener("mouseup", this, false);
+    aButton.removeEventListener("mouseout", this);
+    aButton.removeEventListener("mouseup", this);
   },
 
   handleEvent(e) {
     switch (e.type) {
       case "mouseout":
         this._mouseoutHandler(e);
         break;
       case "mousedown":
@@ -748,17 +749,17 @@ function gKeywordURIFixup({ target: brow
   // Additionally, we need the host of the parsed url
   let hostName = alternativeURI.host;
   // and the ascii-only host for the pref:
   let asciiHost = alternativeURI.asciiHost;
   // Normalize out a single trailing dot - NB: not using endsWith/lastIndexOf
   // because we need to be sure this last dot is the *only* dot, too.
   // More generally, this is used for the pref and should stay in sync with
   // the code in nsDefaultURIFixup::KeywordURIFixup .
-  if (asciiHost.indexOf('.') == asciiHost.length - 1) {
+  if (asciiHost.indexOf(".") == asciiHost.length - 1) {
     asciiHost = asciiHost.slice(0, -1);
   }
 
   let isIPv4Address = host => {
     let parts = host.split(".");
     if (parts.length != 4) {
       return false;
     }
@@ -844,17 +845,17 @@ function gKeywordURIFixup({ target: brow
 // A shared function used by both remote and non-remote browser XBL bindings to
 // load a URI or redirect it to the correct process.
 function _loadURIWithFlags(browser, uri, params) {
   if (!uri) {
     uri = "about:blank";
   }
   let flags = params.flags || 0;
   let referrer = params.referrerURI;
-  let referrerPolicy = ('referrerPolicy' in params ? params.referrerPolicy :
+  let referrerPolicy = ("referrerPolicy" in params ? params.referrerPolicy :
                         Ci.nsIHttpChannel.REFERRER_POLICY_UNSET);
   let postData = params.postData;
 
   let currentRemoteType = browser.remoteType;
   let requiredRemoteType =
     E10SUtils.getRemoteTypeForURI(uri, gMultiProcessBrowser, currentRemoteType);
   let mustChangeProcess = requiredRemoteType != currentRemoteType;
 
@@ -867,16 +868,22 @@ function _loadURIWithFlags(browser, uri,
       if (params.userContextId) {
         browser.webNavigation.setOriginAttributesBeforeLoading({ userContextId: params.userContextId });
       }
 
       browser.webNavigation.loadURIWithOptions(uri, flags,
                                                referrer, referrerPolicy,
                                                postData, null, null);
     } else {
+      // Check if the current browser is allowed to unload.
+      let {permitUnload, timedOut} = browser.permitUnload();
+      if (!timedOut && !permitUnload) {
+        return;
+      }
+
       if (postData) {
         postData = NetUtil.readInputStreamToString(postData, postData.available());
       }
 
       let loadParams = {
         uri,
         flags,
         referrer: referrer ? referrer.spec : null,
@@ -978,17 +985,17 @@ addEventListener("DOMContentLoaded", fun
 
   gBrowser.updateBrowserRemoteness(initBrowser, gMultiProcessBrowser);
 });
 
 var gBrowserInit = {
   delayedStartupFinished: false,
 
   onLoad() {
-    gBrowser.addEventListener("DOMUpdatePageReport", gPopupBlockerObserver, false);
+    gBrowser.addEventListener("DOMUpdatePageReport", gPopupBlockerObserver);
 
     Services.obs.addObserver(gPluginHandler.NPAPIPluginCrashed, "plugin-crashed", false);
 
     window.addEventListener("AppCommand", HandleAppCommandEvent, true);
 
     // These routines add message listeners. They must run before
     // loading the frame script to ensure that we don't miss any
     // message sent between when the frame script is loaded and when
@@ -1336,18 +1343,18 @@ var gBrowserInit = {
     // The object handling the downloads indicator is also initialized here in the
     // delayed startup function, but the actual indicator element is not loaded
     // unless there are downloads to be displayed.
     DownloadsButton.initializeIndicator();
 
     if (AppConstants.platform != "macosx") {
       updateEditUIVisibility();
       let placesContext = document.getElementById("placesContext");
-      placesContext.addEventListener("popupshowing", updateEditUIVisibility, false);
-      placesContext.addEventListener("popuphiding", updateEditUIVisibility, false);
+      placesContext.addEventListener("popupshowing", updateEditUIVisibility);
+      placesContext.addEventListener("popuphiding", updateEditUIVisibility);
     }
 
     LightWeightThemeWebInstaller.init();
 
     if (Win7Features)
       Win7Features.onOpenWindow();
 
     FullScreen.init();
@@ -1361,18 +1368,20 @@ var gBrowserInit = {
       gDataNotificationInfoBar.init();
 
     gBrowserThumbnails.init();
 
     gMenuButtonBadgeManager.init();
 
     gMenuButtonUpdateBadge.init();
 
-    window.addEventListener("mousemove", MousePosTracker, false);
-    window.addEventListener("dragover", MousePosTracker, false);
+    gExtensionsNotifications.init();
+
+    window.addEventListener("mousemove", MousePosTracker);
+    window.addEventListener("dragover", MousePosTracker);
 
     gNavToolbox.addEventListener("customizationstarting", CustomizationHandler);
     gNavToolbox.addEventListener("customizationchange", CustomizationHandler);
     gNavToolbox.addEventListener("customizationending", CustomizationHandler);
 
     // End startup crash tracking after a delay to catch crashes while restoring
     // tabs and to postpone saving the pref to disk.
     try {
@@ -1490,16 +1499,18 @@ var gBrowserInit = {
     gGestureSupport.init(false);
 
     gHistorySwipeAnimation.uninit();
 
     FullScreen.uninit();
 
     gFxAccounts.uninit();
 
+    gExtensionsNotifications.uninit();
+
     Services.obs.removeObserver(gPluginHandler.NPAPIPluginCrashed, "plugin-crashed");
 
     try {
       gBrowser.removeProgressListener(window.XULBrowserWindow);
       gBrowser.removeTabsProgressListener(window.TabsProgressListener);
     } catch (ex) {
     }
 
@@ -1587,34 +1598,34 @@ var gBrowserInit = {
 };
 
 if (AppConstants.platform == "macosx") {
   // nonBrowserWindowStartup(), nonBrowserWindowDelayedStartup(), and
   // nonBrowserWindowShutdown() are used for non-browser windows in
   // macBrowserOverlay
   gBrowserInit.nonBrowserWindowStartup = function() {
     // Disable inappropriate commands / submenus
-    var disabledItems = ['Browser:SavePage',
-                         'Browser:SendLink', 'cmd_pageSetup', 'cmd_print', 'cmd_find', 'cmd_findAgain',
-                         'viewToolbarsMenu', 'viewSidebarMenuMenu', 'Browser:Reload',
-                         'viewFullZoomMenu', 'pageStyleMenu', 'charsetMenu', 'View:PageSource', 'View:FullScreen',
-                         'viewHistorySidebar', 'Browser:AddBookmarkAs', 'Browser:BookmarkAllTabs',
-                         'View:PageInfo'];
+    var disabledItems = ["Browser:SavePage",
+                         "Browser:SendLink", "cmd_pageSetup", "cmd_print", "cmd_find", "cmd_findAgain",
+                         "viewToolbarsMenu", "viewSidebarMenuMenu", "Browser:Reload",
+                         "viewFullZoomMenu", "pageStyleMenu", "charsetMenu", "View:PageSource", "View:FullScreen",
+                         "viewHistorySidebar", "Browser:AddBookmarkAs", "Browser:BookmarkAllTabs",
+                         "View:PageInfo"];
     var element;
 
     for (let disabledItem of disabledItems) {
       element = document.getElementById(disabledItem);
       if (element)
         element.setAttribute("disabled", "true");
     }
 
     // If no windows are active (i.e. we're the hidden window), disable the close, minimize
     // and zoom menu commands as well
     if (window.location.href == "chrome://browser/content/hiddenWindow.xul") {
-      var hiddenWindowDisabledItems = ['cmd_close', 'minimizeWindow', 'zoomWindow'];
+      var hiddenWindowDisabledItems = ["cmd_close", "minimizeWindow", "zoomWindow"];
       for (let hiddenWindowDisabledItem of hiddenWindowDisabledItems) {
         element = document.getElementById(hiddenWindowDisabledItem);
         if (element)
           element.setAttribute("disabled", "true");
       }
 
       // also hide the window-list separator
       element = document.getElementById("sep-window-list");
@@ -1717,17 +1728,17 @@ function HandleAppCommandEvent(evt) {
     break;
   case "Close":
     BrowserCloseTabOrWindow();
     break;
   case "Find":
     gFindBar.onFindCommand();
     break;
   case "Help":
-    openHelpLink('firefox-help');
+    openHelpLink("firefox-help");
     break;
   case "Open":
     BrowserOpenFileWindow();
     break;
   case "Print":
     PrintUtils.printWindow(gBrowser.selectedBrowser.outerWindowID,
                            gBrowser.selectedBrowser);
     break;
@@ -2541,19 +2552,19 @@ function SetPageProxyState(aState, aOpti
     return;
 
   gURLBar.setAttribute("pageproxystate", aState);
 
   // the page proxy state is set to valid via OnLocationChange, which
   // gets called when we switch tabs.
   if (aState == "valid") {
     gLastValidURLStr = gURLBar.value;
-    gURLBar.addEventListener("input", UpdatePageProxyState, false);
+    gURLBar.addEventListener("input", UpdatePageProxyState);
   } else if (aState == "invalid") {
-    gURLBar.removeEventListener("input", UpdatePageProxyState, false);
+    gURLBar.removeEventListener("input", UpdatePageProxyState);
   }
 
   // Only need to call anchorVisibilityChange if the PopupNotifications object
   // for this window has already been initialized (i.e. its getter no
   // longer exists). If this is the result of a locations change, then we will
   // already invoke PopupNotifications.locationChange separately.
   if (!Object.getOwnPropertyDescriptor(window, "PopupNotifications").get &&
       !aOptions.isForLocationChange) {
@@ -2565,52 +2576,56 @@ function PageProxyClickHandler(aEvent) {
   if (aEvent.button == 1 && gPrefService.getBoolPref("middlemouse.paste"))
     middleMousePaste(aEvent);
 }
 
 var gMenuButtonBadgeManager = {
   BADGEID_APPUPDATE: "update",
   BADGEID_DOWNLOAD: "download",
   BADGEID_FXA: "fxa",
+  BADGEID_ADDONS: "addons",
 
   fxaBadge: null,
   downloadBadge: null,
   appUpdateBadge: null,
+  addonsBadge: null,
 
   init() {
     PanelUI.panel.addEventListener("popupshowing", this, true);
   },
 
   uninit() {
     PanelUI.panel.removeEventListener("popupshowing", this, true);
   },
 
   handleEvent(e) {
     if (e.type === "popupshowing") {
       this.clearBadges();
     }
   },
 
   _showBadge() {
-    let badgeToShow = this.downloadBadge || this.appUpdateBadge || this.fxaBadge;
+    let badgeToShow = this.downloadBadge || this.appUpdateBadge || this.fxaBadge || this.addonsBadge;
 
     if (badgeToShow) {
       PanelUI.menuButton.setAttribute("badge-status", badgeToShow);
     } else {
       PanelUI.menuButton.removeAttribute("badge-status");
     }
   },
 
   _changeBadge(badgeId, badgeStatus = null) {
     if (badgeId == this.BADGEID_APPUPDATE) {
       this.appUpdateBadge = badgeStatus;
     } else if (badgeId == this.BADGEID_DOWNLOAD) {
       this.downloadBadge = badgeStatus;
     } else if (badgeId == this.BADGEID_FXA) {
       this.fxaBadge = badgeStatus;
+    } else if (badgeId == this.BADGEID_ADDONS) {
+      this.addonsBadge = badgeStatus;
     } else {
       Cu.reportError("The badge ID '" + badgeId + "' is unknown!");
     }
     this._showBadge();
   },
 
   addBadge(badgeId, badgeStatus) {
     if (!badgeStatus) {
@@ -2926,18 +2941,18 @@ var BrowserOnClick = {
               params.prefetchCert = true;
             case 1 : // Pre-populate
               params.location = location;
           }
         } catch (e) {
           Components.utils.reportError("Couldn't get ssl_override pref: " + e);
         }
 
-        window.openDialog('chrome://pippki/content/exceptionDialog.xul',
-                          '', 'chrome,centerscreen,modal', params);
+        window.openDialog("chrome://pippki/content/exceptionDialog.xul",
+                          "", "chrome,centerscreen,modal", params);
 
         // If the user added the exception cert, attempt to reload the page
         if (params.exceptionAdded) {
           browser.reload();
         }
         break;
 
       case "returnButton":
@@ -2995,23 +3010,23 @@ var BrowserOnClick = {
     Services.obs.addObserver(tabCloser, "captive-portal-login-success", false);
   },
 
   onAboutBlocked(elementId, reason, isTopFrame, location) {
     // Depending on what page we are displaying here (malware/phishing/unwanted)
     // use the right strings and links for each.
     let bucketName = "";
     let sendTelemetry = false;
-    if (reason === 'malware') {
+    if (reason === "malware") {
       sendTelemetry = true;
       bucketName = "WARNING_MALWARE_PAGE_";
-    } else if (reason === 'phishing') {
+    } else if (reason === "phishing") {
       sendTelemetry = true;
       bucketName = "WARNING_PHISHING_PAGE_";
-    } else if (reason === 'unwanted') {
+    } else if (reason === "unwanted") {
       sendTelemetry = true;
       bucketName = "WARNING_UNWANTED_PAGE_";
     }
     let secHistogram = Services.telemetry.getHistogramById("SECURITY_UI");
     let nsISecTel = Ci.nsISecurityUITelemetry;
     bucketName += isTopFrame ? "TOP_" : "FRAME_";
     switch (elementId) {
       case "getMeOutButton":
@@ -3080,35 +3095,35 @@ var BrowserOnClick = {
 
     let buttons = [{
       label: gNavigatorBundle.getString("safebrowsing.getMeOutOfHereButton.label"),
       accessKey: gNavigatorBundle.getString("safebrowsing.getMeOutOfHereButton.accessKey"),
       callback() { getMeOutOfHere(); }
     }];
 
     let title;
-    if (reason === 'malware') {
+    if (reason === "malware") {
       title = gNavigatorBundle.getString("safebrowsing.reportedAttackSite");
       buttons[1] = {
         label: gNavigatorBundle.getString("safebrowsing.notAnAttackButton.label"),
         accessKey: gNavigatorBundle.getString("safebrowsing.notAnAttackButton.accessKey"),
         callback() {
-          openUILinkIn(gSafeBrowsing.getReportURL('MalwareMistake'), 'tab');
+          openUILinkIn(gSafeBrowsing.getReportURL("MalwareMistake"), "tab");
         }
       };
-    } else if (reason === 'phishing') {
+    } else if (reason === "phishing") {
       title = gNavigatorBundle.getString("safebrowsing.deceptiveSite");
       buttons[1] = {
         label: gNavigatorBundle.getString("safebrowsing.notADeceptiveSiteButton.label"),
         accessKey: gNavigatorBundle.getString("safebrowsing.notADeceptiveSiteButton.accessKey"),
         callback() {
-          openUILinkIn(gSafeBrowsing.getReportURL('PhishMistake'), 'tab');
+          openUILinkIn(gSafeBrowsing.getReportURL("PhishMistake"), "tab");
         }
       };
-    } else if (reason === 'unwanted') {
+    } else if (reason === "unwanted") {
       title = gNavigatorBundle.getString("safebrowsing.reportedUnwantedSite");
       // There is no button for reporting errors since Google doesn't currently
       // provide a URL endpoint for these reports.
     }
 
     let notificationBox = gBrowser.getNotificationBox();
     let value = "blocked-badware-page";
 
@@ -3306,17 +3321,17 @@ function getDetailedCertErrorInfo(locati
   return certErrorDetails;
 }
 
 // TODO: can we pull getDERString and getPEMString in from pippki.js instead of
 // duplicating them here?
 function getDERString(cert) {
   var length = {};
   var derArray = cert.getRawDER(length);
-  var derString = '';
+  var derString = "";
   for (var i = 0; i < derArray.length; i++) {
     derString += String.fromCharCode(derArray[i]);
   }
   return derString;
 }
 
 function getPEMString(cert) {
   var derb64 = btoa(getDERString(cert));
@@ -3870,20 +3885,20 @@ XPCOMUtils.defineConstant(this, "Browser
 function FillHistoryMenu(aParent) {
   // Lazily add the hover listeners on first showing and never remove them
   if (!aParent.hasStatusListener) {
     // Show history item's uri in the status bar when hovering, and clear on exit
     aParent.addEventListener("DOMMenuItemActive", function(aEvent) {
       // Only the current page should have the checked attribute, so skip it
       if (!aEvent.target.hasAttribute("checked"))
         XULBrowserWindow.setOverLink(aEvent.target.getAttribute("uri"));
-    }, false);
+    });
     aParent.addEventListener("DOMMenuItemInactive", function() {
       XULBrowserWindow.setOverLink("");
-    }, false);
+    });
 
     aParent.hasStatusListener = true;
   }
 
   // Remove old entries if any
   let children = aParent.childNodes;
   for (var i = children.length - 1; i >= 0; --i) {
     if (children[i].hasAttribute("index"))
@@ -4042,17 +4057,17 @@ function OpenBrowserWindow(options) {
   // is being closed right after it was opened to avoid leaking.
   Services.obs.addObserver(newDocumentShown, "document-shown", false);
   Services.obs.addObserver(windowClosed, "domwindowclosed", false);
 
   var charsetArg = new String();
   var handler = Components.classes["@mozilla.org/browser/clh;1"]
                           .getService(Components.interfaces.nsIBrowserHandler);
   var defaultArgs = handler.defaultArgs;
-  var wintype = document.documentElement.getAttribute('windowtype');
+  var wintype = document.documentElement.getAttribute("windowtype");
 
   var extraFeatures = "";
   if (options && options.private) {
     extraFeatures = ",private";
     if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
       // Force the new window to load about:privatebrowsing instead of the default home page
       defaultArgs = "about:privatebrowsing";
     }
@@ -4153,17 +4168,17 @@ function updateEditUIVisibility() {
  * sourceEvent. This attribute is propagated to the top level originAttributes
  * living on the tab's docShell.
  *
  * @param event
  *        A click event on a userContext File Menu option
  */
 function openNewUserContextTab(event) {
   openUILinkIn(BROWSER_NEW_TAB_URL, "tab", {
-    userContextId: parseInt(event.target.getAttribute('data-usercontextid')),
+    userContextId: parseInt(event.target.getAttribute("data-usercontextid")),
   });
 }
 
 /**
  * Updates File Menu User Context UI visibility depending on
  * privacy.userContext.enabled pref state.
  */
 function updateUserContextUIVisibility() {
@@ -4355,31 +4370,31 @@ var XULBrowserWindow = {
   // Called before links are navigated to to allow us to retarget them if needed.
   onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab) {
     let target = BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab);
     SocialUI.closeSocialPanelForLinkTraversal(target, linkNode);
     return target;
   },
 
   // Check whether this URI should load in the current process
-  shouldLoadURI(aDocShell, aURI, aReferrer) {
+  shouldLoadURI(aDocShell, aURI, aReferrer, aTriggeringPrincipal) {
     if (!gMultiProcessBrowser)
       return true;
 
     let browser = aDocShell.QueryInterface(Ci.nsIDocShellTreeItem)
                            .sameTypeRootTreeItem
                            .QueryInterface(Ci.nsIDocShell)
                            .chromeEventHandler;
 
     // Ignore loads that aren't in the main tabbrowser
     if (browser.localName != "browser" || !browser.getTabBrowser || browser.getTabBrowser() != gBrowser)
       return true;
 
     if (!E10SUtils.shouldLoadURI(aDocShell, aURI, aReferrer)) {
-      E10SUtils.redirectLoad(aDocShell, aURI, aReferrer);
+      E10SUtils.redirectLoad(aDocShell, aURI, aReferrer, aTriggeringPrincipal, false);
       return false;
     }
 
     return true;
   },
 
   onProgressChange(aWebProgress, aRequest,
                              aCurSelfProgress, aMaxSelfProgress,
@@ -4450,26 +4465,26 @@ var XULBrowserWindow = {
           }
         }
 
         this.status = "";
         this.setDefaultStatus(msg);
 
         // Disable menu entries for images, enable otherwise
         if (browser.documentContentType && BrowserUtils.mimeTypeIsTextBased(browser.documentContentType)) {
-          this.isImage.removeAttribute('disabled');
+          this.isImage.removeAttribute("disabled");
         } else {
           canViewSource = false;
-          this.isImage.setAttribute('disabled', 'true');
+          this.isImage.setAttribute("disabled", "true");
         }
 
         if (canViewSource) {
-          this.canViewSource.removeAttribute('disabled');
+          this.canViewSource.removeAttribute("disabled");
         } else {
-          this.canViewSource.setAttribute('disabled', 'true');
+          this.canViewSource.setAttribute("disabled", "true");
         }
       }
 
       this.isBusy = false;
 
       if (this._busyUI) {
         this._busyUI = false;
 
@@ -4502,19 +4517,19 @@ var XULBrowserWindow = {
         }
       }
     }
 
     let browser = gBrowser.selectedBrowser;
 
     // Disable menu entries for images, enable otherwise
     if (browser.documentContentType && BrowserUtils.mimeTypeIsTextBased(browser.documentContentType))
-      this.isImage.removeAttribute('disabled');
+      this.isImage.removeAttribute("disabled");
     else
-      this.isImage.setAttribute('disabled', 'true');
+      this.isImage.setAttribute("disabled", "true");
 
     this.hideOverLinkImmediately = true;
     this.setOverLink("", null);
     this.hideOverLinkImmediately = false;
 
     // We should probably not do this if the value has changed since the user
     // searched
     // Update urlbar only if a new page was loaded on the primary content area
@@ -4774,28 +4789,28 @@ var CombinedStopReload = {
     let reload = document.getElementById("urlbar-reload-button");
     let stop = document.getElementById("urlbar-stop-button");
     if (!stop || !reload || reload.nextSibling != stop)
       return;
 
     this._initialized = true;
     if (XULBrowserWindow.stopCommand.getAttribute("disabled") != "true")
       reload.setAttribute("displaystop", "true");
-    stop.addEventListener("click", this, false);
+    stop.addEventListener("click", this);
     this.reload = reload;
     this.stop = stop;
   },
 
   uninit() {
     if (!this._initialized)
       return;
 
     this._cancelTransition();
     this._initialized = false;
-    this.stop.removeEventListener("click", this, false);
+    this.stop.removeEventListener("click", this);
     this.reload = null;
     this.stop = null;
   },
 
   handleEvent(event) {
     // the only event we listen to is "click" on the stop button
     if (event.button == 0 &&
         !this.stop.disabled)
@@ -5143,17 +5158,17 @@ function onViewToolbarsPopupShowing(aEve
     menuItem.setAttribute("label", toolbar.getAttribute("toolbarname"));
     menuItem.setAttribute("checked", toolbar.getAttribute(hidingAttribute) != "true");
     menuItem.setAttribute("accesskey", toolbar.getAttribute("accesskey"));
     if (popup.id != "toolbar-context-menu")
       menuItem.setAttribute("key", toolbar.getAttribute("key"));
 
     popup.insertBefore(menuItem, firstMenuItem);
 
-    menuItem.addEventListener("command", onViewToolbarCommand, false);
+    menuItem.addEventListener("command", onViewToolbarCommand);
   }
 
 
   let moveToPanel = popup.querySelector(".customize-context-moveToPanel");
   let removeFromToolbar = popup.querySelector(".customize-context-removeFromToolbar");
   // View -> Toolbars menu doesn't have the moveToPanel or removeFromToolbar items.
   if (!moveToPanel || !removeFromToolbar) {
     return;
@@ -5322,17 +5337,17 @@ var gHomeButton = {
     this.updateTooltip();
   },
 
   updateTooltip(homeButton) {
     if (!homeButton)
       homeButton = document.getElementById("home-button");
     if (homeButton) {
       var homePage = this.getHomePage();
-      homePage = homePage.replace(/\|/g, ', ');
+      homePage = homePage.replace(/\|/g, ", ");
       if (["about:home", "about:newtab"].includes(homePage.toLowerCase()))
         homeButton.setAttribute("tooltiptext", homeButton.getAttribute("aboutHomeOverrideTooltip"));
       else
         homeButton.setAttribute("tooltiptext", homePage);
     }
   },
 
   getHomePage() {
@@ -7858,20 +7873,20 @@ var TabContextMenu = {
     } else {
       toggleMute.label = gNavigatorBundle.getString("muteTab.label");
       toggleMute.accessKey = gNavigatorBundle.getString("muteTab.accesskey");
     }
 
     this.contextTab.toggleMuteMenuItem = toggleMute;
     this._updateToggleMuteMenuItem(this.contextTab);
 
-    this.contextTab.addEventListener("TabAttrModified", this, false);
-    aPopupMenu.addEventListener("popuphiding", this, false);
-
-    gFxAccounts.updateTabContextMenu(aPopupMenu);
+    this.contextTab.addEventListener("TabAttrModified", this);
+    aPopupMenu.addEventListener("popuphiding", this);
+
+    gFxAccounts.updateTabContextMenu(aPopupMenu, this.contextTab);
   },
   handleEvent(aEvent) {
     switch (aEvent.type) {
       case "popuphiding":
         gBrowser.removeEventListener("TabAttrModified", this);
         aEvent.target.removeEventListener("popuphiding", this);
         break;
       case "TabAttrModified":
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -172,16 +172,17 @@
 
     <!-- for select dropdowns. The menupopup is what shows the list of options,
          and the popuponly menulist makes things like the menuactive attributes
          work correctly on the menupopup. ContentSelectDropdown expects the
          popuponly menulist to be its immediate parent. -->
     <menulist popuponly="true" id="ContentSelectDropdown" hidden="true">
       <menupopup rolluponmousewheel="true"
                  activateontab="true" position="after_start"
+                 level="parent"
 #ifdef XP_WIN
                  consumeoutsideclicks="false" ignorekeys="shortcuts"
 #endif
         />
     </menulist>
 
     <!-- for invalid form error message -->
     <panel id="invalid-form-popup" type="arrow" orient="vertical" noautofocus="true" hidden="true" level="parent">
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -259,21 +259,21 @@ function getSerializedSecurityInfo(docSh
 
   return serhelper.serializeToString(securityInfo);
 }
 
 var AboutNetAndCertErrorListener = {
   init(chromeGlobal) {
     addMessageListener("CertErrorDetails", this);
     addMessageListener("Browser:CaptivePortalFreed", this);
-    chromeGlobal.addEventListener('AboutNetErrorLoad', this, false, true);
-    chromeGlobal.addEventListener('AboutNetErrorOpenCaptivePortal', this, false, true);
-    chromeGlobal.addEventListener('AboutNetErrorSetAutomatic', this, false, true);
-    chromeGlobal.addEventListener('AboutNetErrorOverride', this, false, true);
-    chromeGlobal.addEventListener('AboutNetErrorResetPreferences', this, false, true);
+    chromeGlobal.addEventListener("AboutNetErrorLoad", this, false, true);
+    chromeGlobal.addEventListener("AboutNetErrorOpenCaptivePortal", this, false, true);
+    chromeGlobal.addEventListener("AboutNetErrorSetAutomatic", this, false, true);
+    chromeGlobal.addEventListener("AboutNetErrorOverride", this, false, true);
+    chromeGlobal.addEventListener("AboutNetErrorResetPreferences", this, false, true);
   },
 
   get isAboutNetError() {
     return content.document.documentURI.startsWith("about:neterror");
   },
 
   get isAboutCertError() {
     return content.document.documentURI.startsWith("about:certerror");
@@ -542,21 +542,21 @@ var ClickEventHandler = {
       location: ownerDoc.location.href,
       elementId: targetElement.getAttribute("id"),
       isTopFrame: (ownerDoc.defaultView.parent === ownerDoc.defaultView),
       securityInfoAsString: getSerializedSecurityInfo(docShell),
     });
   },
 
   onAboutBlocked(targetElement, ownerDoc) {
-    var reason = 'phishing';
+    var reason = "phishing";
     if (/e=malwareBlocked/.test(ownerDoc.documentURI)) {
-      reason = 'malware';
+      reason = "malware";
     } else if (/e=unwantedBlocked/.test(ownerDoc.documentURI)) {
-      reason = 'unwanted';
+      reason = "unwanted";
     }
     sendAsyncMessage("Browser:SiteBlockedError", {
       location: ownerDoc.location.href,
       reason,
       elementId: targetElement.getAttribute("id"),
       isTopFrame: (ownerDoc.defaultView.parent === ownerDoc.defaultView)
     });
   },
--- a/browser/base/content/contentSearchUI.js
+++ b/browser/base/content/contentSearchUI.js
@@ -618,17 +618,17 @@ ContentSearchUIController.prototype = {
 
   _updateSearchWithHeader() {
     if (!this._strings) {
       return;
     }
     let searchWithHeader = document.getElementById("contentSearchSearchWithHeader");
     if (this.input.value) {
       searchWithHeader.innerHTML = this._strings.searchForSomethingWith;
-      searchWithHeader.querySelector('.contentSearchSearchWithHeaderSearchText').textContent = this.input.value;
+      searchWithHeader.querySelector(".contentSearchSearchWithHeaderSearchText").textContent = this.input.value;
     } else {
       searchWithHeader.textContent = this._strings.searchWithHeader;
     }
   },
 
   _speculativeConnect() {
     if (this.defaultEngine) {
       this._sendMsg("SpeculativeConnect", this.defaultEngine.name);
--- a/browser/base/content/newtab/cells.js
+++ b/browser/base/content/newtab/cells.js
@@ -11,17 +11,17 @@
  */
 function Cell(aGrid, aNode) {
   this._grid = aGrid;
   this._node = aNode;
   this._node._newtabCell = this;
 
   // Register drag-and-drop event handlers.
   ["dragenter", "dragover", "dragexit", "drop"].forEach(function (aType) {
-    this._node.addEventListener(aType, this, false);
+    this._node.addEventListener(aType, this);
   }, this);
 }
 
 Cell.prototype = {
   /**
    * The grid.
    */
   _grid: null,
--- a/browser/base/content/newtab/page.js
+++ b/browser/base/content/newtab/page.js
@@ -135,18 +135,18 @@ var gPage = {
     // Initialize and render the grid.
     gGrid.init();
 
     // Initialize the drop target shim.
     gDropTargetShim.init();
 
 #ifdef XP_MACOSX
     // Workaround to prevent a delay on MacOSX due to a slow drop animation.
-    document.addEventListener("dragover", this, false);
-    document.addEventListener("drop", this, false);
+    document.addEventListener("dragover", this);
+    document.addEventListener("drop", this);
 #endif
   },
 
   /**
    * Updates the 'page-disabled' attributes of the respective DOM nodes.
    * @param aValue Whether the New Tab Page is enabled or not.
    */
   _updateAttributes: function Page_updateAttributes(aValue) {
--- a/browser/base/content/newtab/sites.js
+++ b/browser/base/content/newtab/sites.js
@@ -287,19 +287,19 @@ Site.prototype = {
     });
   },
 
   /**
    * Adds event handlers for the site and its buttons.
    */
   _addEventHandlers: function Site_addEventHandlers() {
     // Register drag-and-drop event handlers.
-    this._node.addEventListener("dragstart", this, false);
-    this._node.addEventListener("dragend", this, false);
-    this._node.addEventListener("mouseover", this, false);
+    this._node.addEventListener("dragstart", this);
+    this._node.addEventListener("dragend", this);
+    this._node.addEventListener("mouseover", this);
 
     // Specially treat the sponsored icon & suggested explanation
     // text to prevent regular hover effects
     let sponsored = this._querySelector(".newtab-sponsored");
     let suggested = this._querySelector(".newtab-suggested");
     this._ignoreHoverEvents(sponsored);
     this._ignoreHoverEvents(suggested);
   },
@@ -420,17 +420,17 @@ Site.prototype = {
   },
 
   /**
    * Handles all site events.
    */
   handleEvent: function Site_handleEvent(aEvent) {
     switch (aEvent.type) {
       case "mouseover":
-        this._node.removeEventListener("mouseover", this, false);
+        this._node.removeEventListener("mouseover", this);
         this._speculativeConnect();
         break;
       case "dragstart":
         gDrag.start(this, aEvent);
         break;
       case "dragend":
         gDrag.end(this, aEvent);
         break;
--- a/browser/base/content/newtab/undo.js
+++ b/browser/base/content/newtab/undo.js
@@ -19,17 +19,17 @@ var gUndoDialog = {
    */
   _undoData: null,
 
   /**
    * Initializes the undo dialog.
    */
   init: function UndoDialog_init() {
     this._undoContainer = document.getElementById("newtab-undo-container");
-    this._undoContainer.addEventListener("click", this, false);
+    this._undoContainer.addEventListener("click", this);
     this._undoButton = document.getElementById("newtab-undo-button");
     this._undoCloseButton = document.getElementById("newtab-undo-close-button");
     this._undoRestoreButton = document.getElementById("newtab-undo-restore-button");
   },
 
   /**
    * Shows the undo dialog.
    * @param aSite The site that just got removed.
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -147,18 +147,18 @@ const COL_IMAGE_NODE    = 5;
 const COL_IMAGE_BG      = 6;
 
 // column number to copy from, second argument to pageInfoTreeView's constructor
 const COPYCOL_NONE = -1;
 const COPYCOL_META_CONTENT = 1;
 const COPYCOL_IMAGE = COL_IMAGE_ADDRESS;
 
 // one nsITreeView for each tree in the window
-var gMetaView = new pageInfoTreeView('metatree', COPYCOL_META_CONTENT);
-var gImageView = new pageInfoTreeView('imagetree', COPYCOL_IMAGE);
+var gMetaView = new pageInfoTreeView("metatree", COPYCOL_META_CONTENT);
+var gImageView = new pageInfoTreeView("imagetree", COPYCOL_IMAGE);
 
 gImageView.getCellProperties = function(row, col) {
   var data = gImageView.data[row];
   var item = gImageView.data[row][COL_IMAGE_NODE];
   var props = "";
   if (!checkProtocol(data) ||
       item instanceof HTMLEmbedElement ||
       (item instanceof HTMLObjectElement && !item.type.startsWith("image/")))
@@ -1000,31 +1000,31 @@ function formatNumber(number) {
 function formatDate(datestr, unknown) {
   var date = new Date(datestr);
   if (!date.valueOf())
     return unknown;
 
   const locale = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
                  .getService(Components.interfaces.nsIXULChromeRegistry)
                  .getSelectedLocale("global", true);
-  const dtOptions = { year: 'numeric', month: 'long', day: 'numeric',
-                      hour: 'numeric', minute: 'numeric', second: 'numeric' };
+  const dtOptions = { year: "numeric", month: "long", day: "numeric",
+                      hour: "numeric", minute: "numeric", second: "numeric" };
   return date.toLocaleString(locale, dtOptions);
 }
 
 function doCopy() {
   if (!gClipboardHelper)
     return;
 
   var elem = document.commandDispatcher.focusedElement;
 
   if (elem && "treeBoxObject" in elem) {
     var view = elem.view;
     var selection = view.selection;
-    var text = [], tmp = '';
+    var text = [], tmp = "";
     var min = {}, max = {};
 
     var count = selection.getRangeCount();
 
     for (var i = 0; i < count; i++) {
       selection.getRangeAt(i, min, max);
 
       for (var row = min.value; row <= max.value; row++) {
--- a/browser/base/content/pageinfo/permissions.js
+++ b/browser/base/content/pageinfo/permissions.js
@@ -156,23 +156,23 @@ function onCheckboxClick(aPartId) {
     setRadioState(aPartId, perm);
   } else {
     onRadioClick(aPartId);
     command.removeAttribute("disabled");
   }
 }
 
 function onPluginRadioClick(aEvent) {
-  onRadioClick(aEvent.originalTarget.getAttribute("id").split('#')[0]);
+  onRadioClick(aEvent.originalTarget.getAttribute("id").split("#")[0]);
 }
 
 function onRadioClick(aPartId) {
   var radioGroup = document.getElementById(aPartId + "RadioGroup");
   var id = radioGroup.selectedItem.id;
-  var permission = id.split('#')[1];
+  var permission = id.split("#")[1];
   SitePermissions.set(gPermURI, aPartId, permission);
 }
 
 function setRadioState(aPartId, aValue) {
   var radio = document.getElementById(aPartId + "#" + aValue);
   if (radio) {
     radio.radioGroup.selectedItem = radio;
   }
--- a/browser/base/content/popup-notifications.inc
+++ b/browser/base/content/popup-notifications.inc
@@ -70,12 +70,13 @@
 
     <popupnotification id="addon-install-confirmation-notification" hidden="true">
       <popupnotificationcontent id="addon-install-confirmation-content" orient="vertical"/>
     </popupnotification>
 
     <popupnotification id="addon-webext-permissions-notification" hidden="true">
       <popupnotificationcontent orient="vertical">
         <description id="addon-webext-perm-header" class="addon-webext-perm-header"/>
-        <label id="addon-webext-perm-text" class="addon-webext-perm-text"/>
+        <description id="addon-webext-perm-text" class="addon-webext-perm-text"/>
+        <label id="addon-webext-perm-intro" class="addon-webext-perm-text"/>
         <html:ul id="addon-webext-perm-list" class="addon-webext-perm-list"/>
       </popupnotificationcontent>
     </popupnotification>
--- a/browser/base/content/sync/setup.js
+++ b/browser/base/content/sync/setup.js
@@ -76,17 +76,17 @@ var gSyncSetup = {
         //        of `this`. Fix in a followup. (bug 583347)
         if (add)
           Weave.Svc.Obs.add(topic, self[func], self);
         else
           Weave.Svc.Obs.remove(topic, self[func], self);
       });
     };
     addRem(true);
-    window.addEventListener("unload", () => addRem(false), false);
+    window.addEventListener("unload", () => addRem(false));
 
     window.setTimeout(function() {
       // Force Service to be loaded so that engines are registered.
       // See Bug 670082.
       Weave.Service;
     }, 0);
 
     this.captchaBrowser = document.getElementById("captcha");
--- a/browser/base/content/sync/utils.js
+++ b/browser/base/content/sync/utils.js
@@ -106,17 +106,17 @@ var gSyncUtils = {
     let pp = document.getElementById(elid).value;
 
     // Create an invisible iframe whose contents we can print.
     let iframe = document.createElement("iframe");
     iframe.setAttribute("src", "chrome://browser/content/sync/key.xhtml");
     iframe.collapsed = true;
     document.documentElement.appendChild(iframe);
     iframe.contentWindow.addEventListener("load", function() {
-      iframe.contentWindow.removeEventListener("load", arguments.callee, false);
+      iframe.contentWindow.removeEventListener("load", arguments.callee);
 
       // Insert the Sync Key into the page.
       let el = iframe.contentDocument.getElementById("synckey");
       el.firstChild.nodeValue = pp;
 
       // Insert the TOS and Privacy Policy URLs into the page.
       let termsURL = Weave.Svc.Prefs.get("termsURL");
       el = iframe.contentDocument.getElementById("tosLink");
@@ -124,17 +124,17 @@ var gSyncUtils = {
       el.firstChild.nodeValue = termsURL;
 
       let privacyURL = Weave.Svc.Prefs.get("privacyURL");
       el = iframe.contentDocument.getElementById("ppLink");
       el.setAttribute("href", privacyURL);
       el.firstChild.nodeValue = privacyURL;
 
       callback(iframe);
-    }, false);
+    });
   },
 
   /**
    * Print passphrase backup document.
    *
    * @param elid : ID of the form element containing the passphrase.
    */
   passphrasePrint(elid) {
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -100,17 +100,17 @@ addMessageListener("SecondScreen:tab-mir
     let height = content.innerHeight;
     let viewport = {cssWidth: width, cssHeight: height, width, height};
     app.mirror(function() {}, content, viewport, function() {}, content);
   }
 });
 
 var AboutHomeListener = {
   init(chromeGlobal) {
-    chromeGlobal.addEventListener('AboutHomeLoad', this, false, true);
+    chromeGlobal.addEventListener("AboutHomeLoad", this, false, true);
   },
 
   get isAboutHome() {
     return content.document.documentURI.toLowerCase() == "about:home";
   },
 
   handleEvent(aEvent) {
     if (!this.isAboutHome) {
@@ -699,32 +699,32 @@ if (Services.appinfo.processType == Serv
 }
 
 var WebBrowserChrome = {
   onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab) {
     return BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab);
   },
 
   // Check whether this URI should load in the current process
-  shouldLoadURI(aDocShell, aURI, aReferrer) {
+  shouldLoadURI(aDocShell, aURI, aReferrer, aTriggeringPrincipal) {
     if (!E10SUtils.shouldLoadURI(aDocShell, aURI, aReferrer)) {
-      E10SUtils.redirectLoad(aDocShell, aURI, aReferrer);
+      E10SUtils.redirectLoad(aDocShell, aURI, aReferrer, aTriggeringPrincipal, false);
       return false;
     }
 
     return true;
   },
 
   shouldLoadURIInThisProcess(aURI) {
     return E10SUtils.shouldLoadURIInThisProcess(aURI);
   },
 
   // Try to reload the currently active or currently loading page in a new process.
-  reloadInFreshProcess(aDocShell, aURI, aReferrer) {
-    E10SUtils.redirectLoad(aDocShell, aURI, aReferrer, true);
+  reloadInFreshProcess(aDocShell, aURI, aReferrer, aTriggeringPrincipal) {
+    E10SUtils.redirectLoad(aDocShell, aURI, aReferrer, aTriggeringPrincipal, true);
     return true;
   },
 
   startPrerenderingDocument(aHref, aReferrer) {
     if (PrerenderContentHandler.initialized) {
       PrerenderContentHandler.startPrerenderingDocument(aHref, aReferrer);
     }
   },
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -575,16 +575,25 @@
               if ((aRequest instanceof Ci.nsIChannel) &&
                   aRequest.originalURI.schemeIs("about") &&
                   (aRequest.URI.schemeIs("jar") || aRequest.URI.schemeIs("file")))
                 return false;
 
               return true;
             },
 
+            _isForInitialAboutBlank(aWebProgress, aLocation) {
+              if (!this.mBlank || !aWebProgress.isTopLevel) {
+                return false;
+              }
+
+              let location = aLocation ? aLocation.spec : "";
+              return location == "about:blank";
+            },
+
             onProgressChange(aWebProgress, aRequest,
                              aCurSelfProgress, aMaxSelfProgress,
                              aCurTotalProgress, aMaxTotalProgress) {
               this.mTotalProgress = aMaxTotalProgress ? aCurTotalProgress / aMaxTotalProgress : 0;
 
               if (!this._shouldShowProgress(aRequest))
                 return;
 
@@ -604,27 +613,37 @@
                 aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress,
                 aMaxTotalProgress);
             },
 
             onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
               if (!aRequest)
                 return;
 
-              var oldBlank = this.mBlank;
-
               const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
               const nsIChannel = Components.interfaces.nsIChannel;
               let location, originalLocation;
               try {
                 aRequest.QueryInterface(nsIChannel)
                 location = aRequest.URI;
                 originalLocation = aRequest.originalURI;
               } catch (ex) {}
 
+              let ignoreBlank = this._isForInitialAboutBlank(aWebProgress, location);
+              // If we were ignoring some messages about the initial about:blank, and we
+              // got the STATE_STOP for it, we'll want to pay attention to those messages
+              // from here forward. Similarly, if we conclude that this state change
+              // is one that we shouldn't be ignoring, then stop ignoring.
+              if ((ignoreBlank &&
+                   aStateFlags & nsIWebProgressListener.STATE_STOP &&
+                   aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) ||
+                  !ignoreBlank && this.mBlank) {
+                this.mBlank = false;
+              }
+
               if (aStateFlags & nsIWebProgressListener.STATE_START) {
                 this.mRequestCount++;
               } else if (aStateFlags & nsIWebProgressListener.STATE_STOP) {
                 const NS_ERROR_UNKNOWN_HOST = 2152398878;
                 if (--this.mRequestCount > 0 && aStatus == NS_ERROR_UNKNOWN_HOST) {
                   // to prevent bug 235825: wait for the request handled
                   // by the automatic keyword resolver
                   return;
@@ -701,31 +720,28 @@
                   } else if (isSuccessful) {
                     this.mBrowser.urlbarChangeTracker.finishedLoad();
                   }
 
                   if (!this.mBrowser.mIconURL)
                     this.mTabBrowser.useDefaultIcon(this.mTab);
                 }
 
-                if (this.mBlank)
-                  this.mBlank = false;
-
                 // For keyword URIs clear the user typed value since they will be changed into real URIs
                 if (location.scheme == "keyword")
                   this.mBrowser.userTypedValue = null;
 
                 if (this.mTab.label == this.mTabBrowser.mStringBundle.getString("tabs.connecting"))
                   this.mTabBrowser.setTabTitle(this.mTab);
 
                 if (this.mTab.selected)
                   this.mTabBrowser.mIsBusy = false;
               }
 
-              if (oldBlank) {
+              if (ignoreBlank) {
                 this._callProgressListeners("onUpdateCurrentBrowser",
                                             [aStateFlags, aStatus, "", 0],
                                             true, false);
               } else {
                 this._callProgressListeners("onStateChange",
                                             [aWebProgress, aRequest, aStateFlags, aStatus],
                                             true, false);
               }
@@ -1683,17 +1699,18 @@
               }
               if (!isRemote && aBrowser.contentWindow.opener != aOptions.opener) {
                 throw new Error("Cannot change opener on an already non-remote browser!");
               }
             }
 
             // Abort if we're not going to change anything
             if (isRemote == aShouldBeRemote && !aOptions.newFrameloader && !aOptions.freshProcess &&
-                (!isRemote || aBrowser.getAttribute("remoteType") == aOptions.remoteType)) {
+                (!isRemote || aBrowser.getAttribute("remoteType") == aOptions.remoteType) &&
+                !aBrowser.frameLoader.isFreshProcess) {
               return false;
             }
 
             let tab = this.getTabForBrowser(aBrowser);
             let evt = document.createEvent("Events");
             evt.initEvent("BeforeTabRemotenessChange", true, false);
             tab.dispatchEvent(evt);
 
@@ -1766,17 +1783,17 @@
             // As frameLoaders start out with an active docShell we have to
             // deactivate it if this is not the selected tab's browser or the
             // browser window is minimized.
             aBrowser.docShellIsActive = this.shouldActivateDocShell(aBrowser);
 
             // Create a new tab progress listener for the new browser we just injected,
             // since tab progress listeners have logic for handling the initial about:blank
             // load
-            listener = this.mTabProgressListener(tab, aBrowser, false, false);
+            listener = this.mTabProgressListener(tab, aBrowser, true, false);
             this._tabListeners.set(tab, listener);
             filter.addProgressListener(listener, Ci.nsIWebProgress.NOTIFY_ALL);
 
             // Restore the progress listener.
             aBrowser.webProgress.addProgressListener(filter, Ci.nsIWebProgress.NOTIFY_ALL);
 
             // Restore the securityUI state.
             let securityUI = aBrowser.securityUI;
@@ -1830,17 +1847,18 @@
 
             // If this URL can't load in the current browser then flip it to the
             // correct type.
             let currentRemoteType = aBrowser.remoteType;
             aOptions.remoteType =
               E10SUtils.getRemoteTypeForURI(aURL, gMultiProcessBrowser,
                                             currentRemoteType);
             if (currentRemoteType != aOptions.remoteType ||
-                aOptions.freshProcess || aOptions.newFrameloader) {
+                aOptions.freshProcess || aOptions.newFrameloader ||
+                aBrowser.frameLoader.isFreshProcess) {
               let remote = aOptions.remoteType != E10SUtils.NOT_REMOTE;
               return this.updateBrowserRemoteness(aBrowser, remote, aOptions);
             }
 
             return false;
           ]]>
         </body>
       </method>
@@ -4579,19 +4597,19 @@
             return;
 
           if (this.AppConstants.platform == "macosx") {
             if (!aEvent.metaKey)
               return;
 
             var offset = 1;
             switch (aEvent.charCode) {
-              case '}'.charCodeAt(0):
+              case "}".charCodeAt(0):
                 offset = -1;
-              case '{'.charCodeAt(0):
+              case "{".charCodeAt(0):
                 if (window.getComputedStyle(this, null).direction == "ltr")
                   offset *= -1;
                 this.tabContainer.advanceSelectedTab(offset, true);
                 aEvent.preventDefault();
             }
           }
         ]]></body>
       </method>
@@ -4938,17 +4956,17 @@
           const nsIEventListenerService =
             Components.interfaces.nsIEventListenerService;
           let els = Components.classes["@mozilla.org/eventlistenerservice;1"]
                               .getService(nsIEventListenerService);
           els.addSystemEventListener(document, "keydown", this, false);
           if (this.AppConstants.platform == "macosx") {
             els.addSystemEventListener(document, "keypress", this, false);
           }
-          window.addEventListener("sizemodechange", this, false);
+          window.addEventListener("sizemodechange", this);
 
           var uniqueId = this._generateUniquePanelID();
           this.mPanelContainer.childNodes[0].id = uniqueId;
           this.mCurrentTab.linkedPanel = uniqueId;
           this.mCurrentTab.permanentKey = this.mCurrentBrowser.permanentKey;
           this.mCurrentTab._tPos = 0;
           this.mCurrentTab._fullyOpen = true;
           this.mCurrentTab.cachePosition = 0;
@@ -5058,17 +5076,17 @@
           const nsIEventListenerService =
             Components.interfaces.nsIEventListenerService;
           let els = Components.classes["@mozilla.org/eventlistenerservice;1"]
                               .getService(nsIEventListenerService);
           els.removeSystemEventListener(document, "keydown", this, false);
           if (this.AppConstants.platform == "macosx") {
             els.removeSystemEventListener(document, "keypress", this, false);
           }
-          window.removeEventListener("sizemodechange", this, false);
+          window.removeEventListener("sizemodechange", this);
 
           if (gMultiProcessBrowser) {
             let messageManager = window.getGroupMessageManager("browsers");
             messageManager.removeMessageListener("DOMTitleChanged", this);
             window.messageManager.removeMessageListener("contextmenu", this);
 
             if (this._switcher) {
               this._switcher.destroy();
@@ -5464,18 +5482,18 @@
       <constructor>
         <![CDATA[
           this.mTabClipWidth = Services.prefs.getIntPref("browser.tabs.tabClipWidth");
 
           var tab = this.firstChild;
           tab.label = this.tabbrowser.mStringBundle.getString("tabs.emptyTabTitle");
           tab.setAttribute("onerror", "this.removeAttribute('image');");
 
-          window.addEventListener("resize", this, false);
-          window.addEventListener("load", this, false);
+          window.addEventListener("resize", this);
+          window.addEventListener("load", this);
 
           try {
             this._tabAnimationLoggingEnabled = Services.prefs.getBoolPref("browser.tabs.animationLogging.enabled");
           } catch (ex) {
             this._tabAnimationLoggingEnabled = false;
           }
           this._browserNewtabpageEnabled = Services.prefs.getBoolPref("browser.newtabpage.enabled");
           Services.prefs.addObserver("privacy.userContext", this, false);
@@ -5803,37 +5821,37 @@
               tab.style.setProperty("max-width", tabWidth, "important");
               if (!isEndTab) { // keep tabs the same width
                 tab.style.transition = "none";
                 tab.clientTop; // flush styles to skip animation; see bug 649247
                 tab.style.transition = "";
               }
             }
             this._hasTabTempMaxWidth = true;
-            this.tabbrowser.addEventListener("mousemove", this, false);
-            window.addEventListener("mouseout", this, false);
+            this.tabbrowser.addEventListener("mousemove", this);
+            window.addEventListener("mouseout", this);
           }
         ]]></body>
       </method>
 
       <method name="_expandSpacerBy">
         <parameter name="pixels"/>
         <body><![CDATA[
           let spacer = this._closingTabsSpacer;
           spacer.style.width = parseFloat(spacer.style.width) + pixels + "px";
           this.setAttribute("using-closing-tabs-spacer", "true");
-          this.tabbrowser.addEventListener("mousemove", this, false);
-          window.addEventListener("mouseout", this, false);
+          this.tabbrowser.addEventListener("mousemove", this);
+          window.addEventListener("mouseout", this);
         ]]></body>
       </method>
 
       <method name="_unlockTabSizing">
         <body><![CDATA[
-          this.tabbrowser.removeEventListener("mousemove", this, false);
-          window.removeEventListener("mouseout", this, false);
+          this.tabbrowser.removeEventListener("mousemove", this);
+          window.removeEventListener("mouseout", this);
 
           if (this._hasTabTempMaxWidth) {
             this._hasTabTempMaxWidth = false;
             let tabs = this.tabbrowser.visibleTabs;
             for (let i = 0; i < tabs.length; i++)
               tabs[i].style.maxWidth = "";
           }
 
@@ -6332,17 +6350,17 @@
          * In both cases, it is most likely that the close button area has
          * been accidentally clicked, therefore we do not close the tab.
          *
          * We don't want to ignore processing of more than one click event,
          * though, since the user might actually be repeatedly clicking to
          * close many tabs at once.
          */
         let target = event.originalTarget;
-        if (target.classList.contains('tab-close-button')) {
+        if (target.classList.contains("tab-close-button")) {
           // We preemptively set this to allow the closing-multiple-tabs-
           // in-a-row case.
           if (this._blockDblClick) {
             target._ignoredCloseButtonClicks = true;
           } else if (event.detail > 1 && !target._ignoredCloseButtonClicks) {
             target._ignoredCloseButtonClicks = true;
             event.stopPropagation();
             return;
@@ -6478,17 +6496,17 @@
           canvas.mozOpaque = true;
         }
 
         canvas.width = 160 * scale;
         canvas.height = 90 * scale;
         let toDrag = canvas;
         let dragImageOffset = -16;
         if (gMultiProcessBrowser) {
-          var context = canvas.getContext('2d');
+          var context = canvas.getContext("2d");
           context.fillStyle = "white";
           context.fillRect(0, 0, canvas.width, canvas.height);
 
           let captureListener;
           let platform = this.tabbrowser.AppConstants.platform;
           // On Windows and Mac we can update the drag image during a drag
           // using updateDragImage. On Linux, we can use a panel.
           if (platform == "win" || platform == "macosx") {
@@ -7015,16 +7033,20 @@
       <method name="_mouseenter">
         <body><![CDATA[
           if (this.hidden || this.closing)
             return;
 
           let tabContainer = this.parentNode;
           let visibleTabs = tabContainer.tabbrowser.visibleTabs;
           let tabIndex = visibleTabs.indexOf(this);
+
+          if (this.selected)
+            tabContainer._handleTabSelect();
+
           if (tabIndex == 0) {
             tabContainer._beforeHoveredTab = null;
           } else {
             let candidate = visibleTabs[tabIndex - 1];
             if (!candidate.selected) {
               tabContainer._beforeHoveredTab = candidate;
               candidate.setAttribute("beforehovered", "true");
             }
@@ -7149,32 +7171,32 @@
       <handler event="mouseout"><![CDATA[
         let anonid = event.originalTarget.getAttribute("anonid");
         if (anonid == "close-button")
           this.mOverCloseButton = false;
 
         this._mouseleave();
       ]]></handler>
       <handler event="dragstart" phase="capturing">
-        this.style.MozUserFocus = '';
+        this.style.MozUserFocus = "";
       </handler>
       <handler event="mousedown" phase="capturing">
       <![CDATA[
         if (this.selected) {
-          this.style.MozUserFocus = 'ignore';
+          this.style.MozUserFocus = "ignore";
           this.clientTop; // just using this to flush style updates
         } else if (this.mOverCloseButton ||
                    this._overPlayingIcon) {
           // Prevent tabbox.xml from selecting the tab.
           event.stopPropagation();
         }
       ]]>
       </handler>
       <handler event="mouseup">
-        this.style.MozUserFocus = '';
+        this.style.MozUserFocus = "";
       </handler>
       <handler event="click">
       <![CDATA[
         if (event.button != 0) {
           return;
         }
 
         if (this._overPlayingIcon) {
@@ -7332,19 +7354,19 @@
           }
 
           document.getElementById("alltabs_undoCloseTab").disabled =
             SessionStore.getClosedTabCount(window) == 0;
 
           var tabcontainer = gBrowser.tabContainer;
 
           // Listen for changes in the tab bar.
-          tabcontainer.addEventListener("TabAttrModified", this, false);
-          tabcontainer.addEventListener("TabClose", this, false);
-          tabcontainer.mTabstrip.addEventListener("scroll", this, false);
+          tabcontainer.addEventListener("TabAttrModified", this);
+          tabcontainer.addEventListener("TabClose", this);
+          tabcontainer.mTabstrip.addEventListener("scroll", this);
 
           let tabs = gBrowser.visibleTabs;
           for (var i = 0; i < tabs.length; i++) {
             if (!tabs[i].pinned)
               this._createTabMenuItem(tabs[i]);
           }
           this._updateTabsVisibilityStatus();
         }
@@ -7363,19 +7385,19 @@
             menuItem.tab.mCorrespondingMenuitem = null;
             this.removeChild(menuItem);
           }
           if (menuItem.hasAttribute("usercontextid")) {
             this.removeChild(menuItem);
           }
         }
         var tabcontainer = gBrowser.tabContainer;
-        tabcontainer.mTabstrip.removeEventListener("scroll", this, false);
-        tabcontainer.removeEventListener("TabAttrModified", this, false);
-        tabcontainer.removeEventListener("TabClose", this, false);
+        tabcontainer.mTabstrip.removeEventListener("scroll", this);
+        tabcontainer.removeEventListener("TabAttrModified", this);
+        tabcontainer.removeEventListener("TabClose", this);
       ]]></handler>
 
       <handler event="DOMMenuItemActive">
       <![CDATA[
         var tab = event.target.tab;
         if (tab) {
           let overLink = tab.linkedBrowser.currentURI.spec;
           if (overLink == "about:blank")
@@ -7406,21 +7428,21 @@
                    xbl:inherits="value=label,crop,mirror"
                    flex="1"
                    crop="end"/>
       </xul:hbox>
     </content>
 
     <implementation implements="nsIDOMEventListener">
       <constructor><![CDATA[
-        window.addEventListener("resize", this, false);
+        window.addEventListener("resize", this);
       ]]></constructor>
 
       <destructor><![CDATA[
-        window.removeEventListener("resize", this, false);
+        window.removeEventListener("resize", this);
         MousePosTracker.removeListener(this);
       ]]></destructor>
 
       <property name="label">
         <setter><![CDATA[
           if (!this.label) {
             this.removeAttribute("mirror");
             this.removeAttribute("sizelimit");
--- a/browser/base/content/test/general/accounts_testRemoteCommands.html
+++ b/browser/base/content/test/general/accounts_testRemoteCommands.html
@@ -1,16 +1,16 @@
 <html>
   <head>
     <meta charset="utf-8">
 
 <script type="text/javascript;version=1.8">
 
 function init() {
-  window.addEventListener("message", function process(e) {doTest(e)}, false);
+  window.addEventListener("message", function process(e) {doTest(e)});
   // unless we relinquish the eventloop,
   // tests will run before the chrome event handlers are ready
   setTimeout(doTest, 0);
 }
 
 function checkStatusValue(payload, expectedValue) {
   return payload.status == expectedValue;
 }
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -130,16 +130,19 @@ support-files =
   !/toolkit/mozapps/extensions/test/xpinstall/corrupt.xpi
   !/toolkit/mozapps/extensions/test/xpinstall/incompatible.xpi
   !/toolkit/mozapps/extensions/test/xpinstall/installtrigger.html
   !/toolkit/mozapps/extensions/test/xpinstall/redirect.sjs
   !/toolkit/mozapps/extensions/test/xpinstall/restartless-unsigned.xpi
   !/toolkit/mozapps/extensions/test/xpinstall/restartless.xpi
   !/toolkit/mozapps/extensions/test/xpinstall/theme.xpi
   !/toolkit/mozapps/extensions/test/xpinstall/slowinstall.sjs
+  file_about_child.html
+  file_about_parent.html
+  file_register_about_page.js
 
 [browser_aboutAccounts.js]
 skip-if = os == "linux" # Bug 958026
 support-files =
   content_aboutAccounts.js
 [browser_aboutCertError.js]
 [browser_aboutNetError.js]
 [browser_aboutSupport_newtab_security_state.js]
@@ -297,16 +300,17 @@ skip-if = !datareporting
 skip-if = os == "mac" # decoder doctor isn't implemented on osx
 [browser_discovery.js]
 [browser_double_close_tab.js]
 [browser_documentnavigation.js]
 [browser_duplicateIDs.js]
 [browser_drag.js]
 skip-if = true # browser_drag.js is disabled, as it needs to be updated for the new behavior from bug 320638.
 [browser_extension_permissions.js]
+[browser_extension_sideloading.js]
 [browser_favicon_change.js]
 [browser_favicon_change_not_in_document.js]
 [browser_findbarClose.js]
 [browser_focusonkeydown.js]
 [browser_fullscreen-window-open.js]
 tags = fullscreen
 skip-if = os == "linux" # Linux: Intermittent failures - bug 941575.
 [browser_fxaccounts.js]
@@ -420,16 +424,17 @@ support-files =
   close_beforeunload.html
 [browser_tabs_isActive.js]
 [browser_tabs_owner.js]
 [browser_temporary_permissions.js]
 support-files =
   permissions.html
   temporary_permissions_subframe.html
 [browser_temporary_permissions_navigation.js]
+[browser_temporary_permissions_tabs.js]
 [browser_testOpenNewRemoteTabsFromNonRemoteBrowsers.js]
 run-if = e10s
 [browser_trackingUI_1.js]
 tags = trackingprotection
 support-files =
   trackingPage.html
   benignPage.html
 [browser_trackingUI_2.js]
@@ -476,16 +481,17 @@ skip-if = (os == "win" && !debug)
 [browser_zbug569342.js]
 skip-if = e10s || debug # Bug 1094240 - has findbar-related failures
 [browser_registerProtocolHandler_notification.js]
 [browser_no_mcb_on_http_site.js]
 tags = mcb
 [browser_addCertException.js]
 [browser_bug1045809.js]
 tags = mcb
+[browser_e10s_about_page_triggeringprincipal.js]
 [browser_e10s_switchbrowser.js]
 [browser_e10s_about_process.js]
 [browser_e10s_chrome_process.js]
 [browser_e10s_javascript.js]
 [browser_blockHPKP.js]
 tags = psm
 [browser_mcb_redirect.js]
 tags = mcb
--- a/browser/base/content/test/general/browser_aboutCertError.js
+++ b/browser/base/content/test/general/browser_aboutCertError.js
@@ -374,17 +374,17 @@ function getCertChain(securityInfoAsStri
     certChain += getPEMString(cert);
   }
   return certChain;
 }
 
 function getDERString(cert) {
   var length = {};
   var derArray = cert.getRawDER(length);
-  var derString = '';
+  var derString = "";
   for (var i = 0; i < derArray.length; i++) {
     derString += String.fromCharCode(derArray[i]);
   }
   return derString;
 }
 
 function getPEMString(cert) {
   var derb64 = btoa(getDERString(cert));
--- a/browser/base/content/test/general/browser_aboutHealthReport.js
+++ b/browser/base/content/test/general/browser_aboutHealthReport.js
@@ -121,14 +121,14 @@ function promiseNewTabLoadEvent(aUrl, aE
   tab.linkedBrowser.addEventListener(aEventType, function load(event) {
     tab.linkedBrowser.removeEventListener(aEventType, load, true);
     let iframe = tab.linkedBrowser.contentDocument.getElementById("remote-report");
       iframe.addEventListener("load", function frameLoad(e) {
         if (iframe.contentWindow.location.href == "about:blank" ||
             e.target != iframe) {
           return;
         }
-        iframe.removeEventListener("load", frameLoad, false);
+        iframe.removeEventListener("load", frameLoad);
         deferred.resolve(iframe);
-      }, false);
+      });
     }, true);
   return deferred.promise;
 }
--- a/browser/base/content/test/general/browser_backButtonFitts.js
+++ b/browser/base/content/test/general/browser_backButtonFitts.js
@@ -8,19 +8,19 @@ add_task(function* () {
 
   yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function* () {
     // Push the state before maximizing the window and clicking below.
     content.history.pushState("page2", "page2", "page2");
 
     // While in the child process, add a listener for the popstate event here. This
     // event will fire when the mouse click happens.
     content.addEventListener("popstate", function onPopState() {
-      content.removeEventListener("popstate", onPopState, false);
+      content.removeEventListener("popstate", onPopState);
       sendAsyncMessage("Test:PopStateOccurred", { location: content.document.location.href });
-    }, false);
+    });
   });
 
   window.maximize();
 
   // Find where the nav-bar is vertically.
   var navBar = document.getElementById("nav-bar");
   var boundingRect = navBar.getBoundingClientRect();
   var yPixel = boundingRect.top + Math.floor(boundingRect.height / 2);
--- a/browser/base/content/test/general/browser_blob-channelname.js
+++ b/browser/base/content/test/general/browser_blob-channelname.js
@@ -1,11 +1,11 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 Cu.import("resource://gre/modules/NetUtil.jsm");
 
 function test() {
-    var file = new File([new Blob(['test'], {type: 'text/plain'})], "test-name");
+    var file = new File([new Blob(["test"], {type: "text/plain"})], "test-name");
     var url = URL.createObjectURL(file);
     var channel = NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true});
 
-    is(channel.contentDispositionFilename, 'test-name', "filename matches");
+    is(channel.contentDispositionFilename, "test-name", "filename matches");
 }
--- a/browser/base/content/test/general/browser_bookmark_popup.js
+++ b/browser/base/content/test/general/browser_bookmark_popup.js
@@ -191,16 +191,102 @@ add_task(function* panel_shown_for_new_b
     shouldAutoClose: false,
     popupHideFn() {
       bookmarkPanel.hidePopup();
     },
     isBookmarkRemoved: false,
   });
 });
 
+
+add_task(function* panel_shown_for_new_bookmark_compositionstart_no_autoclose() {
+  yield test_bookmarks_popup({
+    isNewBookmark: true,
+    popupShowFn() {
+      bookmarkStar.click();
+    },
+    *popupEditFn() {
+      let compositionStartPromise = BrowserTestUtils.waitForEvent(bookmarkPanel, "compositionstart");
+      EventUtils.synthesizeComposition({ type: "compositionstart" }, window);
+      info("Waiting for compositionstart event");
+      yield compositionStartPromise;
+      info("Got compositionstart event");
+    },
+    shouldAutoClose: false,
+    popupHideFn() {
+      EventUtils.synthesizeComposition({ type: "compositioncommitasis" });
+      bookmarkPanel.hidePopup();
+    },
+    isBookmarkRemoved: false,
+  });
+});
+
+add_task(function* panel_shown_for_new_bookmark_compositionstart_mouseout_no_autoclose() {
+  yield test_bookmarks_popup({
+    isNewBookmark: true,
+    popupShowFn() {
+      bookmarkStar.click();
+    },
+    *popupEditFn() {
+      let mouseMovePromise = BrowserTestUtils.waitForEvent(bookmarkPanel, "mousemove");
+      EventUtils.synthesizeMouseAtCenter(bookmarkPanel, {type: "mousemove"});
+      info("Waiting for mousemove event");
+      yield mouseMovePromise;
+      info("Got mousemove event");
+
+      let compositionStartPromise = BrowserTestUtils.waitForEvent(bookmarkPanel, "compositionstart");
+      EventUtils.synthesizeComposition({ type: "compositionstart" }, window);
+      info("Waiting for compositionstart event");
+      yield compositionStartPromise;
+      info("Got compositionstart event");
+
+      let mouseOutPromise = BrowserTestUtils.waitForEvent(bookmarkPanel, "mouseout");
+      EventUtils.synthesizeMouse(bookmarkPanel, 0, 0, {type: "mouseout"});
+      EventUtils.synthesizeMouseAtCenter(document.documentElement, {type: "mousemove"});
+      info("Waiting for mouseout event");
+      yield mouseOutPromise;
+      info("Got mouseout event, but shouldn't run autoclose");
+    },
+    shouldAutoClose: false,
+    popupHideFn() {
+      EventUtils.synthesizeComposition({ type: "compositioncommitasis" });
+      bookmarkPanel.hidePopup();
+    },
+    isBookmarkRemoved: false,
+  });
+});
+
+add_task(function* panel_shown_for_new_bookmark_compositionend_mouseout_autoclose() {
+  yield test_bookmarks_popup({
+    isNewBookmark: true,
+    popupShowFn() {
+      bookmarkStar.click();
+    },
+    *popupEditFn() {
+      let mouseMovePromise = BrowserTestUtils.waitForEvent(bookmarkPanel, "mousemove");
+      EventUtils.synthesizeMouseAtCenter(bookmarkPanel, {type: "mousemove"});
+      info("Waiting for mousemove event");
+      yield mouseMovePromise;
+      info("Got mousemove event");
+
+      EventUtils.synthesizeComposition({ type: "compositioncommit", data: "committed text" });
+    },
+    *popupHideFn() {
+      let mouseOutPromise = BrowserTestUtils.waitForEvent(bookmarkPanel, "mouseout");
+      EventUtils.synthesizeMouse(bookmarkPanel, 0, 0, {type: "mouseout"});
+      EventUtils.synthesizeMouseAtCenter(document.documentElement, {type: "mousemove"});
+      info("Waiting for mouseout event");
+      yield mouseOutPromise;
+      info("Got mouseout event, should autoclose now");
+    },
+    shouldAutoClose: false,
+    isBookmarkRemoved: false,
+  });
+});
+
 add_task(function* contextmenu_new_bookmark_keypress_no_autoclose() {
   yield test_bookmarks_popup({
     isNewBookmark: true,
     *popupShowFn(browser) {
       let contextMenu = document.getElementById("contentAreaContextMenu");
       let awaitPopupShown = BrowserTestUtils.waitForEvent(contextMenu,
                                                           "popupshown");
       let awaitPopupHidden = BrowserTestUtils.waitForEvent(contextMenu,
--- a/browser/base/content/test/general/browser_bookmark_titles.js
+++ b/browser/base/content/test/general/browser_bookmark_titles.js
@@ -1,27 +1,27 @@
 /* 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/. */
 
 // This file is tests for the default titles that new bookmarks get.
 
 var tests = [
     // Common page.
-    ['http://example.com/browser/browser/base/content/test/general/dummy_page.html',
-     'Dummy test page'],
+    ["http://example.com/browser/browser/base/content/test/general/dummy_page.html",
+     "Dummy test page"],
     // Data URI.
-    ['data:text/html;charset=utf-8,<title>test%20data:%20url</title>',
-     'test data: url'],
+    ["data:text/html;charset=utf-8,<title>test%20data:%20url</title>",
+     "test data: url"],
     // about:neterror
-    ['data:application/vnd.mozilla.xul+xml,',
-     'data:application/vnd.mozilla.xul+xml,'],
+    ["data:application/vnd.mozilla.xul+xml,",
+     "data:application/vnd.mozilla.xul+xml,"],
     // about:certerror
-    ['https://untrusted.example.com/somepage.html',
-     'https://untrusted.example.com/somepage.html']
+    ["https://untrusted.example.com/somepage.html",
+     "https://untrusted.example.com/somepage.html"]
 ];
 
 add_task(function* () {
     gBrowser.selectedTab = gBrowser.addTab();
     let browser = gBrowser.selectedBrowser;
     browser.stop(); // stop the about:blank load.
 
     // Test that a bookmark of each URI gets the corresponding default title.
@@ -35,35 +35,35 @@ add_task(function* () {
     }
 
     // Network failure test: now that dummy_page.html is in history, bookmarking
     // it should give the last known page title as the default bookmark title.
 
     // Simulate a network outage with offline mode. (Localhost is still
     // accessible in offline mode, so disable the test proxy as well.)
     BrowserOffline.toggleOfflineStatus();
-    let proxy = Services.prefs.getIntPref('network.proxy.type');
-    Services.prefs.setIntPref('network.proxy.type', 0);
+    let proxy = Services.prefs.getIntPref("network.proxy.type");
+    Services.prefs.setIntPref("network.proxy.type", 0);
     registerCleanupFunction(function() {
         BrowserOffline.toggleOfflineStatus();
-        Services.prefs.setIntPref('network.proxy.type', proxy);
+        Services.prefs.setIntPref("network.proxy.type", proxy);
     });
 
     // LOAD_FLAGS_BYPASS_CACHE isn't good enough. So clear the cache.
     Services.cache2.clear();
 
     let [uri, title] = tests[0];
 
     let promiseLoaded = promisePageLoaded(browser);
     BrowserTestUtils.loadURI(browser, uri);
     yield promiseLoaded;
 
     // The offline mode test is only good if the page failed to load.
     yield ContentTask.spawn(browser, null, function() {
-      is(content.document.documentURI.substring(0, 14), 'about:neterror',
+      is(content.document.documentURI.substring(0, 14), "about:neterror",
           "Offline mode successfully simulated network outage.");
     });
     yield checkBookmark(uri, title);
 
     gBrowser.removeCurrentTab();
 });
 
 // Bookmark the current page and confirm that the new bookmark has the expected
--- a/browser/base/content/test/general/browser_bug1045809.js
+++ b/browser/base/content/test/general/browser_bug1045809.js
@@ -32,31 +32,31 @@ add_task(function* () {
   // Test 3: mixed content must be blocked again
   yield promiseTabLoadEvent(tab);
   yield* test3(gBrowser.getBrowserForTab(tab));
 });
 
 function* test1(gTestBrowser) {
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
 
-  var x = content.document.getElementsByTagName('iframe')[0].contentDocument.getElementById('mixedContentContainer');
+  var x = content.document.getElementsByTagName("iframe")[0].contentDocument.getElementById("mixedContentContainer");
   is(x, null, "Mixed Content is NOT to be found in Test1");
 
   // Disable Mixed Content Protection for the page (and reload)
   gIdentityHandler.disableMixedContentProtection();
 }
 
 function* test2(gTestBrowser) {
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: true, activeBlocked: false, passiveLoaded: false});
 
-  var x = content.document.getElementsByTagName('iframe')[0].contentDocument.getElementById('mixedContentContainer');
+  var x = content.document.getElementsByTagName("iframe")[0].contentDocument.getElementById("mixedContentContainer");
   isnot(x, null, "Mixed Content is to be found in Test2");
 
   // Re-enable Mixed Content Protection for the page (and reload)
   gIdentityHandler.enableMixedContentProtection();
 }
 
 function* test3(gTestBrowser) {
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
 
-  var x = content.document.getElementsByTagName('iframe')[0].contentDocument.getElementById('mixedContentContainer');
+  var x = content.document.getElementsByTagName("iframe")[0].contentDocument.getElementById("mixedContentContainer");
   is(x, null, "Mixed Content is NOT to be found in Test3");
 }
--- a/browser/base/content/test/general/browser_bug1261299.js
+++ b/browser/base/content/test/general/browser_bug1261299.js
@@ -6,17 +6,17 @@
 /**
  * Tests for Bug 1261299
  * Test that the service menu code path is called properly and the
  * current selection (transferable) is cached properly on the parent process.
  */
 
 add_task(function* test_content_and_chrome_selection() {
   let testPage =
-    'data:text/html,' +
+    "data:text/html," +
     '<textarea id="textarea">Write something here</textarea>';
   let DOMWindowUtils = EventUtils._getDOMWindowUtils(window);
   let selectedText;
 
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, testPage);
   yield BrowserTestUtils.synthesizeMouse("#textarea", 0, 0, {}, gBrowser.selectedBrowser);
   yield BrowserTestUtils.synthesizeKey("KEY_ArrowRight",
       {shiftKey: true, ctrlKey: true, code: "ArrowRight"}, gBrowser.selectedBrowser);
@@ -35,20 +35,20 @@ add_task(function* test_content_and_chro
 
 // Test switching active selection.
 // Each tab has a content selection and when you switch to that tab, its selection becomes
 // active aka the current selection.
 // Expect: The active selection is what is being sent to OSX service menu.
 
 add_task(function* test_active_selection_switches_properly() {
   let testPage1 =
-    'data:text/html,' +
+    "data:text/html," +
     '<textarea id="textarea">Write something here</textarea>';
   let testPage2 =
-    'data:text/html,' +
+    "data:text/html," +
     '<textarea id="textarea">Nothing available</textarea>';
   let DOMWindowUtils = EventUtils._getDOMWindowUtils(window);
   let selectedText;
 
   let tab1 = yield BrowserTestUtils.openNewForegroundTab(gBrowser, testPage1);
   yield BrowserTestUtils.synthesizeMouse("#textarea", 0, 0, {}, gBrowser.selectedBrowser);
   yield BrowserTestUtils.synthesizeKey("KEY_ArrowRight",
       {shiftKey: true, ctrlKey: true, code: "ArrowRight"}, gBrowser.selectedBrowser);
--- a/browser/base/content/test/general/browser_bug1297539.js
+++ b/browser/base/content/test/general/browser_bug1297539.js
@@ -49,48 +49,48 @@ function* cutCurrentSelection(elementQue
         `${contentElementQueryString} should be empty after cut (superkey + x)`);
     });
 }
 
 // Test that you are able to pasteTransferable for plain text
 // which is handled by TextEditor::PasteTransferable to paste into the editor.
 add_task(function* test_paste_transferable_plain_text() {
   let testPage =
-    'data:text/html,' +
+    "data:text/html," +
     '<textarea id="textarea">Write something here</textarea>';
 
   yield BrowserTestUtils.withNewTab(testPage, function* (browser) {
     // Select all the content in your editor element.
     yield BrowserTestUtils.synthesizeMouse("#textarea", 0, 0, {}, browser);
     yield BrowserTestUtils.synthesizeKey("a", {accelKey: true}, browser);
 
     yield* cutCurrentSelection("#textarea", "value", browser);
 
     let trans = getTransferableFromClipboard(false);
     let DOMWindowUtils = EventUtils._getDOMWindowUtils(window);
     DOMWindowUtils.sendContentCommandEvent("pasteTransferable", trans);
 
     yield ContentTask.spawn(browser, null, function* () {
-      let textArea = content.document.querySelector('#textarea');
+      let textArea = content.document.querySelector("#textarea");
       is(textArea.value, "Write something here",
          "Send content command pasteTransferable successful");
     });
   });
 });
 
 // Test that you are able to pasteTransferable for html
 // which is handled by HTMLEditor::PasteTransferable to paste into the editor.
 //
 // On Linux,
 // BrowserTestUtils.synthesizeKey("a", {accelKey: true}, browser);
 // doesn't seem to trigger for contenteditable which is why we use
 // Selection to select the contenteditable contents.
 add_task(function* test_paste_transferable_html() {
   let testPage =
-    'data:text/html,' +
+    "data:text/html," +
     '<div contenteditable="true"><b>Bold Text</b><i>italics</i></div>';
 
   yield BrowserTestUtils.withNewTab(testPage, function* (browser) {
     // Select all the content in your editor element.
     yield BrowserTestUtils.synthesizeMouse("div", 0, 0, {}, browser);
     yield ContentTask.spawn(browser, {}, function* () {
       let element = content.document.querySelector("div");
       let selection = content.window.getSelection();
@@ -99,14 +99,14 @@ add_task(function* test_paste_transferab
 
     yield* cutCurrentSelection("div", "textContent", browser);
 
     let trans = getTransferableFromClipboard(true);
     let DOMWindowUtils = EventUtils._getDOMWindowUtils(window);
     DOMWindowUtils.sendContentCommandEvent("pasteTransferable", trans);
 
     yield ContentTask.spawn(browser, null, function* () {
-      let textArea = content.document.querySelector('div');
+      let textArea = content.document.querySelector("div");
       is(textArea.innerHTML, "<b>Bold Text</b><i>italics</i>",
          "Send content command pasteTransferable successful");
     });
   });
 });
--- a/browser/base/content/test/general/browser_bug321000.js
+++ b/browser/base/content/test/general/browser_bug321000.js
@@ -5,22 +5,22 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const kTestString = "  hello hello  \n  world\nworld  ";
 
 var gTests = [
 
   { desc: "Urlbar strips newlines and surrounding whitespace",
     element: gURLBar,
-    expected: kTestString.replace(/\s*\n\s*/g, '')
+    expected: kTestString.replace(/\s*\n\s*/g, "")
   },
 
   { desc: "Searchbar replaces newlines with spaces",
-    element: document.getElementById('searchbar'),
-    expected: kTestString.replace(/\n/g, ' ')
+    element: document.getElementById("searchbar"),
+    expected: kTestString.replace(/\n/g, " ")
   },
 
 ];
 
 // Test for bug 23485 and bug 321000.
 // Urlbar should strip newlines,
 // search bar should replace newlines with spaces.
 function test() {
@@ -45,36 +45,36 @@ function next_test() {
 
 function test_paste(aCurrentTest) {
   var element = aCurrentTest.element;
 
   // Register input listener.
   var inputListener = {
     test: aCurrentTest,
     handleEvent(event) {
-      element.removeEventListener(event.type, this, false);
+      element.removeEventListener(event.type, this);
 
       is(element.value, this.test.expected, this.test.desc);
 
       // Clear the field and go to next test.
       element.value = "";
       setTimeout(next_test, 0);
     }
   }
-  element.addEventListener("input", inputListener, false);
+  element.addEventListener("input", inputListener);
 
   // Focus the window.
   window.focus();
   gBrowser.selectedBrowser.focus();
 
   // Focus the element and wait for focus event.
   info("About to focus " + element.id);
   element.addEventListener("focus", function() {
-    element.removeEventListener("focus", arguments.callee, false);
+    element.removeEventListener("focus", arguments.callee);
     executeSoon(function() {
       // Pasting is async because the Accel+V codepath ends up going through
       // nsDocumentViewer::FireClipboardEvent.
       info("Pasting into " + element.id);
       EventUtils.synthesizeKey("v", { accelKey: true });
     });
-  }, false);
+  });
   element.focus();
 }
--- a/browser/base/content/test/general/browser_bug409481.js
+++ b/browser/base/content/test/general/browser_bug409481.js
@@ -35,46 +35,46 @@ function runTest(event) {
   var sidebar = document.getElementById("sidebar");
   sidebar.contentDocument.removeEventListener("load", delayedRunTest, true);
 
   var browser = sidebar.contentDocument.getElementById("web-panels-browser");
   var div = browser && browser.contentDocument.getElementById("test_bug409481");
   ok(div && div.textContent == "Content!", "Sidebar content loaded");
 
   var link = browser && browser.contentDocument.getElementById("link");
-  sidebar.contentDocument.addEventListener("popupshown", contextMenuOpened, false);
+  sidebar.contentDocument.addEventListener("popupshown", contextMenuOpened);
 
   EventUtils.synthesizeMouseAtCenter(link, { type: "contextmenu", button: 2 }, browser.contentWindow);
 }
 
 function contextMenuOpened() {
   var sidebar = document.getElementById("sidebar");
-  sidebar.contentDocument.removeEventListener("popupshown", contextMenuOpened, false);
+  sidebar.contentDocument.removeEventListener("popupshown", contextMenuOpened);
 
   var copyLinkCommand = sidebar.contentDocument.getElementById("context-copylink");
-  copyLinkCommand.addEventListener("command", copyLinkCommandExecuted, false);
+  copyLinkCommand.addEventListener("command", copyLinkCommandExecuted);
   copyLinkCommand.doCommand();
 }
 
 function copyLinkCommandExecuted(event) {
-  event.target.removeEventListener("command", copyLinkCommandExecuted, false);
+  event.target.removeEventListener("command", copyLinkCommandExecuted);
 
   var sidebar = document.getElementById("sidebar");
   var browser = sidebar.contentDocument.getElementById("web-panels-browser");
   var textbox = browser && browser.contentDocument.getElementById("textbox");
   textbox.focus();
   document.commandDispatcher.getControllerForCommand("cmd_paste").doCommand("cmd_paste");
   is(textbox.value, "http://www.example.com/ctest", "copy link command");
 
-  sidebar.contentDocument.addEventListener("popuphidden", contextMenuClosed, false);
+  sidebar.contentDocument.addEventListener("popuphidden", contextMenuClosed);
   event.target.parentNode.hidePopup();
 }
 
 function contextMenuClosed() {
   var sidebar = document.getElementById("sidebar");
-  sidebar.contentDocument.removeEventListener("popuphidden", contextMenuClosed, false);
+  sidebar.contentDocument.removeEventListener("popuphidden", contextMenuClosed);
 
   SidebarUI.hide();
 
   ok(document.getElementById("sidebar-box").hidden, "Sidebar successfully hidden");
 
   finish();
 }
--- a/browser/base/content/test/general/browser_bug423833.js
+++ b/browser/base/content/test/general/browser_bug423833.js
@@ -1,13 +1,13 @@
 /* Tests for proper behaviour of "Show this frame" context menu options */
 
 // Two frames, one with text content, the other an error page
-var invalidPage = 'http://127.0.0.1:55555/';
-var validPage = 'http://example.com/';
+var invalidPage = "http://127.0.0.1:55555/";
+var validPage = "http://example.com/";
 var testPage = 'data:text/html,<frameset cols="400,400"><frame src="' + validPage + '"><frame src="' + invalidPage + '"></frameset>';
 
 // Store the tab and window created in tests 2 and 3 respectively
 var test2tab;
 var test3window;
 
 // We use setInterval instead of setTimeout to avoid race conditions on error doc loads
 var intervalID;
@@ -68,18 +68,18 @@ function test2Setup() {
 
   document.popupNode = badFrame.document.firstChild;
 
   var contentAreaContextMenu = document.getElementById("contentAreaContextMenu");
   var contextMenu = new nsContextMenu(contentAreaContextMenu);
 
   gBrowser.tabContainer.addEventListener("TabOpen", function(event) {
     test2tab = event.target;
-    gBrowser.tabContainer.removeEventListener("TabOpen", arguments.callee, false);
-  }, false);
+    gBrowser.tabContainer.removeEventListener("TabOpen", arguments.callee);
+  });
   contextMenu.openFrameInTab();
   ok(test2tab, "openFrameInTab() opened a tab");
 
   gBrowser.selectedTab = test2tab;
 
   intervalID = setInterval(testOpenFrameInTab, 3000);
 }
 
--- a/browser/base/content/test/general/browser_bug427559.js
+++ b/browser/base/content/test/general/browser_bug427559.js
@@ -2,19 +2,19 @@
 
 /*
  * Test bug 427559 to make sure focused elements that are no longer on the page
  * will have focus transferred to the window when changing tabs back to that
  * tab with the now-gone element.
  */
 
 // Default focus on a button and have it kill itself on blur.
-const URL = 'data:text/html;charset=utf-8,' +
+const URL = "data:text/html;charset=utf-8," +
             '<body><button onblur="this.remove()">' +
-            '<script>document.body.firstChild.focus()</script></body>';
+            "<script>document.body.firstChild.focus()</script></body>";
 
 function getFocusedLocalName(browser) {
   return ContentTask.spawn(browser, null, function* () {
     return content.document.activeElement.localName;
   });
 }
 
 add_task(function* () {
--- a/browser/base/content/test/general/browser_bug432599.js
+++ b/browser/base/content/test/general/browser_bug432599.js
@@ -79,23 +79,23 @@ var initialRemoveHidden;
 
 var popupElement = document.getElementById("editBookmarkPanel");
 var titleElement = document.getElementById("editBookmarkPanelTitle");
 var removeElement = document.getElementById("editBookmarkPanelRemoveButton");
 
 function checkBookmarksPanel(invoker, phase) {
   let onPopupShown = function(aEvent) {
     if (aEvent.originalTarget == popupElement) {
-      popupElement.removeEventListener("popupshown", arguments.callee, false);
+      popupElement.removeEventListener("popupshown", arguments.callee);
       checkBookmarksPanel(invoker, phase + 1);
     }
   };
   let onPopupHidden = function(aEvent) {
     if (aEvent.originalTarget == popupElement) {
-      popupElement.removeEventListener("popuphidden", arguments.callee, false);
+      popupElement.removeEventListener("popuphidden", arguments.callee);
       if (phase < 4) {
         checkBookmarksPanel(invoker, phase + 1);
       } else {
         ++currentInvoker;
         if (currentInvoker < invokers.length) {
           checkBookmarksPanel(invokers[currentInvoker], 1);
         } else {
           gBrowser.removeTab(gBrowser.selectedTab, {skipPermitUnload: true});
@@ -104,23 +104,23 @@ function checkBookmarksPanel(invoker, ph
         }
       }
     }
   };
 
   switch (phase) {
   case 1:
   case 3:
-    popupElement.addEventListener("popupshown", onPopupShown, false);
+    popupElement.addEventListener("popupshown", onPopupShown);
     break;
   case 2:
-    popupElement.addEventListener("popuphidden", onPopupHidden, false);
+    popupElement.addEventListener("popuphidden", onPopupHidden);
     initialValue = titleElement.value;
     initialRemoveHidden = removeElement.hidden;
     break;
   case 4:
-    popupElement.addEventListener("popuphidden", onPopupHidden, false);
+    popupElement.addEventListener("popuphidden", onPopupHidden);
     is(titleElement.value, initialValue, "The bookmark panel's title should be the same");
     is(removeElement.hidden, initialRemoveHidden, "The bookmark panel's visibility should not change");
     break;
   }
   invoker(phase);
 }
--- a/browser/base/content/test/general/browser_bug481560.js
+++ b/browser/base/content/test/general/browser_bug481560.js
@@ -2,20 +2,20 @@ function test() {
   waitForExplicitFinish();
 
   whenNewWindowLoaded(null, function(win) {
     waitForFocus(function() {
       function onTabClose() {
         ok(false, "shouldn't have gotten the TabClose event for the last tab");
       }
       var tab = win.gBrowser.selectedTab;
-      tab.addEventListener("TabClose", onTabClose, false);
+      tab.addEventListener("TabClose", onTabClose);
 
       EventUtils.synthesizeKey("w", { accelKey: true }, win);
 
       ok(win.closed, "accel+w closed the window immediately");
 
-      tab.removeEventListener("TabClose", onTabClose, false);
+      tab.removeEventListener("TabClose", onTabClose);
 
       finish();
     }, win);
   });
 }
--- a/browser/base/content/test/general/browser_bug521216.js
+++ b/browser/base/content/test/general/browser_bug521216.js
@@ -2,32 +2,32 @@ var expected = ["TabOpen", "onStateChang
 var actual = [];
 var tabIndex = -1;
 this.__defineGetter__("tab", () => gBrowser.tabs[tabIndex]);
 
 function test() {
   waitForExplicitFinish();
   tabIndex = gBrowser.tabs.length;
   gBrowser.addTabsProgressListener(progressListener);
-  gBrowser.tabContainer.addEventListener("TabOpen", TabOpen, false);
+  gBrowser.tabContainer.addEventListener("TabOpen", TabOpen);
   gBrowser.addTab("data:text/html,<html><head><link href='about:logo' rel='shortcut icon'>");
 }
 
 function record(aName) {
   info("got " + aName);
   if (actual.indexOf(aName) == -1)
     actual.push(aName);
   if (actual.length == expected.length) {
     is(actual.toString(), expected.toString(),
        "got events and progress notifications in expected order");
 
     executeSoon(function(tab) {
       gBrowser.removeTab(tab);
       gBrowser.removeTabsProgressListener(progressListener);
-      gBrowser.tabContainer.removeEventListener("TabOpen", TabOpen, false);
+      gBrowser.tabContainer.removeEventListener("TabOpen", TabOpen);
       finish();
     }.bind(null, tab));
   }
 }
 
 function TabOpen(aEvent) {
   if (aEvent.target == tab)
     record(arguments.callee.name);
--- a/browser/base/content/test/general/browser_bug553455.js
+++ b/browser/base/content/test/general/browser_bug553455.js
@@ -8,23 +8,23 @@ const SECUREROOT = "https://example.com/
 const XPINSTALL_URL = "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul";
 const PREF_INSTALL_REQUIREBUILTINCERTS = "extensions.install.requireBuiltInCerts";
 const PROGRESS_NOTIFICATION = "addon-progress";
 
 const { REQUIRE_SIGNING } = Cu.import("resource://gre/modules/addons/AddonConstants.jsm", {});
 const { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
 
 var rootDir = getRootDirectory(gTestPath);
-var rootPath = rootDir.split('/');
-var chromeName = rootPath[0] + '//' + rootPath[2];
+var rootPath = rootDir.split("/");
+var chromeName = rootPath[0] + "//" + rootPath[2];
 var croot = chromeName + "/content/browser/toolkit/mozapps/extensions/test/xpinstall/";
 var jar = getJar(croot);
 if (jar) {
   var tmpdir = extractJarToTmp(jar);
-  croot = 'file://' + tmpdir.path + '/';
+  croot = "file://" + tmpdir.path + "/";
 }
 const CHROMEROOT = croot;
 
 var gApp = document.getElementById("bundle_brand").getString("brandShortName");
 var gVersion = Services.appinfo.version;
 
 function getObserverTopic(aNotificationId) {
   let topic = aNotificationId;
@@ -130,19 +130,19 @@ function waitForNotification(aId, aExpec
     return PopupNotifications.panel;
   });
 }
 
 function waitForNotificationClose() {
   return new Promise(resolve => {
     info("Waiting for notification to close");
     PopupNotifications.panel.addEventListener("popuphidden", function listener() {
-      PopupNotifications.panel.removeEventListener("popuphidden", listener, false);
+      PopupNotifications.panel.removeEventListener("popuphidden", listener);
       resolve();
-    }, false);
+    });
   });
 }
 
 function waitForInstallDialog() {
   return Task.spawn(function* () {
     if (Preferences.get("xpinstall.customConfirmationUI", false)) {
       let panel = yield waitForNotification("addon-install-confirmation");
       return panel.childNodes[0];
@@ -778,22 +778,22 @@ function test_reload() {
     is(notification.button.label, "Restart Now", "Should have seen the right button");
     is(notification.getAttribute("label"),
        "XPI Test will be installed after you restart " + gApp + ".",
        "Should have seen the right message");
 
     function testFail() {
       ok(false, "Reloading should not have hidden the notification");
     }
-    PopupNotifications.panel.addEventListener("popuphiding", testFail, false);
+    PopupNotifications.panel.addEventListener("popuphiding", testFail);
     let requestedUrl = TESTROOT2 + "enabled.html";
     let loadedPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, requestedUrl);
     gBrowser.loadURI(TESTROOT2 + "enabled.html");
     yield loadedPromise;
-    PopupNotifications.panel.removeEventListener("popuphiding", testFail, false);
+    PopupNotifications.panel.removeEventListener("popuphiding", testFail);
 
     let installs = yield getInstalls();
     is(installs.length, 1, "Should be one pending install");
     installs[0].cancel();
 
     Services.perms.remove(makeURI("http://example.com/"), "install");
     yield removeTab();
   });
--- a/browser/base/content/test/general/browser_bug555767.js
+++ b/browser/base/content/test/general/browser_bug555767.js
@@ -22,33 +22,33 @@
 
       // Set the urlbar to include the moz-action
       gURLBar.value = "moz-action:switchtab," + JSON.stringify({url: testURL});
       // Focus the urlbar so we can press enter
       gURLBar.focus();
 
       // Functions for TabClose and TabSelect
       function onTabClose(aEvent) {
-        gBrowser.tabContainer.removeEventListener("TabClose", onTabClose, false);
+        gBrowser.tabContainer.removeEventListener("TabClose", onTabClose);
         // Make sure we get the TabClose event for testTab
         is(aEvent.originalTarget, testTab, "Got the TabClose event for the right tab");
         // Confirm that we did select the tab
         ok(tabSelected, "Confirming that the tab was selected");
         gBrowser.removeTab(baseTab);
         finish();
       }
       function onTabSelect(aEvent) {
-        gBrowser.tabContainer.removeEventListener("TabSelect", onTabSelect, false);
+        gBrowser.tabContainer.removeEventListener("TabSelect", onTabSelect);
         // Make sure we got the TabSelect event for baseTab
         is(aEvent.originalTarget, baseTab, "Got the TabSelect event for the right tab");
         // Confirm that the selected tab is in fact base tab
         is(gBrowser.selectedTab, baseTab, "We've switched to the correct tab");
         tabSelected = true;
       }
 
       // Add the TabClose, TabSelect event listeners before we press enter
-      gBrowser.tabContainer.addEventListener("TabClose", onTabClose, false);
-      gBrowser.tabContainer.addEventListener("TabSelect", onTabSelect, false);
+      gBrowser.tabContainer.addEventListener("TabClose", onTabClose);
+      gBrowser.tabContainer.addEventListener("TabSelect", onTabSelect);
 
       // Press enter!
       EventUtils.synthesizeKey("VK_RETURN", {});
     });
 
--- a/browser/base/content/test/general/browser_bug561636.js
+++ b/browser/base/content/test/general/browser_bug561636.js
@@ -1,19 +1,19 @@
-var gInvalidFormPopup = document.getElementById('invalid-form-popup');
+var gInvalidFormPopup = document.getElementById("invalid-form-popup");
 ok(gInvalidFormPopup,
    "The browser should have a popup to show when a form is invalid");
 
 function checkPopupShow() {
-  ok(gInvalidFormPopup.state == 'showing' || gInvalidFormPopup.state == 'open',
+  ok(gInvalidFormPopup.state == "showing" || gInvalidFormPopup.state == "open",
      "[Test " + testId + "] The invalid form popup should be shown");
 }
 
 function checkPopupHide() {
-  ok(gInvalidFormPopup.state != 'showing' && gInvalidFormPopup.state != 'open',
+  ok(gInvalidFormPopup.state != "showing" && gInvalidFormPopup.state != "open",
      "[Test " + testId + "] The invalid form popup should not be shown");
 }
 
 var gObserver = {
   QueryInterface : XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver]),
 
   notifyInvalidSubmit(aFormElement, aInvalidElements) {
   }
@@ -46,34 +46,34 @@ function* openNewTab(uri, background) {
     gBrowser.selectedTab = tab;
   }
   yield promiseTabLoadEvent(tab, "data:text/html," + escape(uri));
   return browser;
 }
 
 function* clickChildElement(browser) {
   yield ContentTask.spawn(browser, {}, function* () {
-    content.document.getElementById('s').click();
+    content.document.getElementById("s").click();
   });
 }
 
 function* blurChildElement(browser) {
   yield ContentTask.spawn(browser, {}, function* () {
-    content.document.getElementById('i').blur();
+    content.document.getElementById("i").blur();
   });
 }
 
 function* checkChildFocus(browser, message) {
   yield ContentTask.spawn(browser, [message, testId], function* (args) {
     let [msg, id] = args;
-    var focused = content.document.activeElement == content.document.getElementById('i');
+    var focused = content.document.activeElement == content.document.getElementById("i");
 
     var validMsg = true;
     if (msg) {
-      validMsg = (msg == content.document.getElementById('i').validationMessage);
+      validMsg = (msg == content.document.getElementById("i").validationMessage);
     }
 
     Assert.equal(focused, true, "Test " + id + " First invalid element should be focused");
     Assert.equal(validMsg, true, "Test " + id + " The panel should show the message from validationMessage");
   });
 }
 
 /**
@@ -280,17 +280,17 @@ add_task(function* () {
         gObserver.notifyInvalidSubmit = function() {};
         resolve();
       });
     };
 
     Services.obs.addObserver(gObserver, "invalidformsubmit", false);
 
     executeSoon(function() {
-      browser.contentDocument.getElementById('s').click();
+      browser.contentDocument.getElementById("s").click();
     });
   });
 
   yield notifierPromise;
 
   gBrowser.removeTab(gBrowser.getTabForBrowser(browser));
 });
 
@@ -325,18 +325,18 @@ add_task(function* () {
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
   checkPopupShow();
   yield checkChildFocus(browser, gInvalidFormPopup.firstChild.textContent);
 
-  let inputPromise = promiseWaitForEvent(gBrowser.contentDocument.getElementById('i'), "input");
-  EventUtils.synthesizeKey('f', {});
+  let inputPromise = promiseWaitForEvent(gBrowser.contentDocument.getElementById("i"), "input");
+  EventUtils.synthesizeKey("f", {});
   yield inputPromise;
 
   // Now, the element suffers from another error, the message should have
   // been updated.
   yield new Promise((resolve, reject) => {
     // XXXndeakin This isn't really going to work when the content is another process
     executeSoon(function() {
       checkChildFocus(browser, gInvalidFormPopup.firstChild.textContent);
--- a/browser/base/content/test/general/browser_bug581253.js
+++ b/browser/base/content/test/general/browser_bug581253.js
@@ -48,36 +48,36 @@ function waitForStarChange(aValue, aCall
 function onStarred() {
   is(BookmarkingUI.status, BookmarkingUI.STATUS_STARRED,
      "star button indicates that the page is bookmarked");
 
   let uri = makeURI(testURL);
   let tagTxn = new PlacesTagURITransaction(uri, [testTag]);
   PlacesUtils.transactionManager.doTransaction(tagTxn);
 
-  StarUI.panel.addEventListener("popupshown", onPanelShown, false);
+  StarUI.panel.addEventListener("popupshown", onPanelShown);
   BookmarkingUI.star.click();
 }
 
 function onPanelShown(aEvent) {
   if (aEvent.target == StarUI.panel) {
-    StarUI.panel.removeEventListener("popupshown", arguments.callee, false);
+    StarUI.panel.removeEventListener("popupshown", arguments.callee);
     let tagsField = document.getElementById("editBMPanel_tagsField");
     ok(tagsField.value == testTag, "tags field value was set");
     tagsField.focus();
 
-    StarUI.panel.addEventListener("popuphidden", onPanelHidden, false);
+    StarUI.panel.addEventListener("popuphidden", onPanelHidden);
     let removeButton = document.getElementById("editBookmarkPanelRemoveButton");
     removeButton.click();
   }
 }
 
 function onPanelHidden(aEvent) {
   if (aEvent.target == StarUI.panel) {
-    StarUI.panel.removeEventListener("popuphidden", arguments.callee, false);
+    StarUI.panel.removeEventListener("popuphidden", arguments.callee);
 
     executeSoon(function() {
       ok(!PlacesUtils.bookmarks.isBookmarked(makeURI(testURL)),
          "the bookmark for the test url has been removed");
       is(BookmarkingUI.status, BookmarkingUI.STATUS_UNSTARRED,
          "star button indicates that the bookmark has been removed");
       gBrowser.removeCurrentTab();
       PlacesTestUtils.clearHistory().then(finish);
--- a/browser/base/content/test/general/browser_bug585785.js
+++ b/browser/base/content/test/general/browser_bug585785.js
@@ -20,16 +20,16 @@ function checkAnimationState() {
     finish();
     return;
   }
 
   info("tab didn't close immediately, so the tab opening animation must have started moving");
   info("waiting for the tab to close asynchronously");
   tab.addEventListener("transitionend", function(event) {
     if (event.propertyName == "max-width") {
-      tab.removeEventListener("transitionend", arguments.callee, false);
+      tab.removeEventListener("transitionend", arguments.callee);
       executeSoon(function() {
         ok(!tab.parentNode, "tab removed asynchronously");
         finish();
       });
     }
-  }, false);
+  });
 }
--- a/browser/base/content/test/general/browser_bug592338.js
+++ b/browser/base/content/test/general/browser_bug592338.js
@@ -5,77 +5,77 @@
 const TESTROOT = "http://example.com/browser/toolkit/mozapps/extensions/test/xpinstall/";
 
 var tempScope = {};
 Components.utils.import("resource://gre/modules/LightweightThemeManager.jsm", tempScope);
 var LightweightThemeManager = tempScope.LightweightThemeManager;
 
 function wait_for_notification(aCallback) {
   PopupNotifications.panel.addEventListener("popupshown", function() {
-    PopupNotifications.panel.removeEventListener("popupshown", arguments.callee, false);
+    PopupNotifications.panel.removeEventListener("popupshown", arguments.callee);
     aCallback(PopupNotifications.panel);
-  }, false);
+  });
 }
 
 var TESTS = [
 function test_install_http() {
   is(LightweightThemeManager.currentTheme, null, "Should be no lightweight theme selected");
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.org/"), "install", pm.ALLOW_ACTION);
 
   gBrowser.selectedTab = gBrowser.addTab("http://example.org/browser/browser/base/content/test/general/bug592338.html");
   gBrowser.selectedBrowser.addEventListener("pageshow", function() {
     if (gBrowser.contentDocument.location.href == "about:blank")
       return;
 
-    gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee, false);
+    gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee);
 
     executeSoon(function() {
       BrowserTestUtils.synthesizeMouse("#theme-install", 2, 2, {}, gBrowser.selectedBrowser);
 
       is(LightweightThemeManager.currentTheme, null, "Should not have installed the test theme");
 
       gBrowser.removeTab(gBrowser.selectedTab);
 
       pm.remove(makeURI("http://example.org/"), "install");
 
       runNextTest();
     });
-  }, false);
+  });
 },
 
 function test_install_lwtheme() {
   is(LightweightThemeManager.currentTheme, null, "Should be no lightweight theme selected");
 
   var pm = Services.perms;
   pm.add(makeURI("https://example.com/"), "install", pm.ALLOW_ACTION);
 
   gBrowser.selectedTab = gBrowser.addTab("https://example.com/browser/browser/base/content/test/general/bug592338.html");
   gBrowser.selectedBrowser.addEventListener("pageshow", function() {
     if (gBrowser.contentDocument.location.href == "about:blank")
       return;
 
-    gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee, false);
+    gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee);
 
     BrowserTestUtils.synthesizeMouse("#theme-install", 2, 2, {}, gBrowser.selectedBrowser);
     let notificationBox = gBrowser.getNotificationBox(gBrowser.selectedBrowser);
     waitForCondition(
       () => notificationBox.getNotificationWithValue("lwtheme-install-notification"),
       () => {
         is(LightweightThemeManager.currentTheme.id, "test", "Should have installed the test theme");
 
         LightweightThemeManager.currentTheme = null;
         gBrowser.removeTab(gBrowser.selectedTab);
         Services.perms.remove(makeURI("http://example.com/"), "install");
 
         runNextTest();
       }
     );
-  }, false);
+  });
 },
 
 function test_lwtheme_switch_theme() {
   is(LightweightThemeManager.currentTheme, null, "Should be no lightweight theme selected");
 
   AddonManager.getAddonByID("theme-xpi@tests.mozilla.org", function(aAddon) {
     aAddon.userDisabled = false;
     ok(aAddon.isActive, "Theme should have immediately enabled");
@@ -84,17 +84,17 @@ function test_lwtheme_switch_theme() {
     var pm = Services.perms;
     pm.add(makeURI("https://example.com/"), "install", pm.ALLOW_ACTION);
 
     gBrowser.selectedTab = gBrowser.addTab("https://example.com/browser/browser/base/content/test/general/bug592338.html");
     gBrowser.selectedBrowser.addEventListener("pageshow", function() {
       if (gBrowser.contentDocument.location.href == "about:blank")
         return;
 
-      gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee, false);
+      gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee);
 
       executeSoon(function() {
         wait_for_notification(function(aPanel) {
           is(LightweightThemeManager.currentTheme, null, "Should not have installed the test lwtheme");
           ok(aAddon.isActive, "Test theme should still be active");
 
           let notification = aPanel.childNodes[0];
           is(notification.button.label, "Restart Now", "Should have seen the right button");
@@ -106,17 +106,17 @@ function test_lwtheme_switch_theme() {
           gBrowser.removeTab(gBrowser.selectedTab);
 
           Services.perms.remove(makeURI("http://example.com"), "install");
 
           runNextTest();
         });
         BrowserTestUtils.synthesizeMouse("#theme-install", 2, 2, {}, gBrowser.selectedBrowser);
       });
-    }, false);
+    });
   });
 }
 ];
 
 function runNextTest() {
   AddonManager.getAllInstalls(function(aInstalls) {
     is(aInstalls.length, 0, "Should be no active installs");
 
--- a/browser/base/content/test/general/browser_bug595507.js
+++ b/browser/base/content/test/general/browser_bug595507.js
@@ -1,36 +1,36 @@
 /**
  * Make sure that the form validation error message shows even if the form is in an iframe.
  */
 add_task(function* () {
   let uri = "<iframe src=\"data:text/html,<iframe name='t'></iframe><form target='t' action='data:text/html,'><input required id='i'><input id='s' type='submit'></form>\"</iframe>";
 
-  var gInvalidFormPopup = document.getElementById('invalid-form-popup');
+  var gInvalidFormPopup = document.getElementById("invalid-form-popup");
   ok(gInvalidFormPopup,
      "The browser should have a popup to show when a form is invalid");
 
   let tab = gBrowser.addTab();
   let browser = gBrowser.getBrowserForTab(tab);
   gBrowser.selectedTab = tab;
 
   yield promiseTabLoadEvent(tab, "data:text/html," + escape(uri));
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
 
   yield ContentTask.spawn(browser, {}, function* () {
-    content.document.getElementsByTagName('iframe')[0]
-           .contentDocument.getElementById('s').click();
+    content.document.getElementsByTagName("iframe")[0]
+           .contentDocument.getElementById("s").click();
   });
   yield popupShownPromise;
 
   yield ContentTask.spawn(browser, {}, function* () {
-    let childdoc = content.document.getElementsByTagName('iframe')[0].contentDocument;
+    let childdoc = content.document.getElementsByTagName("iframe")[0].contentDocument;
     Assert.equal(childdoc.activeElement, childdoc.getElementById("i"),
       "First invalid element should be focused");
   });
 
-  ok(gInvalidFormPopup.state == 'showing' || gInvalidFormPopup.state == 'open',
+  ok(gInvalidFormPopup.state == "showing" || gInvalidFormPopup.state == "open",
      "The invalid form popup should be shown");
 
   gBrowser.removeCurrentTab();
 });
 
--- a/browser/base/content/test/general/browser_bug596687.js
+++ b/browser/base/content/test/general/browser_bug596687.js
@@ -1,25 +1,25 @@
 add_task(function* test() {
   var tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser);
 
   var gotTabAttrModified = false;
   var gotTabClose = false;
 
   function onTabClose() {
     gotTabClose = true;
-    tab.addEventListener("TabAttrModified", onTabAttrModified, false);
+    tab.addEventListener("TabAttrModified", onTabAttrModified);
   }
 
   function onTabAttrModified() {
     gotTabAttrModified = true;
   }
 
-  tab.addEventListener("TabClose", onTabClose, false);
+  tab.addEventListener("TabClose", onTabClose);
 
   yield BrowserTestUtils.removeTab(tab);
 
   ok(gotTabClose, "should have got the TabClose event");
   ok(!gotTabAttrModified, "shouldn't have got the TabAttrModified event after TabClose");
 
-  tab.removeEventListener("TabClose", onTabClose, false);
-  tab.removeEventListener("TabAttrModified", onTabAttrModified, false);
+  tab.removeEventListener("TabClose", onTabClose);
+  tab.removeEventListener("TabAttrModified", onTabAttrModified);
 });
--- a/browser/base/content/test/general/browser_bug623893.js
+++ b/browser/base/content/test/general/browser_bug623893.js
@@ -26,20 +26,20 @@ function runTests() {
 
 function duplicate(delta, msg, cb) {
   var start = gBrowser.sessionHistory.index;
 
   duplicateTabIn(gBrowser.selectedTab, "tab", delta);
   let tab = gBrowser.selectedTab;
 
   tab.addEventListener("SSTabRestored", function tabRestoredListener() {
-    tab.removeEventListener("SSTabRestored", tabRestoredListener, false);
+    tab.removeEventListener("SSTabRestored", tabRestoredListener);
     is(gBrowser.sessionHistory.index, start + delta, msg);
     executeSoon(cb);
-  }, false);
+  });
 }
 
 function loadAndWait(url, cb) {
   gBrowser.selectedBrowser.addEventListener("load", function() {
     gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
     executeSoon(cb);
   }, true);
 
--- a/browser/base/content/test/general/browser_bug633691.js
+++ b/browser/base/content/test/general/browser_bug633691.js
@@ -1,36 +1,28 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
-function test() {
-  waitForExplicitFinish();
-  gBrowser.selectedTab = gBrowser.addTab("data:text/html,<iframe width='700' height='700'></iframe>");
-  // Open a html page with about:certerror in an iframe
-  BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(function() {
-    return ContentTask.spawn(gBrowser.selectedBrowser, "", function() {
-      return new Promise(resolve => {
-        info("Running content task");
-        let listener = e => {
-          removeEventListener('AboutNetErrorLoad', listener, false, true);
-          resolve();
-        };
-        addEventListener('AboutNetErrorLoad', listener, false, true);
-        let iframe = content.document.querySelector("iframe");
-        iframe.src = "https://expired.example.com/";
-      });
-    }).then(testIframeCert);
+add_task(function* test() {
+  const URL = "data:text/html,<iframe width='700' height='700'></iframe>";
+  yield BrowserTestUtils.withNewTab({ gBrowser, url: URL }, function* (browser) {
+    yield ContentTask.spawn(browser,
+                            { is_element_hidden_: is_element_hidden.toSource(),
+                              is_hidden_: is_hidden.toSource() },
+    function* ({ is_element_hidden_, is_hidden_ }) {
+      let loadError =
+        ContentTaskUtils.waitForEvent(this, "AboutNetErrorLoad", false, null, true);
+      let iframe = content.document.querySelector("iframe");
+      iframe.src = "https://expired.example.com/";
+
+      yield loadError;
+
+      let is_hidden = eval(`(() => ${is_hidden_})()`);
+      let is_element_hidden = eval(`(() => ${is_element_hidden_})()`);
+      let doc = content.document.getElementsByTagName("iframe")[0].contentDocument;
+      let aP = doc.getElementById("badCertAdvancedPanel");
+      ok(aP, "Advanced content should exist");
+      void is_hidden; // Quiet eslint warnings (actual use under is_element_hidden)
+      is_element_hidden(aP, "Advanced content should not be visible by default")
+    });
   });
-}
-
-function testIframeCert(e) {
-  // Confirm that the expert section is hidden
-  var doc = gBrowser.contentDocument.getElementsByTagName('iframe')[0].contentDocument;
-  var aP = doc.getElementById("badCertAdvancedPanel");
-  ok(aP, "Advanced content should exist");
-  is_element_hidden(aP, "Advanced content should not be visible by default")
-
-  // Clean up
-  gBrowser.removeCurrentTab();
-
-  finish();
-}
+});
--- a/browser/base/content/test/general/browser_bug664672.js
+++ b/browser/base/content/test/general/browser_bug664672.js
@@ -1,19 +1,19 @@
 function test() {
   waitForExplicitFinish();
 
   var tab = gBrowser.addTab();
 
   tab.addEventListener("TabClose", function() {
-    tab.removeEventListener("TabClose", arguments.callee, false);
+    tab.removeEventListener("TabClose", arguments.callee);
 
     ok(tab.linkedBrowser, "linkedBrowser should still exist during the TabClose event");
 
     executeSoon(function() {
       ok(!tab.linkedBrowser, "linkedBrowser should be gone after the TabClose event");
 
       finish();
     });
-  }, false);
+  });
 
   gBrowser.removeTab(tab);
 }
--- a/browser/base/content/test/general/browser_bug676619.js
+++ b/browser/base/content/test/general/browser_bug676619.js
@@ -83,41 +83,41 @@ function addWindowListener(aURL, aCallba
 // This listens for the next opened tab and checks it is of the right url.
 // opencallback is called when the new tab is fully loaded
 // closecallback is called when the tab is closed
 function TabOpenListener(url, opencallback, closecallback) {
   this.url = url;
   this.opencallback = opencallback;
   this.closecallback = closecallback;
 
-  gBrowser.tabContainer.addEventListener("TabOpen", this, false);
+  gBrowser.tabContainer.addEventListener("TabOpen", this);
 }
 
 TabOpenListener.prototype = {
   url: null,
   opencallback: null,
   closecallback: null,
   tab: null,
   browser: null,
 
   handleEvent(event) {
     if (event.type == "TabOpen") {
-      gBrowser.tabContainer.removeEventListener("TabOpen", this, false);
+      gBrowser.tabContainer.removeEventListener("TabOpen", this);
       this.tab = event.originalTarget;
       this.browser = this.tab.linkedBrowser;
       BrowserTestUtils.browserLoaded(this.browser, false, this.url).then(() => {
-        this.tab.addEventListener("TabClose", this, false);
+        this.tab.addEventListener("TabClose", this);
         var url = this.browser.currentURI.spec;
         is(url, this.url, "Should have opened the correct tab");
         this.opencallback();
       });
     } else if (event.type == "TabClose") {
       if (event.originalTarget != this.tab)
         return;
-      this.tab.removeEventListener("TabClose", this, false);
+      this.tab.removeEventListener("TabClose", this);
       this.opencallback = null;
       this.tab = null;
       this.browser = null;
       // Let the window close complete
       executeSoon(this.closecallback);
       this.closecallback = null;
     }
   }
--- a/browser/base/content/test/general/browser_bug822367.js
+++ b/browser/base/content/test/general/browser_bug822367.js
@@ -47,20 +47,20 @@ function MixedTest1A() {
   gTestBrowser.addEventListener("load", MixedTest1B, true);
 
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
 
   let {gIdentityHandler} = gTestBrowser.ownerGlobal;
   gIdentityHandler.disableMixedContentProtection();
 }
 function MixedTest1B() {
-  waitForCondition(() => content.document.getElementById('p1').innerHTML == "hello", MixedTest1C, "Waited too long for mixed script to run in Test 1");
+  waitForCondition(() => content.document.getElementById("p1").innerHTML == "hello", MixedTest1C, "Waited too long for mixed script to run in Test 1");
 }
 function MixedTest1C() {
-  ok(content.document.getElementById('p1').innerHTML == "hello", "Mixed script didn't load in Test 1");
+  ok(content.document.getElementById("p1").innerHTML == "hello", "Mixed script didn't load in Test 1");
   gTestBrowser.removeEventListener("load", MixedTest1B, true);
   MixedTest2();
 }
 
 // Mixed Display Test - Doorhanger should not appear
 function MixedTest2() {
   gTestBrowser.addEventListener("load", MixedTest2A, true);
   var url = gHttpTestRoot2 + "file_bug822367_2.html";
@@ -84,24 +84,24 @@ function MixedTest3A() {
   gTestBrowser.addEventListener("load", MixedTest3B, true);
 
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
 
   let {gIdentityHandler} = gTestBrowser.ownerGlobal;
   gIdentityHandler.disableMixedContentProtection();
 }
 function MixedTest3B() {
-  waitForCondition(() => content.document.getElementById('p1').innerHTML == "hello", MixedTest3C, "Waited too long for mixed script to run in Test 3");
+  waitForCondition(() => content.document.getElementById("p1").innerHTML == "hello", MixedTest3C, "Waited too long for mixed script to run in Test 3");
 }
 function MixedTest3C() {
-  waitForCondition(() => content.document.getElementById('p2').innerHTML == "bye", MixedTest3D, "Waited too long for mixed image to load in Test 3");
+  waitForCondition(() => content.document.getElementById("p2").innerHTML == "bye", MixedTest3D, "Waited too long for mixed image to load in Test 3");
 }
 function MixedTest3D() {
-  ok(content.document.getElementById('p1').innerHTML == "hello", "Mixed script didn't load in Test 3");
-  ok(content.document.getElementById('p2').innerHTML == "bye", "Mixed image didn't load in Test 3");
+  ok(content.document.getElementById("p1").innerHTML == "hello", "Mixed script didn't load in Test 3");
+  ok(content.document.getElementById("p2").innerHTML == "bye", "Mixed image didn't load in Test 3");
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: true, activeBlocked: false, passiveLoaded: true});
   MixedTest4();
 }
 
 // Location change - User override on one page doesn't propogate to another page after location change.
 function MixedTest4() {
   gTestBrowser.removeEventListener("load", MixedTest3B, true);
   gTestBrowser.addEventListener("load", MixedTest4A, true);
@@ -120,20 +120,20 @@ function MixedTest4A() {
 function MixedTest4B() {
   waitForCondition(() => content.document.location == gHttpTestRoot + "file_bug822367_4B.html", MixedTest4C, "Waited too long for mixed script to run in Test 4");
 }
 function MixedTest4C() {
   ok(content.document.location == gHttpTestRoot + "file_bug822367_4B.html", "Location didn't change in test 4");
 
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
 
-  waitForCondition(() => content.document.getElementById('p1').innerHTML == "", MixedTest4D, "Mixed script loaded in test 4 after location change!");
+  waitForCondition(() => content.document.getElementById("p1").innerHTML == "", MixedTest4D, "Mixed script loaded in test 4 after location change!");
 }
 function MixedTest4D() {
-  ok(content.document.getElementById('p1').innerHTML == "", "p1.innerHTML changed; mixed script loaded after location change in Test 4");
+  ok(content.document.getElementById("p1").innerHTML == "", "p1.innerHTML changed; mixed script loaded after location change in Test 4");
   MixedTest5();
 }
 
 // Mixed script attempts to load in a document.open()
 function MixedTest5() {
   gTestBrowser.removeEventListener("load", MixedTest4B, true);
   gTestBrowser.addEventListener("load", MixedTest5A, true);
   var url = gHttpTestRoot + "file_bug822367_5.html";
@@ -144,20 +144,20 @@ function MixedTest5A() {
   gTestBrowser.addEventListener("load", MixedTest5B, true);
 
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: false, activeBlocked: true, passiveLoaded: false});
 
   let {gIdentityHandler} = gTestBrowser.ownerGlobal;
   gIdentityHandler.disableMixedContentProtection();
 }
 function MixedTest5B() {
-  waitForCondition(() => content.document.getElementById('p1').innerHTML == "hello", MixedTest5C, "Waited too long for mixed script to run in Test 5");
+  waitForCondition(() => content.document.getElementById("p1").innerHTML == "hello", MixedTest5C, "Waited too long for mixed script to run in Test 5");
 }
 function MixedTest5C() {
-  ok(content.document.getElementById('p1').innerHTML == "hello", "Mixed script didn't load in Test 5");
+  ok(content.document.getElementById("p1").innerHTML == "hello", "Mixed script didn't load in Test 5");
   MixedTest6();
 }
 
 // Mixed script attempts to load in a document.open() that is within an iframe.
 function MixedTest6() {
   gTestBrowser.removeEventListener("load", MixedTest5B, true);
   gTestBrowser.addEventListener("load", MixedTest6A, true);
   var url = gHttpTestRoot2 + "file_bug822367_6.html";
@@ -177,19 +177,19 @@ function MixedTest6B() {
   let {gIdentityHandler} = gTestBrowser.ownerGlobal;
   gIdentityHandler.disableMixedContentProtection();
 }
 
 function MixedTest6C() {
   gTestBrowser.removeEventListener("load", MixedTest6C, true);
   waitForCondition(function() {
     try {
-      return content.document.getElementById('f1').contentDocument.getElementById('p1').innerHTML == "hello";
+      return content.document.getElementById("f1").contentDocument.getElementById("p1").innerHTML == "hello";
     } catch (e) {
       return false;
     }
   }, MixedTest6D, "Waited too long for mixed script to run in Test 6");
 }
 function MixedTest6D() {
-  ok(content.document.getElementById('f1').contentDocument.getElementById('p1').innerHTML == "hello", "Mixed script didn't load in Test 6");
+  ok(content.document.getElementById("f1").contentDocument.getElementById("p1").innerHTML == "hello", "Mixed script didn't load in Test 6");
   assertMixedContentBlockingState(gTestBrowser, {activeLoaded: true, activeBlocked: false, passiveLoaded: false});
   MixedTestsCompleted();
 }
--- a/browser/base/content/test/general/browser_bug839103.js
+++ b/browser/base/content/test/general/browser_bug839103.js
@@ -1,159 +1,120 @@
 const gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-const gStyleSheet = "bug839103.css";
+
+add_task(function* test() {
+  yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" },
+    function* (browser) {
+      yield ContentTask.spawn(browser, gTestRoot, testBody);
+    });
+});
 
-var gTab = null;
-var needsInitialApplicableStateEvent = false;
-var needsInitialApplicableStateEventFor = null;
+// This function runs entirely in the content process. It doesn't have access
+// any free variables in this file.
+function* testBody(testRoot) {
+  const gStyleSheet = "bug839103.css";
+
+  let loaded = ContentTaskUtils.waitForEvent(this, "load", true);
+  content.location = testRoot + "test_bug839103.html";
+
+  yield loaded;
+  function unexpectedContentEvent(event) {
+    ok(false, "Received a " + event.type + " event on content");
+  }
 
-function test() {
-  waitForExplicitFinish();
-  gBrowser.addEventListener("StyleSheetAdded", initialStylesheetAdded, true);
-  gTab = gBrowser.selectedTab = gBrowser.addTab(gTestRoot + "test_bug839103.html");
-  gTab.linkedBrowser.addEventListener("load", tabLoad, true);
-}
+  // We've seen the original stylesheet in the document.
+  // Now add a stylesheet on the fly and make sure we see it.
+  let doc = content.document;
+  doc.styleSheetChangeEventsEnabled = true;
+  doc.addEventListener("StyleSheetAdded", unexpectedContentEvent);
+  doc.addEventListener("StyleSheetRemoved", unexpectedContentEvent);
+  doc.addEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent);
+  doc.defaultView.addEventListener("StyleSheetAdded", unexpectedContentEvent);
+  doc.defaultView.addEventListener("StyleSheetRemoved", unexpectedContentEvent);
+  doc.defaultView.addEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent);
 
-function initialStylesheetAdded(evt) {
-  gBrowser.removeEventListener("StyleSheetAdded", initialStylesheetAdded, true);
-  ok(true, "received initial style sheet event");
+  let link = doc.createElement("link");
+  link.setAttribute("rel", "stylesheet");
+  link.setAttribute("type", "text/css");
+  link.setAttribute("href", testRoot + gStyleSheet);
+
+  let sheetAdded =
+    ContentTaskUtils.waitForEvent(this, "StyleSheetAdded", true);
+  let stateChanged =
+    ContentTaskUtils.waitForEvent(this, "StyleSheetApplicableStateChanged", true);
+  doc.body.appendChild(link);
+
+  let evt = yield sheetAdded;
+  info("received dynamic style sheet event");
   is(evt.type, "StyleSheetAdded", "evt.type has expected value");
-  is(evt.target, gBrowser.contentDocument, "event targets correct document");
+  is(evt.target, doc, "event targets correct document");
   ok(evt.stylesheet, "evt.stylesheet is defined");
   ok(evt.stylesheet.toString().includes("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
   ok(evt.documentSheet, "style sheet is a document sheet");
-}
 
-function tabLoad(evt) {
-  gTab.linkedBrowser.removeEventListener(evt.type, tabLoad, true);
-  executeSoon(continueTest);
-}
-
-var gLinkElement = null;
-
-function unexpectedContentEvent(evt) {
-  ok(false, "Received a " + evt.type + " event on content");
-}
-
-// We've seen the original stylesheet in the document.
-// Now add a stylesheet on the fly and make sure we see it.
-function continueTest() {
-  info("continuing test");
-
-  let doc = gBrowser.contentDocument;
-  doc.styleSheetChangeEventsEnabled = true;
-  doc.addEventListener("StyleSheetAdded", unexpectedContentEvent, false);
-  doc.addEventListener("StyleSheetRemoved", unexpectedContentEvent, false);
-  doc.addEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent, false);
-  doc.defaultView.addEventListener("StyleSheetAdded", unexpectedContentEvent, false);
-  doc.defaultView.addEventListener("StyleSheetRemoved", unexpectedContentEvent, false);
-  doc.defaultView.addEventListener("StyleSheetApplicableStateChanged", unexpectedContentEvent, false);
-  let link = doc.createElement('link');
-  link.setAttribute('rel', 'stylesheet');
-  link.setAttribute('type', 'text/css');
-  link.setAttribute('href', gTestRoot + gStyleSheet);
-  gLinkElement = link;
-
-  gBrowser.addEventListener("StyleSheetAdded", dynamicStylesheetAdded, true);
-  gBrowser.addEventListener("StyleSheetApplicableStateChanged", dynamicStylesheetApplicableStateChanged, true);
-  doc.body.appendChild(link);
-}
-
-function dynamicStylesheetAdded(evt) {
-  gBrowser.removeEventListener("StyleSheetAdded", dynamicStylesheetAdded, true);
-  ok(true, "received dynamic style sheet event");
-  is(evt.type, "StyleSheetAdded", "evt.type has expected value");
-  is(evt.target, gBrowser.contentDocument, "event targets correct document");
-  ok(evt.stylesheet, "evt.stylesheet is defined");
-  ok(evt.stylesheet.toString().includes("CSSStyleSheet"), "evt.stylesheet is a stylesheet");
-  ok(evt.documentSheet, "style sheet is a document sheet");
-}
-
-function dynamicStylesheetApplicableStateChanged(evt) {
-  gBrowser.removeEventListener("StyleSheetApplicableStateChanged", dynamicStylesheetApplicableStateChanged, true);
-  ok(true, "received dynamic style sheet applicable state change event");
+  evt = yield stateChanged;
+  info("received dynamic style sheet applicable state change event");
   is(evt.type, "StyleSheetApplicableStateChanged", "evt.type has expected value");
-  is(evt.target, gBrowser.contentDocument, "event targets correct document");
-  is(evt.stylesheet, gLinkElement.sheet, "evt.stylesheet has the right value");
+  is(evt.target, doc, "event targets correct document");
+  is(evt.stylesheet, link.sheet, "evt.stylesheet has the right value");
   is(evt.applicable, true, "evt.applicable has the right value");
 
-  gBrowser.addEventListener("StyleSheetApplicableStateChanged", d