Merge m-c to graphics
authorRyan Hunt <rhunt@eqrion.net>
Fri, 13 Jan 2017 10:14:22 -0600
changeset 342138 6cdd4bd2998db6ff874ead4bd8889a04d47a5a0a
parent 342137 2dad5748892eea01c320091ec83f274c0a3c9eb3 (current diff)
parent 329371 de67fccc4c64a49f261aea29141357b94c7b3b9c (diff)
child 342139 6699d31aaa453aca5abd0e48844bda5628c7cf09
push id86826
push userkwierso@gmail.com
push dateFri, 10 Feb 2017 23:33:17 +0000
treeherdermozilla-inbound@2c7816419218 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge m-c to graphics
CLOBBER
browser/components/extensions/test/browser/browser-common.ini
browser/extensions/pocket/content/panels/img/signup_or@1x.png
browser/extensions/pocket/content/panels/img/signup_or@2x.png
browser/installer/allowed-dupes.mn
browser/installer/package-manifest.in
browser/themes/shared/icon.png
browser/themes/shared/newtab/whimsycorn.png
browser/themes/shared/social/gear_clicked.png
browser/themes/shared/social/gear_default.png
browser/themes/shared/theme-switcher-icon.png
browser/themes/shared/theme-switcher-icon@2x.png
browser/themes/windows/keyhole-forward-mask.svg
devtools/client/themes/images/breadcrumbs-divider@2x.png
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
dom/ipc/TabChild.cpp
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_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_callback.js
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
embedding/browser/build/moz.build
embedding/browser/build/nsWebBrowserModule.cpp
embedding/browser/moz.build
embedding/browser/nsCTooltipTextProvider.h
embedding/browser/nsCWebBrowser.idl
embedding/browser/nsCommandHandler.cpp
embedding/browser/nsCommandHandler.h
embedding/browser/nsContextMenuInfo.cpp
embedding/browser/nsContextMenuInfo.h
embedding/browser/nsDocShellTreeOwner.cpp
embedding/browser/nsDocShellTreeOwner.h
embedding/browser/nsEmbedStream.cpp
embedding/browser/nsEmbedStream.h
embedding/browser/nsICommandHandler.idl
embedding/browser/nsIContextMenuListener.idl
embedding/browser/nsIContextMenuListener2.idl
embedding/browser/nsIEmbeddingSiteWindow.idl
embedding/browser/nsIPrintPreviewNavigation.idl
embedding/browser/nsIPrintingPromptService.idl
embedding/browser/nsITooltipListener.idl
embedding/browser/nsITooltipTextProvider.idl
embedding/browser/nsIWebBrowser.idl
embedding/browser/nsIWebBrowserChrome.idl
embedding/browser/nsIWebBrowserChrome2.idl
embedding/browser/nsIWebBrowserChrome3.idl
embedding/browser/nsIWebBrowserChromeFocus.idl
embedding/browser/nsIWebBrowserFocus.idl
embedding/browser/nsIWebBrowserPrint.idl
embedding/browser/nsIWebBrowserSetup.idl
embedding/browser/nsIWebBrowserStream.idl
embedding/browser/nsWebBrowser.cpp
embedding/browser/nsWebBrowser.h
embedding/browser/nsWebBrowserContentPolicy.cpp
embedding/browser/nsWebBrowserContentPolicy.h
embedding/components/appstartup/moz.build
embedding/components/appstartup/nsAppStartupNotifier.cpp
embedding/components/appstartup/nsAppStartupNotifier.h
embedding/components/appstartup/nsIAppStartupNotifier.h
embedding/components/build/moz.build
embedding/components/build/nsEmbeddingModule.cpp
embedding/components/commandhandler/moz.build
embedding/components/commandhandler/nsBaseCommandController.cpp
embedding/components/commandhandler/nsBaseCommandController.h
embedding/components/commandhandler/nsCommandGroup.cpp
embedding/components/commandhandler/nsCommandGroup.h
embedding/components/commandhandler/nsCommandManager.cpp
embedding/components/commandhandler/nsCommandManager.h
embedding/components/commandhandler/nsCommandParams.cpp
embedding/components/commandhandler/nsCommandParams.h
embedding/components/commandhandler/nsControllerCommandTable.cpp
embedding/components/commandhandler/nsControllerCommandTable.h
embedding/components/commandhandler/nsICommandManager.idl
embedding/components/commandhandler/nsICommandParams.idl
embedding/components/commandhandler/nsIControllerCommand.idl
embedding/components/commandhandler/nsIControllerCommandTable.idl
embedding/components/commandhandler/nsIControllerContext.idl
embedding/components/commandhandler/nsPICommandUpdater.idl
embedding/components/find/moz.build
embedding/components/find/nsFind.cpp
embedding/components/find/nsFind.h
embedding/components/find/nsIFind.idl
embedding/components/find/nsIWebBrowserFind.idl
embedding/components/find/nsWebBrowserFind.cpp
embedding/components/find/nsWebBrowserFind.h
embedding/components/moz.build
embedding/components/printingui/ipc/PPrintProgressDialog.ipdl
embedding/components/printingui/ipc/PPrintSettingsDialog.ipdl
embedding/components/printingui/ipc/PPrinting.ipdl
embedding/components/printingui/ipc/PPrintingTypes.ipdlh
embedding/components/printingui/ipc/PrintDataUtils.cpp
embedding/components/printingui/ipc/PrintDataUtils.h
embedding/components/printingui/ipc/PrintProgressDialogChild.cpp
embedding/components/printingui/ipc/PrintProgressDialogChild.h
embedding/components/printingui/ipc/PrintProgressDialogParent.cpp
embedding/components/printingui/ipc/PrintProgressDialogParent.h
embedding/components/printingui/ipc/PrintSettingsDialogChild.cpp
embedding/components/printingui/ipc/PrintSettingsDialogChild.h
embedding/components/printingui/ipc/PrintSettingsDialogParent.cpp
embedding/components/printingui/ipc/PrintSettingsDialogParent.h
embedding/components/printingui/ipc/PrintingParent.cpp
embedding/components/printingui/ipc/PrintingParent.h
embedding/components/printingui/ipc/moz.build
embedding/components/printingui/ipc/nsPrintingProxy.cpp
embedding/components/printingui/ipc/nsPrintingProxy.h
embedding/components/printingui/mac/moz.build
embedding/components/printingui/mac/nsPrintProgress.cpp
embedding/components/printingui/mac/nsPrintProgress.h
embedding/components/printingui/mac/nsPrintProgressParams.cpp
embedding/components/printingui/mac/nsPrintProgressParams.h
embedding/components/printingui/mac/nsPrintingPromptService.h
embedding/components/printingui/mac/nsPrintingPromptServiceX.mm
embedding/components/printingui/moz.build
embedding/components/printingui/unixshared/moz.build
embedding/components/printingui/unixshared/nsPrintProgress.cpp
embedding/components/printingui/unixshared/nsPrintProgress.h
embedding/components/printingui/unixshared/nsPrintProgressParams.cpp
embedding/components/printingui/unixshared/nsPrintProgressParams.h
embedding/components/printingui/unixshared/nsPrintingPromptService.cpp
embedding/components/printingui/unixshared/nsPrintingPromptService.h
embedding/components/printingui/win/moz.build
embedding/components/printingui/win/nsPrintDialogUtil.cpp
embedding/components/printingui/win/nsPrintDialogUtil.h
embedding/components/printingui/win/nsPrintProgress.cpp
embedding/components/printingui/win/nsPrintProgress.h
embedding/components/printingui/win/nsPrintProgressParams.cpp
embedding/components/printingui/win/nsPrintProgressParams.h
embedding/components/printingui/win/nsPrintingPromptService.cpp
embedding/components/printingui/win/nsPrintingPromptService.h
embedding/components/webbrowserpersist/PWebBrowserPersistDocument.ipdl
embedding/components/webbrowserpersist/PWebBrowserPersistResources.ipdl
embedding/components/webbrowserpersist/PWebBrowserPersistSerialize.ipdl
embedding/components/webbrowserpersist/WebBrowserPersistDocumentChild.cpp
embedding/components/webbrowserpersist/WebBrowserPersistDocumentChild.h
embedding/components/webbrowserpersist/WebBrowserPersistDocumentParent.cpp
embedding/components/webbrowserpersist/WebBrowserPersistDocumentParent.h
embedding/components/webbrowserpersist/WebBrowserPersistLocalDocument.cpp
embedding/components/webbrowserpersist/WebBrowserPersistLocalDocument.h
embedding/components/webbrowserpersist/WebBrowserPersistRemoteDocument.cpp
embedding/components/webbrowserpersist/WebBrowserPersistRemoteDocument.h
embedding/components/webbrowserpersist/WebBrowserPersistResourcesChild.cpp
embedding/components/webbrowserpersist/WebBrowserPersistResourcesChild.h
embedding/components/webbrowserpersist/WebBrowserPersistResourcesParent.cpp
embedding/components/webbrowserpersist/WebBrowserPersistResourcesParent.h
embedding/components/webbrowserpersist/WebBrowserPersistSerializeChild.cpp
embedding/components/webbrowserpersist/WebBrowserPersistSerializeChild.h
embedding/components/webbrowserpersist/WebBrowserPersistSerializeParent.cpp
embedding/components/webbrowserpersist/WebBrowserPersistSerializeParent.h
embedding/components/webbrowserpersist/moz.build
embedding/components/webbrowserpersist/nsCWebBrowserPersist.idl
embedding/components/webbrowserpersist/nsIWebBrowserPersist.idl
embedding/components/webbrowserpersist/nsIWebBrowserPersistDocument.idl
embedding/components/webbrowserpersist/nsIWebBrowserPersistable.idl
embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
embedding/components/webbrowserpersist/nsWebBrowserPersist.h
embedding/components/windowwatcher/moz.build
embedding/components/windowwatcher/nsAutoWindowStateHelper.cpp
embedding/components/windowwatcher/nsAutoWindowStateHelper.h
embedding/components/windowwatcher/nsDialogParamBlock.cpp
embedding/components/windowwatcher/nsDialogParamBlock.h
embedding/components/windowwatcher/nsIDialogParamBlock.idl
embedding/components/windowwatcher/nsIPromptFactory.idl
embedding/components/windowwatcher/nsIPromptService.idl
embedding/components/windowwatcher/nsIPromptService2.idl
embedding/components/windowwatcher/nsIWindowWatcher.idl
embedding/components/windowwatcher/nsPIPromptService.idl
embedding/components/windowwatcher/nsPIWindowWatcher.idl
embedding/components/windowwatcher/nsPromptUtils.h
embedding/components/windowwatcher/nsWindowWatcher.cpp
embedding/components/windowwatcher/nsWindowWatcher.h
embedding/components/windowwatcher/test/browser.ini
embedding/components/windowwatcher/test/browser_new_content_window_chromeflags.js
embedding/components/windowwatcher/test/browser_new_content_window_from_chrome_principal.js
embedding/components/windowwatcher/test/browser_new_remote_window_flags.js
embedding/components/windowwatcher/test/browser_new_sized_window.js
embedding/components/windowwatcher/test/chrome.ini
embedding/components/windowwatcher/test/file_storage_copied.html
embedding/components/windowwatcher/test/file_test_dialog.html
embedding/components/windowwatcher/test/mochitest.ini
embedding/components/windowwatcher/test/moz.build
embedding/components/windowwatcher/test/test_blank_named_window.html
embedding/components/windowwatcher/test/test_dialog_arguments.html
embedding/components/windowwatcher/test/test_modal_windows.html
embedding/components/windowwatcher/test/test_named_window.html
embedding/components/windowwatcher/test/test_storage_copied.html
embedding/moz.build
embedding/nsEmbedCID.h
embedding/nsIWindowCreator.idl
embedding/nsIWindowCreator2.idl
embedding/nsIWindowProvider.idl
embedding/test/320x240.ogv
embedding/test/browser.ini
embedding/test/browser_bug1204626.js
embedding/test/bug1170334_iframe.xml
embedding/test/bug1170334_style.css
embedding/test/bug1204626_doc0.html
embedding/test/bug1204626_doc1.html
embedding/test/bug293834_form.html
embedding/test/bug449141_page.html
embedding/test/chrome.ini
embedding/test/mochitest.ini
embedding/test/moz.build
embedding/test/test_bug1170334_wbp_xmlstyle.html
embedding/test/test_bug1192654.html
embedding/test/test_bug293834.html
embedding/test/test_bug449141.html
embedding/test/test_bug499115.html
embedding/test/test_nsFind.html
embedding/test/test_private_window_from_content.html
embedding/test/test_window_open_position_constraint.html
embedding/test/test_window_open_units.html
embedding/tests/unit/test_wwauthpromptfactory.js
embedding/tests/unit/test_wwpromptfactory.js
embedding/tests/unit/xpcshell.ini
gfx/layers/ipc/CompositorBridgeChild.cpp
gfx/layers/ipc/CompositorBridgeChild.h
gfx/layers/ipc/CompositorBridgeParent.cpp
gfx/layers/ipc/CompositorBridgeParent.h
gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp
gfx/layers/ipc/CrossProcessCompositorBridgeParent.h
gfx/layers/ipc/PCompositorBridge.ipdl
layout/base/nsLayoutUtils.cpp
layout/reftests/svg/reftest.list
media/libvpx/LICENSE
media/libvpx/PATENTS
media/libvpx/build/make/ads2gas.pl
media/libvpx/build/make/thumb.pm
media/libvpx/disable_pthread_on_mingw.patch
media/libvpx/third_party/x86inc/x86inc.asm
media/libvpx/vp8/common/alloccommon.c
media/libvpx/vp8/common/alloccommon.h
media/libvpx/vp8/common/arm/armv6/bilinearfilter_v6.asm
media/libvpx/vp8/common/arm/armv6/copymem16x16_v6.asm
media/libvpx/vp8/common/arm/armv6/copymem8x4_v6.asm
media/libvpx/vp8/common/arm/armv6/copymem8x8_v6.asm
media/libvpx/vp8/common/arm/armv6/dc_only_idct_add_v6.asm
media/libvpx/vp8/common/arm/armv6/dequant_idct_v6.asm
media/libvpx/vp8/common/arm/armv6/dequantize_v6.asm
media/libvpx/vp8/common/arm/armv6/filter_v6.asm
media/libvpx/vp8/common/arm/armv6/idct_blk_v6.c
media/libvpx/vp8/common/arm/armv6/idct_v6.asm
media/libvpx/vp8/common/arm/armv6/intra4x4_predict_v6.asm
media/libvpx/vp8/common/arm/armv6/iwalsh_v6.asm
media/libvpx/vp8/common/arm/armv6/loopfilter_v6.asm
media/libvpx/vp8/common/arm/armv6/simpleloopfilter_v6.asm
media/libvpx/vp8/common/arm/armv6/sixtappredict8x4_v6.asm
media/libvpx/vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_h_armv6.asm
media/libvpx/vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_hv_armv6.asm
media/libvpx/vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_v_armv6.asm
media/libvpx/vp8/common/arm/bilinearfilter_arm.c
media/libvpx/vp8/common/arm/bilinearfilter_arm.h
media/libvpx/vp8/common/arm/dequantize_arm.c
media/libvpx/vp8/common/arm/filter_arm.c
media/libvpx/vp8/common/arm/loopfilter_arm.c
media/libvpx/vp8/common/arm/neon/bilinearpredict_neon.c
media/libvpx/vp8/common/arm/neon/copymem_neon.c
media/libvpx/vp8/common/arm/neon/dc_only_idct_add_neon.c
media/libvpx/vp8/common/arm/neon/dequant_idct_neon.c
media/libvpx/vp8/common/arm/neon/dequantizeb_neon.c
media/libvpx/vp8/common/arm/neon/idct_blk_neon.c
media/libvpx/vp8/common/arm/neon/idct_dequant_0_2x_neon.c
media/libvpx/vp8/common/arm/neon/idct_dequant_full_2x_neon.c
media/libvpx/vp8/common/arm/neon/iwalsh_neon.c
media/libvpx/vp8/common/arm/neon/loopfilter_neon.c
media/libvpx/vp8/common/arm/neon/loopfiltersimplehorizontaledge_neon.c
media/libvpx/vp8/common/arm/neon/loopfiltersimpleverticaledge_neon.c
media/libvpx/vp8/common/arm/neon/mbloopfilter_neon.c
media/libvpx/vp8/common/arm/neon/reconintra_neon.c
media/libvpx/vp8/common/arm/neon/shortidct4x4llm_neon.c
media/libvpx/vp8/common/arm/neon/sixtappredict_neon.c
media/libvpx/vp8/common/arm/neon/vp8_subpixelvariance_neon.c
media/libvpx/vp8/common/arm/variance_arm.c
media/libvpx/vp8/common/blockd.c
media/libvpx/vp8/common/blockd.h
media/libvpx/vp8/common/coefupdateprobs.h
media/libvpx/vp8/common/common.h
media/libvpx/vp8/common/copy_c.c
media/libvpx/vp8/common/debugmodes.c
media/libvpx/vp8/common/default_coef_probs.h
media/libvpx/vp8/common/dequantize.c
media/libvpx/vp8/common/entropy.c
media/libvpx/vp8/common/entropy.h
media/libvpx/vp8/common/entropymode.c
media/libvpx/vp8/common/entropymode.h
media/libvpx/vp8/common/entropymv.c
media/libvpx/vp8/common/entropymv.h
media/libvpx/vp8/common/extend.c
media/libvpx/vp8/common/extend.h
media/libvpx/vp8/common/filter.c
media/libvpx/vp8/common/filter.h
media/libvpx/vp8/common/findnearmv.c
media/libvpx/vp8/common/findnearmv.h
media/libvpx/vp8/common/generic/systemdependent.c
media/libvpx/vp8/common/header.h
media/libvpx/vp8/common/idct_blk.c
media/libvpx/vp8/common/idctllm.c
media/libvpx/vp8/common/invtrans.h
media/libvpx/vp8/common/loopfilter.c
media/libvpx/vp8/common/loopfilter.h
media/libvpx/vp8/common/loopfilter_filters.c
media/libvpx/vp8/common/mbpitch.c
media/libvpx/vp8/common/mfqe.c
media/libvpx/vp8/common/modecont.c
media/libvpx/vp8/common/modecont.h
media/libvpx/vp8/common/mv.h
media/libvpx/vp8/common/onyx.h
media/libvpx/vp8/common/onyxc_int.h
media/libvpx/vp8/common/onyxd.h
media/libvpx/vp8/common/postproc.c
media/libvpx/vp8/common/postproc.h
media/libvpx/vp8/common/ppflags.h
media/libvpx/vp8/common/quant_common.c
media/libvpx/vp8/common/quant_common.h
media/libvpx/vp8/common/reconinter.c
media/libvpx/vp8/common/reconinter.h
media/libvpx/vp8/common/reconintra.c
media/libvpx/vp8/common/reconintra4x4.c
media/libvpx/vp8/common/reconintra4x4.h
media/libvpx/vp8/common/rtcd.c
media/libvpx/vp8/common/setupintrarecon.c
media/libvpx/vp8/common/setupintrarecon.h
media/libvpx/vp8/common/swapyv12buffer.c
media/libvpx/vp8/common/swapyv12buffer.h
media/libvpx/vp8/common/systemdependent.h
media/libvpx/vp8/common/threading.h
media/libvpx/vp8/common/treecoder.c
media/libvpx/vp8/common/treecoder.h
media/libvpx/vp8/common/variance.h
media/libvpx/vp8/common/variance_c.c
media/libvpx/vp8/common/vp8_entropymodedata.h
media/libvpx/vp8/common/x86/copy_sse2.asm
media/libvpx/vp8/common/x86/copy_sse3.asm
media/libvpx/vp8/common/x86/dequantize_mmx.asm
media/libvpx/vp8/common/x86/filter_x86.c
media/libvpx/vp8/common/x86/filter_x86.h
media/libvpx/vp8/common/x86/idct_blk_mmx.c
media/libvpx/vp8/common/x86/idct_blk_sse2.c
media/libvpx/vp8/common/x86/idctllm_mmx.asm
media/libvpx/vp8/common/x86/idctllm_sse2.asm
media/libvpx/vp8/common/x86/iwalsh_mmx.asm
media/libvpx/vp8/common/x86/iwalsh_sse2.asm
media/libvpx/vp8/common/x86/loopfilter_block_sse2_x86_64.asm
media/libvpx/vp8/common/x86/loopfilter_mmx.asm
media/libvpx/vp8/common/x86/loopfilter_sse2.asm
media/libvpx/vp8/common/x86/loopfilter_x86.c
media/libvpx/vp8/common/x86/mfqe_sse2.asm
media/libvpx/vp8/common/x86/postproc_mmx.asm
media/libvpx/vp8/common/x86/postproc_sse2.asm
media/libvpx/vp8/common/x86/recon_mmx.asm
media/libvpx/vp8/common/x86/recon_sse2.asm
media/libvpx/vp8/common/x86/recon_wrapper_sse2.c
media/libvpx/vp8/common/x86/subpixel_mmx.asm
media/libvpx/vp8/common/x86/subpixel_sse2.asm
media/libvpx/vp8/common/x86/subpixel_ssse3.asm
media/libvpx/vp8/common/x86/variance_impl_sse2.asm
media/libvpx/vp8/common/x86/variance_impl_ssse3.asm
media/libvpx/vp8/common/x86/variance_ssse3.c
media/libvpx/vp8/common/x86/vp8_asm_stubs.c
media/libvpx/vp8/common/x86/vp8_variance_impl_mmx.asm
media/libvpx/vp8/common/x86/vp8_variance_mmx.c
media/libvpx/vp8/common/x86/vp8_variance_sse2.c
media/libvpx/vp8/decoder/dboolhuff.c
media/libvpx/vp8/decoder/dboolhuff.h
media/libvpx/vp8/decoder/decodeframe.c
media/libvpx/vp8/decoder/decodemv.c
media/libvpx/vp8/decoder/decodemv.h
media/libvpx/vp8/decoder/decoderthreading.h
media/libvpx/vp8/decoder/detokenize.c
media/libvpx/vp8/decoder/detokenize.h
media/libvpx/vp8/decoder/ec_types.h
media/libvpx/vp8/decoder/error_concealment.c
media/libvpx/vp8/decoder/error_concealment.h
media/libvpx/vp8/decoder/onyxd_if.c
media/libvpx/vp8/decoder/onyxd_int.h
media/libvpx/vp8/decoder/threading.c
media/libvpx/vp8/decoder/treereader.h
media/libvpx/vp8/encoder/arm/armv6/vp8_short_fdct4x4_armv6.asm
media/libvpx/vp8/encoder/arm/armv6/walsh_v6.asm
media/libvpx/vp8/encoder/arm/dct_arm.c
media/libvpx/vp8/encoder/arm/neon/denoising_neon.c
media/libvpx/vp8/encoder/arm/neon/fastquantizeb_neon.c
media/libvpx/vp8/encoder/arm/neon/shortfdct_neon.c
media/libvpx/vp8/encoder/arm/neon/subtract_neon.c
media/libvpx/vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon.c
media/libvpx/vp8/encoder/bitstream.c
media/libvpx/vp8/encoder/bitstream.h
media/libvpx/vp8/encoder/block.h
media/libvpx/vp8/encoder/boolhuff.c
media/libvpx/vp8/encoder/boolhuff.h
media/libvpx/vp8/encoder/dct.c
media/libvpx/vp8/encoder/dct_value_cost.h
media/libvpx/vp8/encoder/dct_value_tokens.h
media/libvpx/vp8/encoder/defaultcoefcounts.h
media/libvpx/vp8/encoder/denoising.c
media/libvpx/vp8/encoder/denoising.h
media/libvpx/vp8/encoder/encodeframe.c
media/libvpx/vp8/encoder/encodeframe.h
media/libvpx/vp8/encoder/encodeintra.c
media/libvpx/vp8/encoder/encodeintra.h
media/libvpx/vp8/encoder/encodemb.c
media/libvpx/vp8/encoder/encodemb.h
media/libvpx/vp8/encoder/encodemv.c
media/libvpx/vp8/encoder/encodemv.h
media/libvpx/vp8/encoder/ethreading.c
media/libvpx/vp8/encoder/firstpass.c
media/libvpx/vp8/encoder/firstpass.h
media/libvpx/vp8/encoder/lookahead.c
media/libvpx/vp8/encoder/lookahead.h
media/libvpx/vp8/encoder/mcomp.c
media/libvpx/vp8/encoder/mcomp.h
media/libvpx/vp8/encoder/modecosts.c
media/libvpx/vp8/encoder/modecosts.h
media/libvpx/vp8/encoder/mr_dissim.c
media/libvpx/vp8/encoder/mr_dissim.h
media/libvpx/vp8/encoder/onyx_if.c
media/libvpx/vp8/encoder/onyx_int.h
media/libvpx/vp8/encoder/pickinter.c
media/libvpx/vp8/encoder/pickinter.h
media/libvpx/vp8/encoder/picklpf.c
media/libvpx/vp8/encoder/quantize.c
media/libvpx/vp8/encoder/quantize.h
media/libvpx/vp8/encoder/ratectrl.c
media/libvpx/vp8/encoder/ratectrl.h
media/libvpx/vp8/encoder/rdopt.c
media/libvpx/vp8/encoder/rdopt.h
media/libvpx/vp8/encoder/segmentation.c
media/libvpx/vp8/encoder/segmentation.h
media/libvpx/vp8/encoder/temporal_filter.c
media/libvpx/vp8/encoder/tokenize.c
media/libvpx/vp8/encoder/tokenize.h
media/libvpx/vp8/encoder/treewriter.c
media/libvpx/vp8/encoder/treewriter.h
media/libvpx/vp8/encoder/x86/dct_mmx.asm
media/libvpx/vp8/encoder/x86/dct_sse2.asm
media/libvpx/vp8/encoder/x86/denoising_sse2.c
media/libvpx/vp8/encoder/x86/encodeopt.asm
media/libvpx/vp8/encoder/x86/fwalsh_sse2.asm
media/libvpx/vp8/encoder/x86/quantize_mmx.asm
media/libvpx/vp8/encoder/x86/quantize_sse2.c
media/libvpx/vp8/encoder/x86/quantize_sse4.c
media/libvpx/vp8/encoder/x86/quantize_ssse3.c
media/libvpx/vp8/encoder/x86/ssim_opt_x86_64.asm
media/libvpx/vp8/encoder/x86/subtract_mmx.asm
media/libvpx/vp8/encoder/x86/subtract_sse2.asm
media/libvpx/vp8/encoder/x86/temporal_filter_apply_sse2.asm
media/libvpx/vp8/encoder/x86/vp8_enc_stubs_mmx.c
media/libvpx/vp8/encoder/x86/vp8_enc_stubs_sse2.c
media/libvpx/vp8/vp8_cx_iface.c
media/libvpx/vp8/vp8_dx_iface.c
media/libvpx/vp8_rtcd.h
media/libvpx/vp8_rtcd_armv7-android-gcc.h
media/libvpx/vp8_rtcd_generic-gnu.h
media/libvpx/vp8_rtcd_x86-darwin9-gcc.h
media/libvpx/vp8_rtcd_x86-linux-gcc.h
media/libvpx/vp8_rtcd_x86-win32-gcc.h
media/libvpx/vp8_rtcd_x86-win32-vs12.h
media/libvpx/vp8_rtcd_x86_64-darwin9-gcc.h
media/libvpx/vp8_rtcd_x86_64-linux-gcc.h
media/libvpx/vp8_rtcd_x86_64-win64-gcc.h
media/libvpx/vp8_rtcd_x86_64-win64-vs12.h
media/libvpx/vp9/common/arm/neon/vp9_convolve8_avg_neon.c
media/libvpx/vp9/common/arm/neon/vp9_convolve8_avg_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_convolve8_neon.c
media/libvpx/vp9/common/arm/neon/vp9_convolve8_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_convolve_avg_neon.c
media/libvpx/vp9/common/arm/neon/vp9_convolve_avg_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_convolve_neon.c
media/libvpx/vp9/common/arm/neon/vp9_copy_neon.c
media/libvpx/vp9/common/arm/neon/vp9_copy_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_idct16x16_1_add_neon.c
media/libvpx/vp9/common/arm/neon/vp9_idct16x16_1_add_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_idct16x16_add_neon.c
media/libvpx/vp9/common/arm/neon/vp9_idct16x16_add_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_idct16x16_neon.c
media/libvpx/vp9/common/arm/neon/vp9_idct32x32_1_add_neon.c
media/libvpx/vp9/common/arm/neon/vp9_idct32x32_1_add_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_idct32x32_add_neon.c
media/libvpx/vp9/common/arm/neon/vp9_idct32x32_add_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_idct4x4_1_add_neon.c
media/libvpx/vp9/common/arm/neon/vp9_idct4x4_1_add_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_idct4x4_add_neon.c
media/libvpx/vp9/common/arm/neon/vp9_idct4x4_add_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_idct8x8_1_add_neon.c
media/libvpx/vp9/common/arm/neon/vp9_idct8x8_1_add_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_idct8x8_add_neon.c
media/libvpx/vp9/common/arm/neon/vp9_idct8x8_add_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_iht4x4_add_neon.c
media/libvpx/vp9/common/arm/neon/vp9_iht8x8_add_neon.c
media/libvpx/vp9/common/arm/neon/vp9_loopfilter_16_neon.c
media/libvpx/vp9/common/arm/neon/vp9_loopfilter_16_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_loopfilter_4_neon.c
media/libvpx/vp9/common/arm/neon/vp9_loopfilter_4_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_loopfilter_8_neon.c
media/libvpx/vp9/common/arm/neon/vp9_loopfilter_8_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_loopfilter_neon.c
media/libvpx/vp9/common/arm/neon/vp9_mb_lpf_neon.asm
media/libvpx/vp9/common/arm/neon/vp9_reconintra_neon.c
media/libvpx/vp9/common/arm/neon/vp9_reconintra_neon_asm.asm
media/libvpx/vp9/common/arm/neon/vp9_save_reg_neon.asm
media/libvpx/vp9/common/vp9_alloccommon.c
media/libvpx/vp9/common/vp9_alloccommon.h
media/libvpx/vp9/common/vp9_blockd.c
media/libvpx/vp9/common/vp9_blockd.h
media/libvpx/vp9/common/vp9_common.h
media/libvpx/vp9/common/vp9_common_data.c
media/libvpx/vp9/common/vp9_common_data.h
media/libvpx/vp9/common/vp9_convolve.c
media/libvpx/vp9/common/vp9_convolve.h
media/libvpx/vp9/common/vp9_debugmodes.c
media/libvpx/vp9/common/vp9_entropy.c
media/libvpx/vp9/common/vp9_entropy.h
media/libvpx/vp9/common/vp9_entropymode.c
media/libvpx/vp9/common/vp9_entropymode.h
media/libvpx/vp9/common/vp9_entropymv.c
media/libvpx/vp9/common/vp9_entropymv.h
media/libvpx/vp9/common/vp9_enums.h
media/libvpx/vp9/common/vp9_filter.c
media/libvpx/vp9/common/vp9_filter.h
media/libvpx/vp9/common/vp9_frame_buffers.c
media/libvpx/vp9/common/vp9_frame_buffers.h
media/libvpx/vp9/common/vp9_idct.c
media/libvpx/vp9/common/vp9_idct.h
media/libvpx/vp9/common/vp9_loopfilter.c
media/libvpx/vp9/common/vp9_loopfilter.h
media/libvpx/vp9/common/vp9_loopfilter_filters.c
media/libvpx/vp9/common/vp9_mfqe.c
media/libvpx/vp9/common/vp9_mfqe.h
media/libvpx/vp9/common/vp9_mv.h
media/libvpx/vp9/common/vp9_mvref_common.c
media/libvpx/vp9/common/vp9_mvref_common.h
media/libvpx/vp9/common/vp9_onyxc_int.h
media/libvpx/vp9/common/vp9_postproc.c
media/libvpx/vp9/common/vp9_postproc.h
media/libvpx/vp9/common/vp9_ppflags.h
media/libvpx/vp9/common/vp9_pred_common.c
media/libvpx/vp9/common/vp9_pred_common.h
media/libvpx/vp9/common/vp9_prob.c
media/libvpx/vp9/common/vp9_prob.h
media/libvpx/vp9/common/vp9_quant_common.c
media/libvpx/vp9/common/vp9_quant_common.h
media/libvpx/vp9/common/vp9_reconinter.c
media/libvpx/vp9/common/vp9_reconinter.h
media/libvpx/vp9/common/vp9_reconintra.c
media/libvpx/vp9/common/vp9_reconintra.h
media/libvpx/vp9/common/vp9_rtcd.c
media/libvpx/vp9/common/vp9_scale.c
media/libvpx/vp9/common/vp9_scale.h
media/libvpx/vp9/common/vp9_scan.c
media/libvpx/vp9/common/vp9_scan.h
media/libvpx/vp9/common/vp9_seg_common.c
media/libvpx/vp9/common/vp9_seg_common.h
media/libvpx/vp9/common/vp9_systemdependent.h
media/libvpx/vp9/common/vp9_thread.c
media/libvpx/vp9/common/vp9_thread.h
media/libvpx/vp9/common/vp9_thread_common.c
media/libvpx/vp9/common/vp9_thread_common.h
media/libvpx/vp9/common/vp9_tile_common.c
media/libvpx/vp9/common/vp9_tile_common.h
media/libvpx/vp9/common/x86/convolve.h
media/libvpx/vp9/common/x86/vp9_asm_stubs.c
media/libvpx/vp9/common/x86/vp9_copy_sse2.asm
media/libvpx/vp9/common/x86/vp9_high_intrapred_sse2.asm
media/libvpx/vp9/common/x86/vp9_high_loopfilter_intrin_sse2.c
media/libvpx/vp9/common/x86/vp9_high_subpixel_8t_sse2.asm
media/libvpx/vp9/common/x86/vp9_high_subpixel_bilinear_sse2.asm
media/libvpx/vp9/common/x86/vp9_idct_intrin_sse2.c
media/libvpx/vp9/common/x86/vp9_idct_intrin_sse2.h
media/libvpx/vp9/common/x86/vp9_idct_ssse3_x86_64.asm
media/libvpx/vp9/common/x86/vp9_intrapred_sse2.asm
media/libvpx/vp9/common/x86/vp9_intrapred_ssse3.asm
media/libvpx/vp9/common/x86/vp9_loopfilter_intrin_avx2.c
media/libvpx/vp9/common/x86/vp9_loopfilter_intrin_sse2.c
media/libvpx/vp9/common/x86/vp9_loopfilter_mmx.asm
media/libvpx/vp9/common/x86/vp9_mfqe_sse2.asm
media/libvpx/vp9/common/x86/vp9_postproc_sse2.asm
media/libvpx/vp9/common/x86/vp9_subpixel_8t_intrin_avx2.c
media/libvpx/vp9/common/x86/vp9_subpixel_8t_intrin_ssse3.c
media/libvpx/vp9/common/x86/vp9_subpixel_8t_sse2.asm
media/libvpx/vp9/common/x86/vp9_subpixel_8t_ssse3.asm
media/libvpx/vp9/common/x86/vp9_subpixel_bilinear_sse2.asm
media/libvpx/vp9/common/x86/vp9_subpixel_bilinear_ssse3.asm
media/libvpx/vp9/decoder/vp9_decodeframe.c
media/libvpx/vp9/decoder/vp9_decodeframe.h
media/libvpx/vp9/decoder/vp9_decodemv.c
media/libvpx/vp9/decoder/vp9_decodemv.h
media/libvpx/vp9/decoder/vp9_decoder.c
media/libvpx/vp9/decoder/vp9_decoder.h
media/libvpx/vp9/decoder/vp9_detokenize.c
media/libvpx/vp9/decoder/vp9_detokenize.h
media/libvpx/vp9/decoder/vp9_dsubexp.c
media/libvpx/vp9/decoder/vp9_dsubexp.h
media/libvpx/vp9/decoder/vp9_dthread.c
media/libvpx/vp9/decoder/vp9_dthread.h
media/libvpx/vp9/decoder/vp9_read_bit_buffer.c
media/libvpx/vp9/decoder/vp9_read_bit_buffer.h
media/libvpx/vp9/decoder/vp9_reader.c
media/libvpx/vp9/decoder/vp9_reader.h
media/libvpx/vp9/encoder/arm/neon/vp9_dct_neon.c
media/libvpx/vp9/encoder/arm/neon/vp9_quantize_neon.c
media/libvpx/vp9/encoder/arm/neon/vp9_subtract_neon.c
media/libvpx/vp9/encoder/arm/neon/vp9_variance_neon.c
media/libvpx/vp9/encoder/arm/neon/vp9enc_avg_neon.c
media/libvpx/vp9/encoder/vp9_aq_complexity.c
media/libvpx/vp9/encoder/vp9_aq_complexity.h
media/libvpx/vp9/encoder/vp9_aq_cyclicrefresh.c
media/libvpx/vp9/encoder/vp9_aq_cyclicrefresh.h
media/libvpx/vp9/encoder/vp9_aq_variance.c
media/libvpx/vp9/encoder/vp9_aq_variance.h
media/libvpx/vp9/encoder/vp9_avg.c
media/libvpx/vp9/encoder/vp9_bitstream.c
media/libvpx/vp9/encoder/vp9_bitstream.h
media/libvpx/vp9/encoder/vp9_block.h
media/libvpx/vp9/encoder/vp9_blockiness.c
media/libvpx/vp9/encoder/vp9_context_tree.c
media/libvpx/vp9/encoder/vp9_context_tree.h
media/libvpx/vp9/encoder/vp9_cost.c
media/libvpx/vp9/encoder/vp9_cost.h
media/libvpx/vp9/encoder/vp9_dct.c
media/libvpx/vp9/encoder/vp9_dct.h
media/libvpx/vp9/encoder/vp9_denoiser.c
media/libvpx/vp9/encoder/vp9_denoiser.h
media/libvpx/vp9/encoder/vp9_encodeframe.c
media/libvpx/vp9/encoder/vp9_encodeframe.h
media/libvpx/vp9/encoder/vp9_encodemb.c
media/libvpx/vp9/encoder/vp9_encodemb.h
media/libvpx/vp9/encoder/vp9_encodemv.c
media/libvpx/vp9/encoder/vp9_encodemv.h
media/libvpx/vp9/encoder/vp9_encoder.c
media/libvpx/vp9/encoder/vp9_encoder.h
media/libvpx/vp9/encoder/vp9_ethread.c
media/libvpx/vp9/encoder/vp9_ethread.h
media/libvpx/vp9/encoder/vp9_extend.c
media/libvpx/vp9/encoder/vp9_extend.h
media/libvpx/vp9/encoder/vp9_fastssim.c
media/libvpx/vp9/encoder/vp9_firstpass.c
media/libvpx/vp9/encoder/vp9_firstpass.h
media/libvpx/vp9/encoder/vp9_lookahead.c
media/libvpx/vp9/encoder/vp9_lookahead.h
media/libvpx/vp9/encoder/vp9_mbgraph.c
media/libvpx/vp9/encoder/vp9_mbgraph.h
media/libvpx/vp9/encoder/vp9_mcomp.c
media/libvpx/vp9/encoder/vp9_mcomp.h
media/libvpx/vp9/encoder/vp9_picklpf.c
media/libvpx/vp9/encoder/vp9_picklpf.h
media/libvpx/vp9/encoder/vp9_pickmode.c
media/libvpx/vp9/encoder/vp9_pickmode.h
media/libvpx/vp9/encoder/vp9_psnrhvs.c
media/libvpx/vp9/encoder/vp9_quantize.c
media/libvpx/vp9/encoder/vp9_quantize.h
media/libvpx/vp9/encoder/vp9_ratectrl.c
media/libvpx/vp9/encoder/vp9_ratectrl.h
media/libvpx/vp9/encoder/vp9_rd.c
media/libvpx/vp9/encoder/vp9_rd.h
media/libvpx/vp9/encoder/vp9_rdopt.c
media/libvpx/vp9/encoder/vp9_rdopt.h
media/libvpx/vp9/encoder/vp9_resize.c
media/libvpx/vp9/encoder/vp9_resize.h
media/libvpx/vp9/encoder/vp9_segmentation.c
media/libvpx/vp9/encoder/vp9_segmentation.h
media/libvpx/vp9/encoder/vp9_skin_detection.c
media/libvpx/vp9/encoder/vp9_skin_detection.h
media/libvpx/vp9/encoder/vp9_speed_features.c
media/libvpx/vp9/encoder/vp9_speed_features.h
media/libvpx/vp9/encoder/vp9_ssim.h
media/libvpx/vp9/encoder/vp9_subexp.c
media/libvpx/vp9/encoder/vp9_subexp.h
media/libvpx/vp9/encoder/vp9_svc_layercontext.c
media/libvpx/vp9/encoder/vp9_svc_layercontext.h
media/libvpx/vp9/encoder/vp9_temporal_filter.c
media/libvpx/vp9/encoder/vp9_temporal_filter.h
media/libvpx/vp9/encoder/vp9_tokenize.c
media/libvpx/vp9/encoder/vp9_tokenize.h
media/libvpx/vp9/encoder/vp9_treewriter.c
media/libvpx/vp9/encoder/vp9_treewriter.h
media/libvpx/vp9/encoder/vp9_variance.c
media/libvpx/vp9/encoder/vp9_variance.h
media/libvpx/vp9/encoder/vp9_write_bit_buffer.c
media/libvpx/vp9/encoder/vp9_write_bit_buffer.h
media/libvpx/vp9/encoder/vp9_writer.c
media/libvpx/vp9/encoder/vp9_writer.h
media/libvpx/vp9/encoder/x86/vp9_avg_intrin_sse2.c
media/libvpx/vp9/encoder/x86/vp9_dct32x32_avx2_impl.h
media/libvpx/vp9/encoder/x86/vp9_dct32x32_sse2_impl.h
media/libvpx/vp9/encoder/x86/vp9_dct_avx2.c
media/libvpx/vp9/encoder/x86/vp9_dct_mmx.asm
media/libvpx/vp9/encoder/x86/vp9_dct_sse2.c
media/libvpx/vp9/encoder/x86/vp9_dct_sse2.h
media/libvpx/vp9/encoder/x86/vp9_dct_sse2_impl.h
media/libvpx/vp9/encoder/x86/vp9_dct_ssse3.c
media/libvpx/vp9/encoder/x86/vp9_dct_ssse3_x86_64.asm
media/libvpx/vp9/encoder/x86/vp9_denoiser_sse2.c
media/libvpx/vp9/encoder/x86/vp9_error_intrin_avx2.c
media/libvpx/vp9/encoder/x86/vp9_error_sse2.asm
media/libvpx/vp9/encoder/x86/vp9_highbd_block_error_intrin_sse2.c
media/libvpx/vp9/encoder/x86/vp9_highbd_quantize_intrin_sse2.c
media/libvpx/vp9/encoder/x86/vp9_highbd_subpel_variance.asm
media/libvpx/vp9/encoder/x86/vp9_highbd_variance_sse2.c
media/libvpx/vp9/encoder/x86/vp9_quantize_sse2.c
media/libvpx/vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm
media/libvpx/vp9/encoder/x86/vp9_ssim_opt_x86_64.asm
media/libvpx/vp9/encoder/x86/vp9_subpel_variance.asm
media/libvpx/vp9/encoder/x86/vp9_subpel_variance_impl_intrin_avx2.c
media/libvpx/vp9/encoder/x86/vp9_subtract_sse2.asm
media/libvpx/vp9/encoder/x86/vp9_temporal_filter_apply_sse2.asm
media/libvpx/vp9/encoder/x86/vp9_variance_avx2.c
media/libvpx/vp9/encoder/x86/vp9_variance_sse2.c
media/libvpx/vp9/vp9_cx_iface.c
media/libvpx/vp9/vp9_dx_iface.c
media/libvpx/vp9/vp9_iface_common.h
media/libvpx/vp9_rtcd.h
media/libvpx/vp9_rtcd_armv7-android-gcc.h
media/libvpx/vp9_rtcd_generic-gnu.h
media/libvpx/vp9_rtcd_x86-darwin9-gcc.h
media/libvpx/vp9_rtcd_x86-linux-gcc.h
media/libvpx/vp9_rtcd_x86-win32-gcc.h
media/libvpx/vp9_rtcd_x86-win32-vs12.h
media/libvpx/vp9_rtcd_x86_64-darwin9-gcc.h
media/libvpx/vp9_rtcd_x86_64-linux-gcc.h
media/libvpx/vp9_rtcd_x86_64-win64-gcc.h
media/libvpx/vp9_rtcd_x86_64-win64-vs12.h
media/libvpx/vpx/internal/vpx_codec_internal.h
media/libvpx/vpx/internal/vpx_psnr.h
media/libvpx/vpx/src/svc_encodeframe.c
media/libvpx/vpx/src/vpx_codec.c
media/libvpx/vpx/src/vpx_decoder.c
media/libvpx/vpx/src/vpx_encoder.c
media/libvpx/vpx/src/vpx_image.c
media/libvpx/vpx/src/vpx_psnr.c
media/libvpx/vpx/svc_context.h
media/libvpx/vpx/vp8.h
media/libvpx/vpx/vp8cx.h
media/libvpx/vpx/vp8dx.h
media/libvpx/vpx/vpx_codec.h
media/libvpx/vpx/vpx_decoder.h
media/libvpx/vpx/vpx_encoder.h
media/libvpx/vpx/vpx_frame_buffer.h
media/libvpx/vpx/vpx_image.h
media/libvpx/vpx/vpx_integer.h
media/libvpx/vpx_config.asm
media/libvpx/vpx_config.h
media/libvpx/vpx_config_armv7-android-gcc.asm
media/libvpx/vpx_config_armv7-android-gcc.h
media/libvpx/vpx_config_generic-gnu.asm
media/libvpx/vpx_config_generic-gnu.h
media/libvpx/vpx_config_x86-darwin9-gcc.asm
media/libvpx/vpx_config_x86-darwin9-gcc.h
media/libvpx/vpx_config_x86-linux-gcc.asm
media/libvpx/vpx_config_x86-linux-gcc.h
media/libvpx/vpx_config_x86-win32-gcc.asm
media/libvpx/vpx_config_x86-win32-gcc.h
media/libvpx/vpx_config_x86-win32-vs12.asm
media/libvpx/vpx_config_x86-win32-vs12.h
media/libvpx/vpx_config_x86_64-darwin9-gcc.asm
media/libvpx/vpx_config_x86_64-darwin9-gcc.h
media/libvpx/vpx_config_x86_64-linux-gcc.asm
media/libvpx/vpx_config_x86_64-linux-gcc.h
media/libvpx/vpx_config_x86_64-win64-gcc.asm
media/libvpx/vpx_config_x86_64-win64-gcc.h
media/libvpx/vpx_config_x86_64-win64-vs12.asm
media/libvpx/vpx_config_x86_64-win64-vs12.h
media/libvpx/vpx_dsp/arm/sad4d_neon.c
media/libvpx/vpx_dsp/arm/sad_media.asm
media/libvpx/vpx_dsp/arm/sad_neon.c
media/libvpx/vpx_dsp/arm/variance_media.asm
media/libvpx/vpx_dsp/arm/variance_neon.c
media/libvpx/vpx_dsp/sad.c
media/libvpx/vpx_dsp/variance.c
media/libvpx/vpx_dsp/vpx_dsp_rtcd.c
media/libvpx/vpx_dsp/x86/highbd_sad4d_sse2.asm
media/libvpx/vpx_dsp/x86/highbd_sad_sse2.asm
media/libvpx/vpx_dsp/x86/highbd_variance_impl_sse2.asm
media/libvpx/vpx_dsp/x86/highbd_variance_sse2.c
media/libvpx/vpx_dsp/x86/sad4d_avx2.c
media/libvpx/vpx_dsp/x86/sad4d_sse2.asm
media/libvpx/vpx_dsp/x86/sad_avx2.c
media/libvpx/vpx_dsp/x86/sad_mmx.asm
media/libvpx/vpx_dsp/x86/sad_sse2.asm
media/libvpx/vpx_dsp/x86/sad_sse3.asm
media/libvpx/vpx_dsp/x86/sad_sse4.asm
media/libvpx/vpx_dsp/x86/sad_ssse3.asm
media/libvpx/vpx_dsp/x86/variance_avx2.c
media/libvpx/vpx_dsp/x86/variance_impl_avx2.c
media/libvpx/vpx_dsp/x86/variance_impl_mmx.asm
media/libvpx/vpx_dsp/x86/variance_mmx.c
media/libvpx/vpx_dsp/x86/variance_sse2.c
media/libvpx/vpx_dsp_rtcd.h
media/libvpx/vpx_dsp_rtcd_armv7-android-gcc.h
media/libvpx/vpx_dsp_rtcd_generic-gnu.h
media/libvpx/vpx_dsp_rtcd_x86-darwin9-gcc.h
media/libvpx/vpx_dsp_rtcd_x86-linux-gcc.h
media/libvpx/vpx_dsp_rtcd_x86-win32-gcc.h
media/libvpx/vpx_dsp_rtcd_x86-win32-vs12.h
media/libvpx/vpx_dsp_rtcd_x86_64-darwin9-gcc.h
media/libvpx/vpx_dsp_rtcd_x86_64-linux-gcc.h
media/libvpx/vpx_dsp_rtcd_x86_64-win64-gcc.h
media/libvpx/vpx_dsp_rtcd_x86_64-win64-vs12.h
media/libvpx/vpx_mem/include/vpx_mem_intrnl.h
media/libvpx/vpx_mem/vpx_mem.c
media/libvpx/vpx_mem/vpx_mem.h
media/libvpx/vpx_ports/arm.h
media/libvpx/vpx_ports/arm_cpudetect.c
media/libvpx/vpx_ports/config.h
media/libvpx/vpx_ports/emmintrin_compat.h
media/libvpx/vpx_ports/emms.asm
media/libvpx/vpx_ports/mem.h
media/libvpx/vpx_ports/mem_ops.h
media/libvpx/vpx_ports/mem_ops_aligned.h
media/libvpx/vpx_ports/msvc.h
media/libvpx/vpx_ports/vpx_once.h
media/libvpx/vpx_ports/vpx_timer.h
media/libvpx/vpx_ports/x86.h
media/libvpx/vpx_ports/x86_abi_support.asm
media/libvpx/vpx_scale/generic/gen_scalers.c
media/libvpx/vpx_scale/generic/vpx_scale.c
media/libvpx/vpx_scale/generic/yv12config.c
media/libvpx/vpx_scale/generic/yv12extend.c
media/libvpx/vpx_scale/vpx_scale.h
media/libvpx/vpx_scale/vpx_scale_rtcd.c
media/libvpx/vpx_scale/yv12config.h
media/libvpx/vpx_scale_rtcd.h
media/libvpx/vpx_scale_rtcd_armv7-android-gcc.h
media/libvpx/vpx_scale_rtcd_generic-gnu.h
media/libvpx/vpx_scale_rtcd_x86-darwin9-gcc.h
media/libvpx/vpx_scale_rtcd_x86-linux-gcc.h
media/libvpx/vpx_scale_rtcd_x86-win32-gcc.h
media/libvpx/vpx_scale_rtcd_x86-win32-vs12.h
media/libvpx/vpx_scale_rtcd_x86_64-darwin9-gcc.h
media/libvpx/vpx_scale_rtcd_x86_64-linux-gcc.h
media/libvpx/vpx_scale_rtcd_x86_64-win64-gcc.h
media/libvpx/vpx_scale_rtcd_x86_64-win64-vs12.h
media/libvpx/vpx_version.h
modules/libpref/init/all.js
widget/CompositorWidget.h
widget/nsBaseWidget.cpp
widget/windows/nsWindow.cpp
--- 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 1250356 Setting CLOBBER out caution landing a huge patchset with gyp changes
+Bug 1328744 libvpx sources moved directories
--- a/accessible/ipc/DocAccessibleParent.cpp
+++ b/accessible/ipc/DocAccessibleParent.cpp
@@ -411,19 +411,24 @@ DocAccessibleParent::RecvShutdown()
   }
 
   return IPC_OK();
 }
 
 void
 DocAccessibleParent::Destroy()
 {
+  // If we are already shutdown that is because our containing tab parent is
+  // shutting down in which case we don't need to do anything.
+  if (mShutdown) {
+    return;
+  }
+
   NS_ASSERTION(mChildDocs.IsEmpty(),
                "why weren't the child docs destroyed already?");
-  MOZ_ASSERT(!mShutdown);
   mShutdown = true;
 
   uint32_t childDocCount = mChildDocs.Length();
   for (uint32_t i = childDocCount - 1; i < childDocCount; i--)
     mChildDocs[i]->Destroy();
 
   for (auto iter = mAccessibles.Iter(); !iter.Done(); iter.Next()) {
     MOZ_ASSERT(iter.Get()->mProxy != this);
--- a/addon-sdk/source/python-lib/cuddlefish/prefs.py
+++ b/addon-sdk/source/python-lib/cuddlefish/prefs.py
@@ -53,16 +53,18 @@ DEFAULT_NO_CONNECTIONS_PREFS = {
     'media.gmp-manager.updateEnabled': False,
     'browser.aboutHomeSnippets.updateUrl': 'https://localhost/snippet-dummy',
     'browser.newtab.url' : 'about:blank',
     'browser.search.update': False,
     'browser.search.suggest.enabled' : False,
     'browser.safebrowsing.phishing.enabled' : False,
     'browser.safebrowsing.provider.google.updateURL': 'http://localhost/safebrowsing-dummy/update',
     'browser.safebrowsing.provider.google.gethashURL': 'http://localhost/safebrowsing-dummy/gethash',
+    'browser.safebrowsing.provider.google4.updateURL': 'http://localhost/safebrowsing4-dummy/update',
+    'browser.safebrowsing.provider.google4.gethashURL': 'http://localhost/safebrowsing4-dummy/gethash',
     'browser.safebrowsing.malware.reportURL': 'http://localhost/safebrowsing-dummy/malwarereport',
     'browser.selfsupport.url': 'https://localhost/selfsupport-dummy',
     'browser.safebrowsing.provider.mozilla.gethashURL': 'http://localhost/safebrowsing-dummy/gethash',
     'browser.safebrowsing.provider.mozilla.updateURL': 'http://localhost/safebrowsing-dummy/update',
 
     # Disable app update
     'app.update.enabled' : False,
     'app.update.staging.enabled': False,
@@ -114,16 +116,18 @@ DEFAULT_FIREFOX_PREFS = {
 
     # From:
     # http://hg.mozilla.org/mozilla-central/file/1dd81c324ac7/build/automation.py.in#l388
     # Make url-classifier updates so rare that they won't affect tests.
     'urlclassifier.updateinterval' : 172800,
     # Point the url-classifier to a nonexistent local URL for fast failures.
     'browser.safebrowsing.provider.google.gethashURL' : 'http://localhost/safebrowsing-dummy/gethash',
     'browser.safebrowsing.provider.google.updateURL' : 'http://localhost/safebrowsing-dummy/update',
+    'browser.safebrowsing.provider.google4.gethashURL' : 'http://localhost/safebrowsing4-dummy/gethash',
+    'browser.safebrowsing.provider.google4.updateURL' : 'http://localhost/safebrowsing4-dummy/update',
     'browser.safebrowsing.provider.mozilla.gethashURL': 'http://localhost/safebrowsing-dummy/gethash',
     'browser.safebrowsing.provider.mozilla.updateURL': 'http://localhost/safebrowsing-dummy/update',
 }
 
 # When launching a temporary new Thunderbird profile, use these preferences.
 # Note that these were taken from:
 # http://dxr.mozilla.org/comm-central/source/mail/test/mozmill/runtest.py
 DEFAULT_THUNDERBIRD_PREFS = {
--- a/addon-sdk/source/test/preferences/firefox.json
+++ b/addon-sdk/source/test/preferences/firefox.json
@@ -1,11 +1,13 @@
 {
   "browser.startup.homepage": "about:blank",
   "startup.homepage_welcome_url": "about:blank",
   "devtools.browsertoolbox.panel": "jsdebugger",
   "devtools.chrome.enabled": true,
   "urlclassifier.updateinterval": 172800,
   "browser.safebrowsing.provider.google.gethashURL": "http://localhost/safebrowsing-dummy/gethash",
   "browser.safebrowsing.provider.google.updateURL": "http://localhost/safebrowsing-dummy/update",
+  "browser.safebrowsing.provider.google4.gethashURL": "http://localhost/safebrowsing4-dummy/gethash",
+  "browser.safebrowsing.provider.google4.updateURL": "http://localhost/safebrowsing4-dummy/update",
   "browser.safebrowsing.provider.mozilla.gethashURL": "http://localhost/safebrowsing-dummy/gethash",
   "browser.safebrowsing.provider.mozilla.updateURL": "http://localhost/safebrowsing-dummy/update"
 }
--- a/addon-sdk/source/test/preferences/no-connections.json
+++ b/addon-sdk/source/test/preferences/no-connections.json
@@ -14,16 +14,19 @@
   "browser.aboutHomeSnippets.updateUrl": "https://localhost/snippet-dummy",
   "browser.newtab.url": "about:blank",
   "browser.search.update": false,
   "browser.search.suggest.enabled": false,
   "browser.safebrowsing.phishing.enabled": false,
   "browser.safebrowsing.provider.google.updateURL": "http://localhost/safebrowsing-dummy/update",
   "browser.safebrowsing.provider.google.gethashURL": "http://localhost/safebrowsing-dummy/gethash",
   "browser.safebrowsing.provider.google.reportURL": "http://localhost/safebrowsing-dummy/malwarereport",
+  "browser.safebrowsing.provider.google4.updateURL": "http://localhost/safebrowsing4-dummy/update",
+  "browser.safebrowsing.provider.google4.gethashURL": "http://localhost/safebrowsing4-dummy/gethash",
+  "browser.safebrowsing.provider.google4.reportURL": "http://localhost/safebrowsing4-dummy/malwarereport",
   "browser.selfsupport.url": "https://localhost/selfsupport-dummy",
   "browser.safebrowsing.provider.mozilla.gethashURL": "http://localhost/safebrowsing-dummy/gethash",
   "browser.safebrowsing.provider.mozilla.updateURL": "http://localhost/safebrowsing-dummy/update",
   "browser.newtabpage.directory.source": "data:application/json,{'jetpack':1}",
   "browser.newtabpage.directory.ping": "",
   "extensions.update.url": "http://localhost/extensions-dummy/updateURL",
   "extensions.update.background.url": "http://localhost/extensions-dummy/updateBackgroundURL",
   "extensions.blocklist.url": "http://localhost/extensions-dummy/blocklistURL",
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -194,26 +194,24 @@
 @RESPATH@/components/dom_xbl.xpt
 @RESPATH@/components/dom_xhr.xpt
 @RESPATH@/components/dom_xpath.xpt
 @RESPATH@/components/dom_xul.xpt
 @RESPATH@/components/dom_time.xpt
 @RESPATH@/components/dom_presentation.xpt
 @RESPATH@/components/downloads.xpt
 @RESPATH@/components/editor.xpt
-@RESPATH@/components/embed_base.xpt
 @RESPATH@/components/extensions.xpt
 @RESPATH@/components/exthandler.xpt
 @RESPATH@/components/exthelper.xpt
 @RESPATH@/components/fastfind.xpt
 @RESPATH@/components/feeds.xpt
 #ifdef MOZ_GTK
 @RESPATH@/components/filepicker.xpt
 #endif
-@RESPATH@/components/find.xpt
 @RESPATH@/components/gfx.xpt
 @RESPATH@/components/gaia_chrome.xpt
 @RESPATH@/components/hal.xpt
 @RESPATH@/components/html5.xpt
 @RESPATH@/components/htmlparser.xpt
 @RESPATH@/components/identity.xpt
 @RESPATH@/components/imglib2.xpt
 @RESPATH@/components/inspector.xpt
@@ -304,16 +302,17 @@
 @RESPATH@/components/webshell_idls.xpt
 @RESPATH@/components/widget.xpt
 #ifdef XP_MACOSX
 @RESPATH@/components/widget_cocoa.xpt
 #endif
 #ifdef ANDROID
 @RESPATH@/components/widget_android.xpt
 #endif
+@RESPATH@/components/windowcreator.xpt
 @RESPATH@/components/windowds.xpt
 @RESPATH@/components/windowwatcher.xpt
 @RESPATH@/components/xpcom_base.xpt
 @RESPATH@/components/xpcom_system.xpt
 @RESPATH@/components/xpcom_components.xpt
 @RESPATH@/components/xpcom_ds.xpt
 @RESPATH@/components/xpcom_io.xpt
 @RESPATH@/components/xpcom_threads.xpt
--- a/browser/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf.in
+++ b/browser/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf.in
@@ -8,18 +8,18 @@
 
 <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:em="http://www.mozilla.org/2004/em-rdf#">
 
   <Description about="urn:mozilla:install-manifest">
     <em:id>{972ce4c6-7e08-4474-a285-3208198ce6fd}</em:id>
     <em:version>@FIREFOX_VERSION@</em:version>
 
-    <!-- Target Application this theme can install into, 
-        with minimum and maximum supported versions. --> 
+    <!-- Target Application this theme can install into,
+        with minimum and maximum supported versions. -->
     <em:targetApplication>
       <Description>
         <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
         <em:minVersion>@FIREFOX_VERSION@</em:minVersion>
         <em:maxVersion>@FIREFOX_VERSION@</em:maxVersion>
       </Description>
     </em:targetApplication>
 
@@ -30,11 +30,13 @@
     <!-- Front End Integration Hooks (used by Theme Manager)-->
     <em:creator>Mozilla</em:creator>
     <em:contributor>Mozilla Contributors</em:contributor>
 
     <!-- Allow lightweight themes to apply to this theme -->
     <em:skinnable>true</em:skinnable>
 
     <em:internalName>classic/1.0</em:internalName>
-  </Description>      
+
+    <em:iconURL>chrome://browser/content/default-theme-icon.svg</em:iconURL>
+  </Description>
 
 </RDF>
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1560,8 +1560,14 @@ pref("browser.crashReports.unsubmittedCh
 #ifdef NIGHTLY_BUILD
 // Enable the (fairly costly) client/server validation on nightly only. The other prefs
 // controlling validation are located in /services/sync/services-sync.js
 pref("services.sync.validation.enabled", true);
 #endif
 
 // Preferences for the form autofill system extension
 pref("browser.formautofill.experimental", false);
+
+// Enable safebrowsing v4 tables (suffixed by "-proto") update.
+#ifdef NIGHTLY_BUILD
+pref("urlclassifier.malwareTable", "goog-malware-shavar,goog-unwanted-shavar,goog-malware-proto,goog-unwanted-proto,test-malware-simple,test-unwanted-simple");
+pref("urlclassifier.phishTable", "goog-phish-shavar,goog-phish-proto,test-phish-simple");
+#endif
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/browser/base/content/default-theme-icon.svg
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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/. -->
+<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32">
+    <rect fill="#fff" x="1" y="1" width="30" height="30" rx="2" ry="2"/>
+    <path fill="#e3e3e3" d="M3 1h26a2 2 0 0 1 2 2v18H1V3a2 2 0 0 1 2-2z"/>
+    <rect stroke="gray" fill="#fff" x="10.5" y="5.5" width="18" height="11" rx="1" ry="1"/>
+    <circle fill="#fcfcfc" stroke="gray" stroke-width="1.2px" cx="11" cy="11" r="7.5"/>
+    <path fill="#595959" d="M14 10h-3.6l1.3-1.3a1 1 0 0 0-1.4-1.4l-3 3a1 1 0 0 0 0 1.4l3 3a1 1 0 0 0 1.4-1.4L10.4 12H14a1 1 0 0 0 0-2z"/>
+    <path fill="none" stroke="#999" d="M1.5 20.5h29"/>
+    <rect fill="none" stroke="#999" stroke-width="2" x="1" y="1" width="30" height="30" rx="2" ry="2"/>
+</svg>
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -2177,16 +2177,23 @@
               // This can go away when bug 672618 or bug 55696 are fixed.
               t.setAttribute("label", aURI);
             }
 
             if (aIsPrerendered) {
               t.setAttribute("hidden", "true");
             }
 
+            // Related tab inherits current tab's user context unless a different
+            // usercontextid is specified
+            if (aUserContextId == null &&
+                (aRelatedToCurrent == null ? aReferrerURI : aRelatedToCurrent)) {
+              aUserContextId = this.mCurrentTab.getAttribute("usercontextid") || 0;
+            }
+
             if (aUserContextId) {
               t.setAttribute("usercontextid", aUserContextId);
               ContextualIdentityService.setTabStyle(t);
             }
 
             t.setAttribute("onerror", "this.removeAttribute('image');");
             t.className = "tabbrowser-tab";
 
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -89,16 +89,17 @@ browser.jar:
 #else
         content/browser/browser-tabsintitlebar.js       (content/browser-tabsintitlebar-stub.js)
 #endif
         content/browser/browser-thumbnails.js         (content/browser-thumbnails.js)
         content/browser/browser-trackingprotection.js (content/browser-trackingprotection.js)
         content/browser/tab-content.js                (content/tab-content.js)
         content/browser/content.js                    (content/content.js)
         content/browser/social-content.js             (content/social-content.js)
+        content/browser/default-theme-icon.svg        (content/default-theme-icon.svg)
         content/browser/defaultthemes/1.footer.jpg    (content/defaultthemes/1.footer.jpg)
         content/browser/defaultthemes/1.header.jpg    (content/defaultthemes/1.header.jpg)
         content/browser/defaultthemes/1.icon.jpg      (content/defaultthemes/1.icon.jpg)
         content/browser/defaultthemes/1.preview.jpg   (content/defaultthemes/1.preview.jpg)
         content/browser/defaultthemes/2.footer.jpg    (content/defaultthemes/2.footer.jpg)
         content/browser/defaultthemes/2.header.jpg    (content/defaultthemes/2.header.jpg)
         content/browser/defaultthemes/2.icon.jpg      (content/defaultthemes/2.icon.jpg)
         content/browser/defaultthemes/2.preview.jpg   (content/defaultthemes/2.preview.jpg)
--- a/browser/components/contextualidentity/test/browser/browser.ini
+++ b/browser/components/contextualidentity/test/browser/browser.ini
@@ -23,8 +23,9 @@ tags = openwindow
 [browser_windowOpen.js]
 tags = openwindow
 [browser_serviceworkers.js]
 [browser_broadcastchannel.js]
 [browser_blobUrl.js]
 [browser_middleClick.js]
 [browser_imageCache.js]
 [browser_count_and_remove.js]
+[browser_relatedTab.js]
new file mode 100644
--- /dev/null
+++ b/browser/components/contextualidentity/test/browser/browser_relatedTab.js
@@ -0,0 +1,31 @@
+"use strict";
+
+/*
+ * Bug 1325014 - Adding tab related to current tab inherits current tab's container usercontextid unless otherwise specified
+ */
+
+add_task(function* () {
+  let tab = gBrowser.addTab("about:blank", {userContextId: 1});
+
+  gBrowser.selectedTab = tab;
+  let relatedTab = gBrowser.addTab("about:blank", {relatedToCurrent: true});
+  is(relatedTab.getAttribute('usercontextid'), 1, "Related tab (relatedToCurrent) inherits current tab's usercontextid");
+  yield BrowserTestUtils.removeTab(relatedTab);
+
+  gBrowser.selectedTab = tab;
+  relatedTab = gBrowser.addTab("about:blank", {relatedToCurrent: true, userContextId: 2});
+  is(relatedTab.getAttribute('usercontextid'), 2, "Related tab (relatedToCurrent) with overridden usercontextid");
+  yield BrowserTestUtils.removeTab(relatedTab);
+
+  gBrowser.selectedTab = tab;
+  relatedTab = gBrowser.addTab("about:blank", {referrerURI: gBrowser.currentURI});
+  is(relatedTab.getAttribute('usercontextid'), 1, "Related tab (referrer) inherits current tab's usercontextid");
+  yield BrowserTestUtils.removeTab(relatedTab);
+
+  gBrowser.selectedTab = tab;
+  relatedTab = gBrowser.addTab("about:blank", {referrerURI: gBrowser.currentURI, userContextId: 2});
+  is(relatedTab.getAttribute('usercontextid'), 2, "Related tab (referrer) with overridden usercontextid");
+  yield BrowserTestUtils.removeTab(relatedTab);
+
+  yield BrowserTestUtils.removeTab(tab);
+});
--- a/browser/components/extensions/ext-tabs.js
+++ b/browser/components/extensions/ext-tabs.js
@@ -243,28 +243,30 @@ let tabListener = {
         this.tabReadyPromises.delete(tab);
       }
     }
   },
 
   /**
    * Returns a promise that resolves when the tab is ready.
    * Tabs created via the `tabs.create` method are "ready" once the location
-   * changed to the requested URL. Other tabs are always assumed to be ready.
+   * changes to the requested URL. Other tabs are assumed to be ready once their
+   * inner window ID is known.
    *
    * @param {XULElement} tab The <tab> element.
    * @returns {Promise} Resolves with the given tab once ready.
    */
   awaitTabReady(tab) {
     let deferred = this.tabReadyPromises.get(tab);
     if (!deferred) {
       deferred = PromiseUtils.defer();
       if (!this.initializingTabs.has(tab) && tab.linkedBrowser.innerWindowID) {
         deferred.resolve(tab);
       } else {
+        this.initTabReady();
         this.tabReadyPromises.set(tab, deferred);
       }
     }
     return deferred.promise;
   },
 };
 
 /* eslint-disable mozilla/balanced-listeners */
--- a/browser/components/extensions/test/browser/browser-common.ini
+++ b/browser/components/extensions/test/browser/browser-common.ini
@@ -72,16 +72,17 @@ support-files =
 [browser_ext_tabs_create.js]
 [browser_ext_tabs_create_invalid_url.js]
 [browser_ext_tabs_detectLanguage.js]
 [browser_ext_tabs_duplicate.js]
 [browser_ext_tabs_events.js]
 [browser_ext_tabs_executeScript.js]
 [browser_ext_tabs_executeScript_good.js]
 [browser_ext_tabs_executeScript_bad.js]
+[browser_ext_tabs_executeScript_no_create.js]
 [browser_ext_tabs_executeScript_runAt.js]
 [browser_ext_tabs_getCurrent.js]
 [browser_ext_tabs_insertCSS.js]
 [browser_ext_tabs_removeCSS.js]
 [browser_ext_tabs_move.js]
 [browser_ext_tabs_move_window.js]
 [browser_ext_tabs_move_window_multiple.js]
 [browser_ext_tabs_move_window_pinned.js]
new file mode 100644
--- /dev/null
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_executeScript_no_create.js
@@ -0,0 +1,67 @@
+/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* vim: set sts=2 sw=2 et tw=80: */
+"use strict";
+
+add_task(function* testExecuteScriptAtOnUpdated() {
+  const BASE = "http://mochi.test:8888/browser/browser/components/extensions/test/browser/";
+  const URL = BASE + "file_iframe_document.html";
+  // This is a regression test for bug 1325830.
+  // The bug (executeScript not completing any more) occurred when executeScript
+  // was called early at the onUpdated event, unless the tabs.create method is
+  // called. So this test does not use tabs.create to open new tabs.
+  // Note that if this test is run together with other tests that do call
+  // tabs.create, then this test case does not properly test the conditions of
+  // the regression any more. To verify that the regression has been resolved,
+  // this test must be run in isolation.
+
+  function background() {
+    // Using variables to prevent listeners from running more than once, instead
+    // of removing the listener. This is to minimize any IPC, since the bug that
+    // is being tested is sensitive to timing.
+    let ignore = false;
+    let url;
+    browser.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
+      if (changeInfo.status === "loading" && tab.url === url && !ignore) {
+        ignore = true;
+        browser.tabs.executeScript(tabId, {
+          code: "document.URL",
+        }).then(results => {
+          browser.test.assertEq(url, results[0], "Content script should run");
+          browser.test.notifyPass("executeScript-at-onUpdated");
+        }, error => {
+          browser.test.fail(`Unexpected error: ${error} :: ${error.stack}`);
+          browser.test.notifyFail("executeScript-at-onUpdated");
+        });
+        // (running this log call after executeScript to minimize IPC between
+        //  onUpdated and executeScript.)
+        browser.test.log(`Found expected navigation to ${url}`);
+      } else {
+        // The bug occurs when executeScript is called before a tab is
+        // initialized.
+        browser.tabs.executeScript(tabId, {code: ""});
+      }
+    });
+    browser.test.onMessage.addListener(testUrl => {
+      url = testUrl;
+      browser.test.sendMessage("open-test-tab");
+    });
+  }
+
+  let extension = ExtensionTestUtils.loadExtension({
+    manifest: {
+      "permissions": ["http://mochi.test/", "tabs"],
+    },
+    background,
+  });
+
+  yield extension.startup();
+  extension.sendMessage(URL);
+  yield extension.awaitMessage("open-test-tab");
+  let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, URL, true);
+
+  yield extension.awaitFinish("executeScript-at-onUpdated");
+
+  yield extension.unload();
+
+  yield BrowserTestUtils.removeTab(tab);
+});
--- a/browser/components/feeds/FeedWriter.js
+++ b/browser/components/feeds/FeedWriter.js
@@ -876,18 +876,18 @@ FeedWriter.prototype = {
    *        The window of the document invoking the BrowserFeedWriter
    */
   _getOriginalURI(aWindow) {
     let docShell = aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                           .getInterface(Ci.nsIWebNavigation)
                           .QueryInterface(Ci.nsIDocShell);
     let chan = docShell.currentDocumentChannel;
 
-    // We probably need to call InheritFromDocShellToDoc for this, but right now
-    // we can't call it from JS.
+    // We probably need to call Inherit() for this, but right now we can't call
+    // it from JS.
     let attrs = docShell.getOriginAttributes();
     let ssm = Services.scriptSecurityManager;
     let nullPrincipal = ssm.createNullPrincipal(attrs);
 
     // this channel is not going to be openend, use a nullPrincipal
     // and the most restrctive securityFlag.
     let resolvedURI = NetUtil.newChannel({
       uri: "about:feeds",
--- a/browser/components/migration/AutoMigrate.jsm
+++ b/browser/components/migration/AutoMigrate.jsm
@@ -26,16 +26,18 @@ Cu.import("resource://gre/modules/XPCOMU
 XPCOMUtils.defineLazyModuleGetter(this, "AsyncShutdown",
                                   "resource://gre/modules/AsyncShutdown.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper",
                                   "resource://gre/modules/LoginHelper.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "OS",
                                   "resource://gre/modules/osfile.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
                                   "resource://gre/modules/PlacesUtils.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "NewTabUtils",
+                                  "resource://gre/modules/NewTabUtils.jsm");
 
 Cu.importGlobalProperties(["URL"]);
 
 /* globals kUndoStateFullPath */
 XPCOMUtils.defineLazyGetter(this, "kUndoStateFullPath", function() {
   return OS.Path.join(OS.Constants.Path.profileDir, "initialMigrationMetadata.jsonlz4");
 });
 
@@ -206,16 +208,21 @@ const AutoMigrate = {
     histogram.add(15);
 
     yield this._removeSomeVisits(stateData.get("visits"));
     histogram.add(20);
 
     yield this._removeUnchangedLogins(stateData.get("logins"));
     histogram.add(25);
 
+    // This is async, but no need to wait for it.
+    NewTabUtils.links.populateCache(() => {
+      NewTabUtils.allPages.update();
+    }, true);
+
     this.removeUndoOption(this.UNDO_REMOVED_REASON_UNDO_USED);
     histogram.add(30);
   }),
 
   removeUndoOption(reason) {
     // We don't wait for the off-main-thread removal to complete. OS.File will
     // ensure it happens before shutdown.
     OS.File.remove(kUndoStateFullPath, {ignoreAbsent: true});
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -2940,17 +2940,19 @@ var SessionStoreInternal = {
 
   /**
    * gather session data as object
    * @param aUpdateAll
    *        Bool update all windows
    * @returns object
    */
   getCurrentState: function (aUpdateAll) {
-    this._handleClosedWindows();
+    this._handleClosedWindows().then(() => {
+      this._notifyOfClosedObjectsChange();
+    });
 
     var activeWindow = this._getMostRecentBrowserWindow();
 
     TelemetryStopwatch.start("FX_SESSION_RESTORE_COLLECT_ALL_WINDOWS_DATA_MS");
     if (RunState.isRunning) {
       // update the data for all windows with activities since the last save operation
       this._forEachBrowserWindow(function(aWindow) {
         if (!this._isWindowLoaded(aWindow)) // window data is still in _statesToRestore
@@ -4001,22 +4003,24 @@ var SessionStoreInternal = {
   /**
    * Calls onClose for windows that are determined to be closed but aren't
    * destroyed yet, which would otherwise cause getBrowserState and
    * setBrowserState to treat them as open windows.
    */
   _handleClosedWindows: function ssi_handleClosedWindows() {
     var windowsEnum = Services.wm.getEnumerator("navigator:browser");
 
+    let promises = [];
     while (windowsEnum.hasMoreElements()) {
       var window = windowsEnum.getNext();
       if (window.closed) {
-        this.onClose(window);
+        promises.push(this.onClose(window));
       }
     }
+    return Promise.all(promises);
   },
 
   /**
    * open a new browser window for a given session state
    * called when restoring a multi-window session
    * @param aState
    *        Object containing session data
    */
--- a/browser/extensions/e10srollout/bootstrap.js
+++ b/browser/extensions/e10srollout/bootstrap.js
@@ -13,17 +13,17 @@ Cu.import("resource://gre/modules/Update
  // The amount of people to be part of e10s
 const TEST_THRESHOLD = {
   "beta"    : 0.5,  // 50%
   "release" : 1.0,  // 100%
 };
 
 const ADDON_ROLLOUT_POLICY = {
   "beta"    : "51alladdons", // Any WebExtension or addon except with mpc = false
-  "release" : "50allmpc", // Any WebExtension or addon with mpc = true
+  "release" : "51set1",
 };
 
 const PREF_COHORT_SAMPLE       = "e10s.rollout.cohortSample";
 const PREF_COHORT_NAME         = "e10s.rollout.cohort";
 const PREF_E10S_OPTED_IN       = "browser.tabs.remote.autostart";
 const PREF_E10S_FORCE_ENABLED  = "browser.tabs.remote.force-enable";
 const PREF_E10S_FORCE_DISABLED = "browser.tabs.remote.force-disable";
 const PREF_TOGGLE_E10S         = "browser.tabs.remote.autostart.2";
--- a/browser/extensions/e10srollout/install.rdf.in
+++ b/browser/extensions/e10srollout/install.rdf.in
@@ -5,17 +5,17 @@
 
 #filter substitution
 
 <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:em="http://www.mozilla.org/2004/em-rdf#">
 
   <Description about="urn:mozilla:install-manifest">
     <em:id>e10srollout@mozilla.org</em:id>
-    <em:version>1.6</em:version>
+    <em:version>1.7</em:version>
     <em:type>2</em:type>
     <em:bootstrap>true</em:bootstrap>
     <em:multiprocessCompatible>true</em:multiprocessCompatible>
 
     <!-- Target Application this theme can install into,
         with minimum and maximum supported versions. -->
     <em:targetApplication>
       <Description>
--- a/browser/extensions/pdfjs/README.mozilla
+++ b/browser/extensions/pdfjs/README.mozilla
@@ -1,3 +1,3 @@
 This is the pdf.js project output, https://github.com/mozilla/pdf.js
 
-Current extension version is: 1.6.418
+Current extension version is: 1.6.454
--- a/browser/extensions/pdfjs/content/PdfJs.jsm
+++ b/browser/extensions/pdfjs/content/PdfJs.jsm
@@ -192,21 +192,21 @@ var PdfJs = {
       this._ensureRegistered();
     } else {
       this._ensureUnregistered();
     }
   },
 
   uninit: function uninit() {
     if (this._initialized) {
-      Services.prefs.removeObserver(PREF_DISABLED, this);
-      Services.prefs.removeObserver(PREF_DISABLED_PLUGIN_TYPES, this);
-      Services.obs.removeObserver(this, TOPIC_PDFJS_HANDLER_CHANGED);
-      Services.obs.removeObserver(this, TOPIC_PLUGINS_LIST_UPDATED);
-      Services.obs.removeObserver(this, TOPIC_PLUGIN_INFO_UPDATED);
+      Services.prefs.removeObserver(PREF_DISABLED, this, false);
+      Services.prefs.removeObserver(PREF_DISABLED_PLUGIN_TYPES, this, false);
+      Services.obs.removeObserver(this, TOPIC_PDFJS_HANDLER_CHANGED, false);
+      Services.obs.removeObserver(this, TOPIC_PLUGINS_LIST_UPDATED, false);
+      Services.obs.removeObserver(this, TOPIC_PLUGIN_INFO_UPDATED, false);
       this._initialized = false;
     }
     this._ensureUnregistered();
   },
 
   _migrate: function migrate() {
     const VERSION = 2;
     var currentVersion = getIntPref(PREF_MIGRATION_VERSION, 0);
--- a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
+++ b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
@@ -142,31 +142,16 @@ function getLocalizedStrings(path) {
 function getLocalizedString(strings, id, property) {
   property = property || 'textContent';
   if (id in strings) {
     return strings[id][property];
   }
   return id;
 }
 
-function createNewChannel(uri, node) {
-  return NetUtil.newChannel({
-    uri: uri,
-    loadUsingSystemPrincipal: true,
-  });
-}
-
-function asyncOpenChannel(channel, listener, context) {
-  return channel.asyncOpen2(listener);
-}
-
-function asyncFetchChannel(channel, callback) {
-  return NetUtil.asyncFetch(channel, callback);
-}
-
 // PDF data storage
 function PdfDataListener(length) {
   this.length = length; // less than 0, if length is unknown
   this.buffer = null;
   this.loaded = 0;
 }
 
 PdfDataListener.prototype = {
@@ -250,22 +235,25 @@ ChromeActions.prototype = {
       filename = 'document.pdf';
     }
     var blobUri = NetUtil.newURI(blobUrl);
     var extHelperAppSvc =
           Cc['@mozilla.org/uriloader/external-helper-app-service;1'].
              getService(Ci.nsIExternalHelperAppService);
 
     var docIsPrivate = this.isInPrivateBrowsing();
-    var netChannel = createNewChannel(blobUri, this.domWindow.document);
+    var netChannel = NetUtil.newChannel({
+      uri: blobUri,
+      loadUsingSystemPrincipal: true,
+    });
     if ('nsIPrivateBrowsingChannel' in Ci &&
         netChannel instanceof Ci.nsIPrivateBrowsingChannel) {
       netChannel.setPrivate(docIsPrivate);
     }
-    asyncFetchChannel(netChannel, function(aInputStream, aResult) {
+    NetUtil.asyncFetch(netChannel, function(aInputStream, aResult) {
       if (!Components.isSuccessCode(aResult)) {
         if (sendResponse) {
           sendResponse(true);
         }
         return;
       }
       // Create a nsIInputStreamChannel so we can set the url on the channel
       // so the filename will be correct.
@@ -313,17 +301,17 @@ ChromeActions.prototype = {
         },
         onDataAvailable: function(aRequest, aContext, aInputStream, aOffset,
                                   aCount) {
           this.extListener.onDataAvailable(aRequest, aContext, aInputStream,
                                            aOffset, aCount);
         }
       };
 
-      asyncOpenChannel(channel, listener, null);
+      channel.asyncOpen2(listener);
     });
   },
   getLocale: function() {
     return getStringPref('general.useragent.locale', 'en-US');
   },
   getStrings: function(data) {
     try {
       // Lazy initialization of localizedStrings
@@ -955,17 +943,20 @@ PdfStreamConverter.prototype = {
 
     // Creating storage for PDF data
     var contentLength = aRequest.contentLength;
     this.dataListener = new PdfDataListener(contentLength);
     this.binaryStream = Cc['@mozilla.org/binaryinputstream;1']
                         .createInstance(Ci.nsIBinaryInputStream);
 
     // Create a new channel that is viewer loaded as a resource.
-    var channel = createNewChannel(PDF_VIEWER_WEB_PAGE, null);
+    var channel = NetUtil.newChannel({
+      uri: PDF_VIEWER_WEB_PAGE,
+      loadUsingSystemPrincipal: true,
+    });
 
     var listener = this.listener;
     var dataListener = this.dataListener;
     // Proxy all the request observer calls, when it gets to onStopRequest
     // we can get the dom window.  We also intentionally pass on the original
     // request(aRequest) below so we don't overwrite the original channel and
     // trigger an assertion.
     var proxy = {
@@ -1013,21 +1004,21 @@ PdfStreamConverter.prototype = {
     channel.loadInfo.originAttributes = aRequest.loadInfo.originAttributes;
 
     // We can use the resource principal when data is fetched by the chrome,
     // e.g. useful for NoScript. Make make sure we reuse the origin attributes
     // from the request channel to keep isolation consistent.
     var ssm = Cc['@mozilla.org/scriptsecuritymanager;1']
                 .getService(Ci.nsIScriptSecurityManager);
     var uri = NetUtil.newURI(PDF_VIEWER_WEB_PAGE);
-    var resourcePrincipal;
-    resourcePrincipal =
+    var resourcePrincipal =
       ssm.createCodebasePrincipal(uri, aRequest.loadInfo.originAttributes);
     aRequest.owner = resourcePrincipal;
-    asyncOpenChannel(channel, proxy, aContext);
+
+    channel.asyncOpen2(proxy);
   },
 
   // nsIRequestObserver::onStopRequest
   onStopRequest: function(aRequest, aContext, aStatusCode) {
     if (!this.dataListener) {
       // Do nothing
       return;
     }
--- a/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm
+++ b/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm
@@ -105,17 +105,17 @@ var PdfjsChromeUtils = {
                                        this);
 
       this._mmg.removeMessageListener('PDFJS:Parent:displayWarning', this);
 
       this._mmg.removeMessageListener('PDFJS:Parent:addEventListener', this);
       this._mmg.removeMessageListener('PDFJS:Parent:removeEventListener', this);
       this._mmg.removeMessageListener('PDFJS:Parent:updateControlState', this);
 
-      Services.obs.removeObserver(this, 'quit-application');
+      Services.obs.removeObserver(this, 'quit-application', false);
 
       this._mmg = null;
       this._ppmm = null;
     }
   },
 
   /*
    * Called by the main module when preference changes are picked up
--- a/browser/extensions/pdfjs/content/build/pdf.js
+++ b/browser/extensions/pdfjs/content/build/pdf.js
@@ -18,18 +18,18 @@
   define('pdfjs-dist/build/pdf', ['exports'], factory);
  } else if (typeof exports !== 'undefined') {
   factory(exports);
  } else {
   factory(root['pdfjsDistBuildPdf'] = {});
  }
 }(this, function (exports) {
  'use strict';
- var pdfjsVersion = '1.6.418';
- var pdfjsBuild = '59afb4b9';
+ var pdfjsVersion = '1.6.454';
+ var pdfjsBuild = 'b8cd1433';
  var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
  var pdfjsLibs = {};
  (function pdfjsWrapper() {
   (function (root, factory) {
    factory(root.pdfjsSharedUtil = {});
   }(this, function (exports) {
    var globalScope = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this;
    var FONT_IDENTITY_MATRIX = [
@@ -1808,19 +1808,18 @@
       switch (fieldType) {
       case 'Tx':
        return new TextWidgetAnnotationElement(parameters);
       case 'Btn':
        if (parameters.data.radioButton) {
         return new RadioButtonWidgetAnnotationElement(parameters);
        } else if (parameters.data.checkBox) {
         return new CheckboxWidgetAnnotationElement(parameters);
-       } else {
-        warn('Unimplemented button widget annotation: pushbutton');
        }
+       warn('Unimplemented button widget annotation: pushbutton');
        break;
       case 'Ch':
        return new ChoiceWidgetAnnotationElement(parameters);
       }
       return new WidgetAnnotationElement(parameters);
      case AnnotationType.POPUP:
       return new PopupAnnotationElement(parameters);
      case AnnotationType.HIGHLIGHT:
@@ -6325,28 +6324,32 @@
     function WorkerTransport(messageHandler, loadingTask, pdfDataRangeTransport) {
      this.messageHandler = messageHandler;
      this.loadingTask = loadingTask;
      this.pdfDataRangeTransport = pdfDataRangeTransport;
      this.commonObjs = new PDFObjects();
      this.fontLoader = new FontLoader(loadingTask.docId);
      this.destroyed = false;
      this.destroyCapability = null;
+     this._passwordCapability = null;
      this.pageCache = [];
      this.pagePromises = [];
      this.downloadInfoCapability = createPromiseCapability();
      this.setupMessageHandler();
     }
     WorkerTransport.prototype = {
      destroy: function WorkerTransport_destroy() {
       if (this.destroyCapability) {
        return this.destroyCapability.promise;
       }
       this.destroyed = true;
       this.destroyCapability = createPromiseCapability();
+      if (this._passwordCapability) {
+       this._passwordCapability.reject(new Error('Worker was destroyed during onPassword callback'));
+      }
       var waitOn = [];
       this.pageCache.forEach(function (page) {
        if (page) {
         waitOn.push(page._destroy());
        }
       });
       this.pageCache = [];
       this.pagePromises = [];
@@ -6364,19 +6367,17 @@
         self.messageHandler = null;
        }
        self.destroyCapability.resolve();
       }, this.destroyCapability.reject);
       return this.destroyCapability.promise;
      },
      setupMessageHandler: function WorkerTransport_setupMessageHandler() {
       var messageHandler = this.messageHandler;
-      function updatePassword(password) {
-       messageHandler.send('UpdatePassword', password);
-      }
+      var loadingTask = this.loadingTask;
       var pdfDataRangeTransport = this.pdfDataRangeTransport;
       if (pdfDataRangeTransport) {
        pdfDataRangeTransport.addRangeListener(function (begin, chunk) {
         messageHandler.send('OnDataRange', {
          begin: begin,
          chunk: chunk
         });
        });
@@ -6393,28 +6394,29 @@
       messageHandler.on('GetDoc', function transportDoc(data) {
        var pdfInfo = data.pdfInfo;
        this.numPages = data.pdfInfo.numPages;
        var loadingTask = this.loadingTask;
        var pdfDocument = new PDFDocumentProxy(pdfInfo, this, loadingTask);
        this.pdfDocument = pdfDocument;
        loadingTask._capability.resolve(pdfDocument);
       }, this);
-      messageHandler.on('NeedPassword', function transportNeedPassword(exception) {
-       var loadingTask = this.loadingTask;
+      messageHandler.on('PasswordRequest', function transportPasswordRequest(exception) {
+       this._passwordCapability = createPromiseCapability();
        if (loadingTask.onPassword) {
-        return loadingTask.onPassword(updatePassword, PasswordResponses.NEED_PASSWORD);
+        var updatePassword = function (password) {
+         this._passwordCapability.resolve({ password: password });
+        }.bind(this);
+        loadingTask.onPassword(updatePassword, exception.code);
+       } else {
+        this._passwordCapability.reject(new PasswordException(exception.message, exception.code));
        }
-       loadingTask._capability.reject(new PasswordException(exception.message, exception.code));
+       return this._passwordCapability.promise;
       }, this);
-      messageHandler.on('IncorrectPassword', function transportIncorrectPassword(exception) {
-       var loadingTask = this.loadingTask;
-       if (loadingTask.onPassword) {
-        return loadingTask.onPassword(updatePassword, PasswordResponses.INCORRECT_PASSWORD);
-       }
+      messageHandler.on('PasswordException', function transportPasswordException(exception) {
        loadingTask._capability.reject(new PasswordException(exception.message, exception.code));
       }, this);
       messageHandler.on('InvalidPDF', function transportInvalidPDF(exception) {
        this.loadingTask._capability.reject(new InvalidPDFException(exception.message));
       }, this);
       messageHandler.on('MissingPDF', function transportMissingPDF(exception) {
        this.loadingTask._capability.reject(new MissingPDFException(exception.message));
       }, this);
@@ -6715,30 +6717,28 @@
       obj.resolved = true;
       obj.data = data;
       obj.capability.resolve(data);
      },
      isResolved: function PDFObjects_isResolved(objId) {
       var objs = this.objs;
       if (!objs[objId]) {
        return false;
-      } else {
-       return objs[objId].resolved;
-      }
+      }
+      return objs[objId].resolved;
      },
      hasData: function PDFObjects_hasData(objId) {
       return this.isResolved(objId);
      },
      getData: function PDFObjects_getData(objId) {
       var objs = this.objs;
       if (!objs[objId] || !objs[objId].resolved) {
        return null;
-      } else {
-       return objs[objId].data;
-      }
+      }
+      return objs[objId].data;
      },
      clear: function PDFObjects_clear() {
       this.objs = Object.create(null);
      }
     };
     return PDFObjects;
    }();
    var RenderTask = function RenderTaskClosure() {
--- a/browser/extensions/pdfjs/content/build/pdf.worker.js
+++ b/browser/extensions/pdfjs/content/build/pdf.worker.js
@@ -18,18 +18,18 @@
   define('pdfjs-dist/build/pdf.worker', ['exports'], factory);
  } else if (typeof exports !== 'undefined') {
   factory(exports);
  } else {
   factory(root['pdfjsDistBuildPdfWorker'] = {});
  }
 }(this, function (exports) {
  'use strict';
- var pdfjsVersion = '1.6.418';
- var pdfjsBuild = '59afb4b9';
+ var pdfjsVersion = '1.6.454';
+ var pdfjsBuild = 'b8cd1433';
  var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
  var pdfjsLibs = {};
  (function pdfjsWrapper() {
   (function (root, factory) {
    factory(root.pdfjsCoreArithmeticDecoder = {});
   }(this, function (exports) {
    var ArithmeticDecoder = function ArithmeticDecoderClosure() {
     var QeTable = [
@@ -4712,17 +4712,17 @@
      }
      types[i] = charType;
     }
     if (numBidi === 0) {
      isLTR = true;
      return createBidiText(str, isLTR);
     }
     if (startLevel === -1) {
-     if (strLength / numBidi < 0.3) {
+     if (numBidi / strLength < 0.3) {
       isLTR = true;
       startLevel = 0;
      } else {
       isLTR = false;
       startLevel = 1;
      }
     }
     var levels = [];
@@ -5669,20 +5669,19 @@
         value = value << 8 | dict[pos++];
         return value;
        } else if (value >= 32 && value <= 246) {
         return value - 139;
        } else if (value >= 247 && value <= 250) {
         return (value - 247) * 256 + dict[pos++] + 108;
        } else if (value >= 251 && value <= 254) {
         return -((value - 251) * 256) - dict[pos++] - 108;
-       } else {
-        warn('CFFParser_parseDict: "' + value + '" is a reserved command.');
-        return NaN;
-       }
+       }
+       warn('CFFParser_parseDict: "' + value + '" is a reserved command.');
+       return NaN;
       }
       function parseFloatOperand() {
        var str = '';
        var eof = 15;
        var lookup = [
         '0',
         '1',
         '2',
@@ -6954,19 +6953,18 @@
       }
       this.compilePrivateDicts([cff.topDict], [topDictTracker], output);
       output.add([0]);
       return output.data;
      },
      encodeNumber: function CFFCompiler_encodeNumber(value) {
       if (parseFloat(value) === parseInt(value, 10) && !isNaN(value)) {
        return this.encodeInteger(value);
-      } else {
-       return this.encodeFloat(value);
-      }
+      }
+      return this.encodeFloat(value);
      },
      encodeFloat: function CFFCompiler_encodeFloat(num) {
       var value = num.toString();
       var m = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(value);
       if (m) {
        var epsilon = parseFloat('1e' + ((m[2] ? +m[2] : 0) + m[1].length));
        value = (Math.round(num * epsilon) / epsilon).toString();
       }
@@ -14244,22 +14242,21 @@
      _isColorConversionNeeded: function isColorConversionNeeded() {
       if (this.adobe && this.adobe.transformCode) {
        return true;
       } else if (this.numComponents === 3) {
        if (!this.adobe && this.colorTransform === 0) {
         return false;
        }
        return true;
-      } else {
-       if (!this.adobe && this.colorTransform === 1) {
-        return true;
-       }
-       return false;
-      }
+      }
+      if (!this.adobe && this.colorTransform === 1) {
+       return true;
+      }
+      return false;
      },
      _convertYccToRgb: function convertYccToRgb(data) {
       var Y, Cb, Cr;
       for (var i = 0, length = data.length; i < length; i += 3) {
        Y = data[i];
        Cb = data[i + 1];
        Cr = data[i + 2];
        data[i] = clamp0to255(Y - 179.456 + 1.402 * Cr);
@@ -14333,19 +14330,18 @@
        }
        return rgbData;
       } else if (this.numComponents === 3 && this._isColorConversionNeeded()) {
        return this._convertYccToRgb(data);
       } else if (this.numComponents === 4) {
        if (this._isColorConversionNeeded()) {
         if (forceRGBoutput) {
          return this._convertYcckToRgb(data);
-        } else {
-         return this._convertYcckToCmyk(data);
-        }
+        }
+        return this._convertYcckToCmyk(data);
        } else if (forceRGBoutput) {
         return this._convertCmykToRgb(data);
        }
       }
       return data;
      }
     };
     return JpegImage;
@@ -23524,22 +23520,24 @@
      this.eof = !rawBytes.length;
      if (this.eof) {
       return;
      }
      var inbuf = 0, outbuf = 0;
      var inbits = 0, outbits = 0;
      var pos = bufferLength;
      var i;
-     if (bits === 1) {
+     if (bits === 1 && colors === 1) {
       for (i = 0; i < rowBytes; ++i) {
-       var c = rawBytes[i];
-       inbuf = inbuf << 8 | c;
-       buffer[pos++] = (c ^ inbuf >> colors) & 0xFF;
-       inbuf &= 0xFFFF;
+       var c = rawBytes[i] ^ inbuf;
+       c ^= c >> 1;
+       c ^= c >> 2;
+       c ^= c >> 4;
+       inbuf = (c & 1) << 7;
+       buffer[pos++] = c;
       }
      } else if (bits === 8) {
       for (i = 0; i < colors; ++i) {
        buffer[pos++] = rawBytes[i];
       }
       for (; i < rowBytes; ++i) {
        buffer[pos] = buffer[pos - colors] + rawBytes[i];
        pos++;
@@ -33584,19 +33582,18 @@
         1 / unitsPerEm,
         0,
         0,
         1 / unitsPerEm,
         0,
         0
        ];
        return new TrueTypeCompiled(parseGlyfTable(glyf, loca, indexToLocFormat), cmap, fontMatrix);
-      } else {
-       return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap);
-      }
+      }
+      return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap);
      }
     };
    }();
    exports.FontRendererFactory = FontRendererFactory;
   }));
   (function (root, factory) {
    factory(root.pdfjsCoreParser = {}, root.pdfjsSharedUtil, root.pdfjsCorePrimitives, root.pdfjsCoreStream);
   }(this, function (exports, sharedUtil, corePrimitives, coreStream) {
@@ -38329,17 +38326,17 @@
        }
        if (table.length === 0) {
         continue;
        }
        tables[table.tag] = table;
       }
       var isTrueType = !tables['CFF '];
       if (!isTrueType) {
-       if (header.version === 'OTTO' && properties.type !== 'CIDFontType2' || !tables['head'] || !tables['hhea'] || !tables['maxp'] || !tables['post']) {
+       if (header.version === 'OTTO' && !properties.composite || !tables['head'] || !tables['hhea'] || !tables['maxp'] || !tables['post']) {
         cffFile = new Stream(tables['CFF '].data);
         cff = new CFFFont(cffFile, properties);
         adjustWidths(properties);
         return this.convert(name, cff, properties);
        }
        delete tables['glyf'];
        delete tables['loca'];
        delete tables['fpgm'];
@@ -38431,17 +38428,17 @@
        if (!skipToUnicode && charCode >= 0 && toUnicode.has(charCode)) {
         return true;
        }
        if (widths && widthCode >= 0 && isNum(widths[widthCode])) {
         return true;
        }
        return false;
       }
-      if (properties.type === 'CIDFontType2') {
+      if (properties.composite) {
        var cidToGidMap = properties.cidToGidMap || [];
        var isCidToGidMapEmpty = cidToGidMap.length === 0;
        properties.cMap.forEach(function (charCode, cid) {
         assert(cid <= 0xffff, 'Max size of CID is 65,535');
         var glyphId = -1;
         if (isCidToGidMapEmpty) {
          glyphId = cid;
         } else if (cidToGidMap[cid] !== undefined) {
@@ -41333,21 +41330,23 @@
       info('Invalid Range, falling back to defaults');
       this.amin = -100;
       this.amax = 100;
       this.bmin = -100;
       this.bmax = 100;
      }
     }
     function fn_g(x) {
+     var result;
      if (x >= 6 / 29) {
-      return x * x * x;
+      result = x * x * x;
      } else {
-      return 108 / 841 * (x - 4 / 29);
-     }
+      result = 108 / 841 * (x - 4 / 29);
+     }
+     return result;
     }
     function decode(value, high1, low2, high2) {
      return low2 + value * (high2 - low2) / high1;
     }
     function convertToRgb(cs, src, srcOffset, maxVal, dest, destOffset) {
      var Ls = src[srcOffset];
      var as = src[srcOffset + 1];
      var bs = src[srcOffset + 2];
@@ -41419,19 +41418,18 @@
    var ColorSpace = coreColorSpace.ColorSpace;
    var DecodeStream = coreStream.DecodeStream;
    var JpegStream = coreStream.JpegStream;
    var JpxImage = coreJpx.JpxImage;
    var PDFImage = function PDFImageClosure() {
     function handleImageData(image, nativeDecoder) {
      if (nativeDecoder && nativeDecoder.canDecode(image)) {
       return nativeDecoder.decode(image);
-     } else {
-      return Promise.resolve(image);
-     }
+     }
+     return Promise.resolve(image);
     }
     function decodeAndClamp(value, addend, coefficient, max) {
      value = addend + value * coefficient;
      return value < 0 ? 0 : value > max ? max : value;
     }
     function resizeImageMask(src, bpc, w1, h1, w2, h2) {
      var length = w2 * h2;
      var dest = bpc <= 8 ? new Uint8Array(length) : bpc <= 16 ? new Uint16Array(length) : new Uint32Array(length);
@@ -42493,22 +42491,22 @@
       if (isString(dest) || isArray(dest)) {
        resultObj.dest = dest;
       }
      }
     };
     return Catalog;
    }();
    var XRef = function XRefClosure() {
-    function XRef(stream, password) {
+    function XRef(stream, pdfManager) {
      this.stream = stream;
+     this.pdfManager = pdfManager;
      this.entries = [];
      this.xrefstms = Object.create(null);
      this.cache = [];
-     this.password = password;
      this.stats = {
       streamTypes: [],
       fontTypes: []
      };
     }
     XRef.prototype = {
      setStartXRef: function XRef_setStartXRef(startXRef) {
       this.startXRefQueue = [startXRef];
@@ -42519,21 +42517,21 @@
        trailerDict = this.readXRef();
       } else {
        warn('Indexing all PDF objects');
        trailerDict = this.indexObjects();
       }
       trailerDict.assignXref(this);
       this.trailer = trailerDict;
       var encrypt = trailerDict.get('Encrypt');
-      if (encrypt) {
+      if (isDict(encrypt)) {
        var ids = trailerDict.get('ID');
        var fileId = ids && ids.length ? ids[0] : '';
        encrypt.suppressEncryption = true;
-       this.encrypt = new CipherTransformFactory(encrypt, fileId, this.password);
+       this.encrypt = new CipherTransformFactory(encrypt, fileId, this.pdfManager.password);
       }
       if (!(this.root = trailerDict.get('Root'))) {
        error('Invalid root reference');
       }
      },
      processXRefTable: function XRef_processXRefTable(parser) {
       if (!('tableState' in this)) {
        this.tableState = {
@@ -43173,19 +43171,18 @@
      } else if (dict.has('F')) {
       return dict.get('F');
      } else if (dict.has('Unix')) {
       return dict.get('Unix');
      } else if (dict.has('Mac')) {
       return dict.get('Mac');
      } else if (dict.has('DOS')) {
       return dict.get('DOS');
-     } else {
-      return null;
-     }
+     }
+     return null;
     }
     FileSpec.prototype = {
      get filename() {
       if (!this._filename && this.root) {
        var filename = pickPlatformItem(this.root) || 'unnamed';
        this._filename = stringToPDFString(filename).replace(/\\\\/g, '\\').replace(/\\\//g, '/').replace(/\\/g, '/');
       }
       return this._filename;
@@ -44278,23 +44275,22 @@
     NativeImageDecoder.isDecodable = function NativeImageDecoder_isDecodable(image, xref, res) {
      var dict = image.dict;
      if (dict.has('DecodeParms') || dict.has('DP')) {
       return false;
      }
      var cs = ColorSpace.parse(dict.get('ColorSpace', 'CS'), xref, res);
      return (cs.numComps === 1 || cs.numComps === 3) && cs.isDefaultDecode(dict.getArray('Decode', 'D'));
     };
-    function PartialEvaluator(pdfManager, xref, handler, pageIndex, uniquePrefix, idCounters, fontCache, options) {
+    function PartialEvaluator(pdfManager, xref, handler, pageIndex, idFactory, fontCache, options) {
      this.pdfManager = pdfManager;
      this.xref = xref;
      this.handler = handler;
      this.pageIndex = pageIndex;
-     this.uniquePrefix = uniquePrefix;
-     this.idCounters = idCounters;
+     this.idFactory = idFactory;
      this.fontCache = fontCache;
      this.options = options || DefaultPartialEvaluatorOptions;
     }
     var TIME_SLOT_DURATION_MS = 20;
     var CHECK_TIME_EVERY = 100;
     function TimeSlotManager() {
      this.reset();
     }
@@ -44447,18 +44443,17 @@
       var mask = dict.get('Mask') || false;
       var SMALL_IMAGE_DIMENSIONS = 200;
       if (inline && !softMask && !mask && !(image instanceof JpegStream) && w + h < SMALL_IMAGE_DIMENSIONS) {
        var imageObj = new PDFImage(this.xref, resources, image, inline, null, null);
        imgData = imageObj.createImageData(true);
        operatorList.addOp(OPS.paintInlineImageXObject, [imgData]);
        return;
       }
-      var uniquePrefix = this.uniquePrefix || '';
-      var objId = 'img_' + uniquePrefix + ++this.idCounters.obj;
+      var objId = 'img_' + this.idFactory.createObjId();
       operatorList.addDependency(objId);
       args = [
        objId,
        w,
        h
       ];
       if (!softMask && !mask && image instanceof JpegStream && NativeImageDecoder.isSupported(image, this.xref, resources)) {
        operatorList.addOp(OPS.paintJpegXObject, args);
@@ -44732,17 +44727,17 @@
         fontAliases[hash].aliasRef = fontRef;
        }
        fontID = fontAliases[hash].fontID;
       }
       if (fontRefIsRef) {
        this.fontCache.put(fontRef, fontCapability.promise);
       } else {
        if (!fontID) {
-        fontID = (this.uniquePrefix || 'F_') + ++this.idCounters.obj;
+        fontID = this.idFactory.createObjId();
        }
        this.fontCache.put('id_' + fontID, fontCapability.promise);
       }
       assert(fontID, 'The "fontID" must be defined.');
       font.loadedName = 'g_' + this.pdfManager.docId + '_f' + fontID;
       font.translated = fontCapability.promise;
       var translatedPromise;
       try {
@@ -44798,19 +44793,18 @@
         var color = cs.base ? cs.base.getRgb(args, 0) : null;
         return this.handleTilingType(fn, color, resources, pattern, dict, operatorList, task);
        } else if (typeNum === SHADING_PATTERN) {
         var shading = dict.get('Shading');
         var matrix = dict.getArray('Matrix');
         pattern = Pattern.parseShading(shading, matrix, xref, resources, this.handler);
         operatorList.addOp(fn, pattern.getIR());
         return Promise.resolve();
-       } else {
-        return Promise.reject('Unknown PatternType: ' + typeNum);
-       }
+       }
+       return Promise.reject('Unknown PatternType: ' + typeNum);
       }
       operatorList.addOp(fn, args);
       return Promise.resolve();
      },
      getOperatorList: function PartialEvaluator_getOperatorList(stream, task, resources, operatorList, initialState) {
       var self = this;
       var xref = this.xref;
       var imageCache = Object.create(null);
@@ -46754,27 +46748,26 @@
          }
         } else if (argsLength > numArgs) {
          info('Command ' + fn + ': expected [0,' + numArgs + '] args, but received ' + argsLength + ' args.');
         }
         this.preprocessCommand(fn, args);
         operation.fn = fn;
         operation.args = args;
         return true;
-       } else {
-        if (isEOF(obj)) {
-         return false;
-        }
-        if (obj !== null) {
-         if (args === null) {
-          args = [];
-         }
-         args.push(obj);
-         assert(args.length <= 33, 'Too many arguments');
-        }
+       }
+       if (isEOF(obj)) {
+        return false;
+       }
+       if (obj !== null) {
+        if (args === null) {
+         args = [];
+        }
+        args.push(obj);
+        assert(args.length <= 33, 'Too many arguments');
        }
       }
      },
      preprocessCommand: function EvaluatorPreprocessor_preprocessCommand(fn, args) {
       switch (fn | 0) {
       case OPS.save:
        this.stateManager.save();
        break;
@@ -47139,22 +47132,22 @@
    var ColorSpace = coreColorSpace.ColorSpace;
    var Catalog = coreObj.Catalog;
    var ObjectLoader = coreObj.ObjectLoader;
    var FileSpec = coreObj.FileSpec;
    var OperatorList = coreEvaluator.OperatorList;
    function AnnotationFactory() {
    }
    AnnotationFactory.prototype = {
-    create: function AnnotationFactory_create(xref, ref, pdfManager, uniquePrefix, idCounters) {
+    create: function AnnotationFactory_create(xref, ref, pdfManager, idFactory) {
      var dict = xref.fetchIfRef(ref);
      if (!isDict(dict)) {
       return;
      }
-     var id = isRef(ref) ? ref.toString() : 'annot_' + (uniquePrefix || '') + ++idCounters.obj;
+     var id = isRef(ref) ? ref.toString() : 'annot_' + idFactory.createObjId();
      var subtype = dict.get('Subtype');
      subtype = isName(subtype) ? subtype.name : null;
      var parameters = {
       xref: xref,
       dict: dict,
       ref: isRef(ref) ? ref : null,
       subtype: subtype,
       id: id,
@@ -47844,20 +47837,25 @@
     ];
     function Page(pdfManager, xref, pageIndex, pageDict, ref, fontCache) {
      this.pdfManager = pdfManager;
      this.pageIndex = pageIndex;
      this.pageDict = pageDict;
      this.xref = xref;
      this.ref = ref;
      this.fontCache = fontCache;
-     this.uniquePrefix = 'p' + this.pageIndex + '_';
-     this.idCounters = { obj: 0 };
      this.evaluatorOptions = pdfManager.evaluatorOptions;
      this.resourcesPromise = null;
+     var uniquePrefix = 'p' + this.pageIndex + '_';
+     var idCounters = { obj: 0 };
+     this.idFactory = {
+      createObjId: function () {
+       return uniquePrefix + ++idCounters.obj;
+      }
+     };
     }
     Page.prototype = {
      getPageProp: function Page_getPageProp(key) {
       return this.pageDict.get(key);
      },
      getInheritedPageProp: function Page_getInheritedPageProp(key, getArray) {
       var dict = this.pageDict, valueArray = null, loopCount = 0;
       var MAX_LOOP_COUNT = 100;
@@ -47964,17 +47962,17 @@
       var resourcesPromise = this.loadResources([
        'ExtGState',
        'ColorSpace',
        'Pattern',
        'Shading',
        'XObject',
        'Font'
       ]);
-      var partialEvaluator = new PartialEvaluator(pdfManager, this.xref, handler, this.pageIndex, this.uniquePrefix, this.idCounters, this.fontCache, this.evaluatorOptions);
+      var partialEvaluator = new PartialEvaluator(pdfManager, this.xref, handler, this.pageIndex, this.idFactory, this.fontCache, this.evaluatorOptions);
       var dataPromises = Promise.all([
        contentStreamPromise,
        resourcesPromise
       ]);
       var pageListPromise = dataPromises.then(function (data) {
        var contentStream = data[0];
        var opList = new OperatorList(intent, handler, self.pageIndex);
        handler.send('StartRenderPage', {
@@ -48020,17 +48018,17 @@
        'Font'
       ]);
       var dataPromises = Promise.all([
        contentStreamPromise,
        resourcesPromise
       ]);
       return dataPromises.then(function (data) {
        var contentStream = data[0];
-       var partialEvaluator = new PartialEvaluator(pdfManager, self.xref, handler, self.pageIndex, self.uniquePrefix, self.idCounters, self.fontCache, self.evaluatorOptions);
+       var partialEvaluator = new PartialEvaluator(pdfManager, self.xref, handler, self.pageIndex, self.idFactory, self.fontCache, self.evaluatorOptions);
        return partialEvaluator.getTextContent(contentStream, task, self.resources, null, normalizeWhitespace, combineTextItems);
       });
      },
      getAnnotationsData: function Page_getAnnotationsData(intent) {
       var annotations = this.annotations;
       var annotationsData = [];
       for (var i = 0, n = annotations.length; i < n; ++i) {
        if (intent) {
@@ -48043,44 +48041,42 @@
       return annotationsData;
      },
      get annotations() {
       var annotations = [];
       var annotationRefs = this.getInheritedPageProp('Annots') || [];
       var annotationFactory = new AnnotationFactory();
       for (var i = 0, n = annotationRefs.length; i < n; ++i) {
        var annotationRef = annotationRefs[i];
-       var annotation = annotationFactory.create(this.xref, annotationRef, this.pdfManager, this.uniquePrefix, this.idCounters);
+       var annotation = annotationFactory.create(this.xref, annotationRef, this.pdfManager, this.idFactory);
        if (annotation) {
         annotations.push(annotation);
        }
       }
       return shadow(this, 'annotations', annotations);
      }
     };
     return Page;
    }();
    var PDFDocument = function PDFDocumentClosure() {
     var FINGERPRINT_FIRST_BYTES = 1024;
     var EMPTY_FINGERPRINT = '\x00\x00\x00\x00\x00\x00\x00' + '\x00\x00\x00\x00\x00\x00\x00\x00\x00';
-    function PDFDocument(pdfManager, arg, password) {
+    function PDFDocument(pdfManager, arg) {
+     var stream;
      if (isStream(arg)) {
-      init.call(this, pdfManager, arg, password);
+      stream = arg;
      } else if (isArrayBuffer(arg)) {
-      init.call(this, pdfManager, new Stream(arg), password);
+      stream = new Stream(arg);
      } else {
       error('PDFDocument: Unknown argument type');
      }
-    }
-    function init(pdfManager, stream, password) {
      assert(stream.length > 0, 'stream must have data');
      this.pdfManager = pdfManager;
      this.stream = stream;
-     var xref = new XRef(this.stream, password, pdfManager);
-     this.xref = xref;
+     this.xref = new XRef(stream, pdfManager);
     }
     function find(stream, needle, limit, backwards) {
      var pos = stream.pos;
      var end = stream.end;
      var strBuf = [];
      if (pos + limit > end) {
       limit = end - pos;
      }
@@ -48303,16 +48299,19 @@
    var BasePdfManager = function BasePdfManagerClosure() {
     function BasePdfManager() {
      throw new Error('Cannot initialize BaseManagerManager');
     }
     BasePdfManager.prototype = {
      get docId() {
       return this._docId;
      },
+     get password() {
+      return this._password;
+     },
      get docBaseUrl() {
       var docBaseUrl = null;
       if (this._docBaseUrl) {
        var absoluteUrl = createValidAbsoluteUrl(this._docBaseUrl);
        if (absoluteUrl) {
         docBaseUrl = absoluteUrl.href;
        } else {
         warn('Invalid absolute docBaseUrl: "' + this._docBaseUrl + '".');
@@ -48346,38 +48345,32 @@
      },
      requestLoadedStream: function BasePdfManager_requestLoadedStream() {
       return new NotImplementedException();
      },
      sendProgressiveData: function BasePdfManager_sendProgressiveData(chunk) {
       return new NotImplementedException();
      },
      updatePassword: function BasePdfManager_updatePassword(password) {
-      this.pdfDocument.xref.password = this.password = password;
-      if (this._passwordChangedCapability) {
-       this._passwordChangedCapability.resolve();
-      }
-     },
-     passwordChanged: function BasePdfManager_passwordChanged() {
-      this._passwordChangedCapability = createPromiseCapability();
-      return this._passwordChangedCapability.promise;
+      this._password = password;
      },
      terminate: function BasePdfManager_terminate() {
       return new NotImplementedException();
      }
     };
     return BasePdfManager;
    }();
    var LocalPdfManager = function LocalPdfManagerClosure() {
     function LocalPdfManager(docId, data, password, evaluatorOptions, docBaseUrl) {
      this._docId = docId;
+     this._password = password;
      this._docBaseUrl = docBaseUrl;
      this.evaluatorOptions = evaluatorOptions;
      var stream = new Stream(data);
-     this.pdfDocument = new PDFDocument(this, stream, password);
+     this.pdfDocument = new PDFDocument(this, stream);
      this._loadedStreamCapability = createPromiseCapability();
      this._loadedStreamCapability.resolve(stream);
     }
     Util.inherit(LocalPdfManager, BasePdfManager, {
      ensure: function LocalPdfManager_ensure(obj, prop, args) {
       return new Promise(function (resolve, reject) {
        try {
         var value = obj[prop];
@@ -48392,42 +48385,41 @@
         reject(e);
        }
       });
      },
      requestRange: function LocalPdfManager_requestRange(begin, end) {
       return Promise.resolve();
      },
      requestLoadedStream: function LocalPdfManager_requestLoadedStream() {
-      return;
      },
      onLoadedStream: function LocalPdfManager_onLoadedStream() {
       return this._loadedStreamCapability.promise;
      },
      terminate: function LocalPdfManager_terminate() {
-      return;
      }
     });
     return LocalPdfManager;
    }();
    var NetworkPdfManager = function NetworkPdfManagerClosure() {
     function NetworkPdfManager(docId, pdfNetworkStream, args, evaluatorOptions, docBaseUrl) {
      this._docId = docId;
+     this._password = args.password;
      this._docBaseUrl = docBaseUrl;
      this.msgHandler = args.msgHandler;
      this.evaluatorOptions = evaluatorOptions;
      var params = {
       msgHandler: args.msgHandler,
       url: args.url,
       length: args.length,
       disableAutoFetch: args.disableAutoFetch,
       rangeChunkSize: args.rangeChunkSize
      };
      this.streamManager = new ChunkedStreamManager(pdfNetworkStream, params);
-     this.pdfDocument = new PDFDocument(this, this.streamManager.getStream(), args.password);
+     this.pdfDocument = new PDFDocument(this, this.streamManager.getStream());
     }
     Util.inherit(NetworkPdfManager, BasePdfManager, {
      ensure: function NetworkPdfManager_ensure(obj, prop, args) {
       var pdfManager = this;
       return new Promise(function (resolve, reject) {
        function ensureHelper() {
         try {
          var result;
@@ -48919,38 +48911,58 @@
        pdfManagerCapability.reject(e);
        cancelXHRs = null;
       });
       cancelXHRs = function () {
        pdfStream.cancelAllRequests('abort');
       };
       return pdfManagerCapability.promise;
      }
-     var setupDoc = function (data) {
-      var onSuccess = function (doc) {
+     function setupDoc(data) {
+      function onSuccess(doc) {
        ensureNotTerminated();
        handler.send('GetDoc', { pdfInfo: doc });
-      };
-      var onFailure = function (e) {
+      }
+      function onFailure(e) {
        if (e instanceof PasswordException) {
-        if (e.code === PasswordResponses.NEED_PASSWORD) {
-         handler.send('NeedPassword', e);
-        } else if (e.code === PasswordResponses.INCORRECT_PASSWORD) {
-         handler.send('IncorrectPassword', e);
-        }
+        var task = new WorkerTask('PasswordException: response ' + e.code);
+        startWorkerTask(task);
+        handler.sendWithPromise('PasswordRequest', e).then(function (data) {
+         finishWorkerTask(task);
+         pdfManager.updatePassword(data.password);
+         pdfManagerReady();
+        }).catch(function (ex) {
+         finishWorkerTask(task);
+         handler.send('PasswordException', ex);
+        }.bind(null, e));
        } else if (e instanceof InvalidPDFException) {
         handler.send('InvalidPDF', e);
        } else if (e instanceof MissingPDFException) {
         handler.send('MissingPDF', e);
        } else if (e instanceof UnexpectedResponseException) {
         handler.send('UnexpectedResponse', e);
        } else {
         handler.send('UnknownError', new UnknownErrorException(e.message, e.toString()));
        }
-      };
+      }
+      function pdfManagerReady() {
+       ensureNotTerminated();
+       loadDocument(false).then(onSuccess, function loadFailure(ex) {
+        ensureNotTerminated();
+        if (!(ex instanceof XRefParseException)) {
+         onFailure(ex);
+         return;
+        }
+        pdfManager.requestLoadedStream();
+        pdfManager.onLoadedStream().then(function () {
+         ensureNotTerminated();
+         loadDocument(true).then(onSuccess, onFailure);
+        });
+       }, onFailure);
+      }
       ensureNotTerminated();
       var cMapOptions = {
        url: data.cMapUrl === undefined ? null : data.cMapUrl,
        packed: data.cMapPacked === true
       };
       var evaluatorOptions = {
        forceDataSchema: data.disableCreateObjectURL,
        maxImageSize: data.maxImageSize === undefined ? -1 : data.maxImageSize,
@@ -48962,35 +48974,18 @@
         newPdfManager.terminate();
         throw new Error('Worker was terminated');
        }
        pdfManager = newPdfManager;
        handler.send('PDFManagerReady', null);
        pdfManager.onLoadedStream().then(function (stream) {
         handler.send('DataLoaded', { length: stream.bytes.byteLength });
        });
-      }).then(function pdfManagerReady() {
-       ensureNotTerminated();
-       loadDocument(false).then(onSuccess, function loadFailure(ex) {
-        ensureNotTerminated();
-        if (!(ex instanceof XRefParseException)) {
-         if (ex instanceof PasswordException) {
-          pdfManager.passwordChanged().then(pdfManagerReady);
-         }
-         onFailure(ex);
-         return;
-        }
-        pdfManager.requestLoadedStream();
-        pdfManager.onLoadedStream().then(function () {
-         ensureNotTerminated();
-         loadDocument(true).then(onSuccess, onFailure);
-        });
-       }, onFailure);
-      }, onFailure);
-     };
+      }).then(pdfManagerReady, onFailure);
+     }
      handler.on('GetPage', function wphSetupGetPage(data) {
       return pdfManager.getPage(data.pageIndex).then(function (page) {
        var rotatePromise = pdfManager.ensure(page, 'rotate');
        var refPromise = pdfManager.ensure(page, 'ref');
        var userUnitPromise = pdfManager.ensure(page, 'userUnit');
        var viewPromise = pdfManager.ensure(page, 'view');
        return Promise.all([
         rotatePromise,
@@ -49040,19 +49035,16 @@
       pdfManager.requestLoadedStream();
       return pdfManager.onLoadedStream().then(function (stream) {
        return stream.bytes;
       });
      });
      handler.on('GetStats', function wphSetupGetStats(data) {
       return pdfManager.pdfDocument.xref.stats;
      });
-     handler.on('UpdatePassword', function wphSetupUpdatePassword(data) {
-      pdfManager.updatePassword(data);
-     });
      handler.on('GetAnnotations', function wphSetupGetAnnotations(data) {
       return pdfManager.getPage(data.pageIndex).then(function (page) {
        return pdfManager.ensure(page, 'getAnnotationsData', [data.intent]);
       });
      });
      handler.on('RenderPageRequest', function wphSetupRenderPage(data) {
       var pageIndex = data.pageIndex;
       pdfManager.getPage(pageIndex).then(function (page) {
--- a/browser/extensions/pdfjs/content/web/viewer.html
+++ b/browser/extensions/pdfjs/content/web/viewer.html
@@ -33,17 +33,16 @@ See https://github.com/adobe-type-tools/
 
 
     <link rel="stylesheet" href="viewer.css">
 
 
 
 
 
-
     <script src="viewer.js"></script>
 
   </head>
 
   <body tabindex="1" class="loadingInProgress">
     <div id="outerContainer">
 
       <div id="sidebarContainer">
--- a/browser/extensions/pdfjs/content/web/viewer.js
+++ b/browser/extensions/pdfjs/content/web/viewer.js
@@ -353,51 +353,56 @@ var pdfjsWebLibs;
     return PDFRenderingQueue;
    }();
    exports.RenderingStates = RenderingStates;
    exports.PDFRenderingQueue = PDFRenderingQueue;
   }));
   (function (root, factory) {
    factory(root.pdfjsWebPreferences = {});
   }(this, function (exports) {
-   var defaultPreferences;
-   defaultPreferences = Promise.resolve({
-    "showPreviousViewOnLoad": true,
-    "defaultZoomValue": "",
-    "sidebarViewOnLoad": 0,
-    "enableHandToolOnLoad": false,
-    "enableWebGL": false,
-    "pdfBugEnabled": false,
-    "disableRange": false,
-    "disableStream": false,
-    "disableAutoFetch": false,
-    "disableFontFace": false,
-    "disableTextLayer": false,
-    "useOnlyCssZoom": false,
-    "externalLinkTarget": 0,
-    "enhanceTextSelection": false,
-    "renderer": "canvas",
-    "renderInteractiveForms": false,
-    "disablePageLabels": false
-   });
+   var defaultPreferences = null;
+   function getDefaultPreferences() {
+    if (!defaultPreferences) {
+     defaultPreferences = Promise.resolve({
+      "showPreviousViewOnLoad": true,
+      "defaultZoomValue": "",
+      "sidebarViewOnLoad": 0,
+      "enableHandToolOnLoad": false,
+      "enableWebGL": false,
+      "pdfBugEnabled": false,
+      "disableRange": false,
+      "disableStream": false,
+      "disableAutoFetch": false,
+      "disableFontFace": false,
+      "disableTextLayer": false,
+      "useOnlyCssZoom": false,
+      "externalLinkTarget": 0,
+      "enhanceTextSelection": false,
+      "renderer": "canvas",
+      "renderInteractiveForms": false,
+      "disablePageLabels": false
+     });
+    }
+    return defaultPreferences;
+   }
    function cloneObj(obj) {
     var result = {};
     for (var i in obj) {
      if (Object.prototype.hasOwnProperty.call(obj, i)) {
       result[i] = obj[i];
      }
     }
     return result;
    }
    var Preferences = {
     prefs: null,
     isInitializedPromiseResolved: false,
     initializedPromise: null,
     initialize: function preferencesInitialize() {
-     return this.initializedPromise = defaultPreferences.then(function (defaults) {
+     return this.initializedPromise = getDefaultPreferences().then(function (defaults) {
       Object.defineProperty(this, 'defaults', {
        value: Object.freeze(defaults),
        writable: false,
        enumerable: true,
        configurable: false
       });
       this.prefs = cloneObj(defaults);
       return this._readFromStorage(defaults);
@@ -1127,33 +1132,35 @@ var pdfjsWebLibs;
      if (x_ <= p / q) {
       c = p;
       d = q;
      } else {
       a = p;
       b = q;
      }
     }
+    var result;
     if (x_ - a / b < c / d - x_) {
-     return x_ === x ? [
+     result = x_ === x ? [
       a,
       b
      ] : [
       b,
       a
      ];
     } else {
-     return x_ === x ? [
+     result = x_ === x ? [
       c,
       d
      ] : [
       d,
       c
      ];
     }
+    return result;
    }
    function roundToDivide(x, div) {
     var r = x % div;
     return r === 0 ? x : Math.round(x - r + div);
    }
    function getVisibleElements(scrollEl, views, sortByVisibility) {
     var top = scrollEl.scrollTop, bottom = top + scrollEl.clientHeight;
     var left = scrollEl.scrollLeft, right = left + scrollEl.clientWidth;
@@ -1696,22 +1703,21 @@ var pdfjsWebLibs;
       var fileSize = this.rawFileSize, kb = fileSize / 1024;
       if (!kb) {
        return;
       } else if (kb < 1024) {
        return mozL10n.get('document_properties_kb', {
         size_kb: (+kb.toPrecision(3)).toLocaleString(),
         size_b: fileSize.toLocaleString()
        }, '{{size_kb}} KB ({{size_b}} bytes)');
-      } else {
-       return mozL10n.get('document_properties_mb', {
-        size_mb: (+(kb / 1024).toPrecision(3)).toLocaleString(),
-        size_b: fileSize.toLocaleString()
-       }, '{{size_mb}} MB ({{size_b}} bytes)');
-      }
+      }
+      return mozL10n.get('document_properties_mb', {
+       size_mb: (+(kb / 1024).toPrecision(3)).toLocaleString(),
+       size_b: fileSize.toLocaleString()
+      }, '{{size_mb}} MB ({{size_b}} bytes)');
      },
      _parseDate: function PDFDocumentProperties_parseDate(inputDate) {
       var dateToParse = inputDate;
       if (dateToParse === undefined) {
        return '';
       }
       if (dateToParse.substring(0, 2) === 'D:') {
        dateToParse = dateToParse.substring(2);
@@ -2022,27 +2028,26 @@ var pdfjsWebLibs;
       var offset = this.offset;
       var numMatches = matches.length;
       var previous = this.state.findPrevious;
       if (numMatches) {
        this.hadMatch = true;
        offset.matchIdx = previous ? numMatches - 1 : 0;
        this.updateMatch(true);
        return true;
-      } else {
-       this.advanceOffsetPage(previous);
-       if (offset.wrapped) {
-        offset.matchIdx = null;
-        if (this.pagesToSearch < 0) {
-         this.updateMatch(false);
-         return true;
-        }
-       }
-       return false;
-      }
+      }
+      this.advanceOffsetPage(previous);
+      if (offset.wrapped) {
+       offset.matchIdx = null;
+       if (this.pagesToSearch < 0) {
+        this.updateMatch(false);
+        return true;
+       }
+      }
+      return false;
      },
      updateMatchPosition: function PDFFindController_updateMatchPosition(pageIndex, index, elements, beginIdx) {
       if (this.selected.matchIdx === index && this.selected.pageIdx === pageIndex) {
        var spot = {
         top: FIND_SCROLL_OFFSET_TOP,
         left: FIND_SCROLL_OFFSET_LEFT
        };
        scrollIntoView(elements[beginIdx], spot, true);
@@ -3369,19 +3374,18 @@ var pdfjsWebLibs;
       }
       return;
      }
      if (this.nextHashParam) {
       if (this.nextHashParam === params.hash) {
        this.nextHashParam = null;
        this.updatePreviousBookmark = true;
        return;
-      } else {
-       this.nextHashParam = null;
-      }
+      }
+      this.nextHashParam = null;
      }
      if (params.hash) {
       if (this.current.hash) {
        if (this.current.hash !== params.hash) {
         this._pushToHistory(params, true);
        } else {
         if (!this.current.page && params.page) {
          this._pushToHistory(params, false, true);
@@ -3571,17 +3575,16 @@ var pdfjsWebLibs;
          });
         }
        } else {
         self.pdfDocument.getPageIndex(destRef).then(function (pageIndex) {
          self.cachePageRef(pageIndex + 1, destRef);
          goToDestination(destRef);
         }).catch(function () {
          console.error('PDFLinkService_navigateTo: "' + destRef + '" is not a valid page reference.');
-         return;
         });
        }
       };
       var destinationPromise;
       if (typeof dest === 'string') {
        destString = dest;
        destinationPromise = this.pdfDocument.getDestination(dest);
       } else {
@@ -5331,29 +5334,28 @@ var pdfjsWebLibs;
       return this.presentationModeState === PresentationModeState.CHANGING;
      },
      get isHorizontalScrollbarEnabled() {
       return this.isInPresentationMode ? false : this.container.scrollWidth > this.container.clientWidth;
      },
      _getVisiblePages: function () {
       if (!this.isInPresentationMode) {
        return getVisibleElements(this.container, this._pages, true);
-      } else {
-       var visible = [];
-       var currentPage = this._pages[this._currentPageNumber - 1];
-       visible.push({
-        id: currentPage.id,
-        view: currentPage
-       });
-       return {
-        first: currentPage,
-        last: currentPage,
-        views: visible
-       };
-      }
+      }
+      var visible = [];
+      var currentPage = this._pages[this._currentPageNumber - 1];
+      visible.push({
+       id: currentPage.id,
+       view: currentPage
+      });
+      return {
+       first: currentPage,
+       last: currentPage,
+       views: visible
+      };
      },
      cleanup: function () {
       for (var i = 0, ii = this._pages.length; i < ii; i++) {
        if (this._pages[i] && this._pages[i].renderingState !== RenderingStates.FINISHED) {
         this._pages[i].reset();
        }
       }
      },
@@ -7357,9 +7359,13 @@ function getViewerConfiguration() {
   debuggerScriptPath: './debugger.js'
  };
 }
 function webViewerLoad() {
  var config = getViewerConfiguration();
  window.PDFViewerApplication = pdfjsWebLibs.pdfjsWebApp.PDFViewerApplication;
  pdfjsWebLibs.pdfjsWebApp.PDFViewerApplication.run(config);
 }
-document.addEventListener('DOMContentLoaded', webViewerLoad, true);
\ No newline at end of file
+if (document.readyState === 'interactive' || document.readyState === 'complete') {
+ webViewerLoad();
+} else {
+ document.addEventListener('DOMContentLoaded', webViewerLoad, true);
+}
\ No newline at end of file
deleted file mode 100644
index 318cea0f6f7f652dc93bebddb66794b844fd6ec8..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 837f1814a335a1013481c79f6cde1ed0bcfbb7e4..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/extensions/shield-recipe-client/lib/NormandyApi.jsm
+++ b/browser/extensions/shield-recipe-client/lib/NormandyApi.jsm
@@ -5,16 +5,17 @@
 
 "use strict";
 
 const {utils: Cu, classes: Cc, interfaces: Ci} = Components;
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/Task.jsm");
 Cu.import("resource://gre/modules/CanonicalJSON.jsm");
 Cu.import("resource://gre/modules/Log.jsm");
+Cu.importGlobalProperties(["fetch"]); /* globals fetch */
 
 this.EXPORTED_SYMBOLS = ["NormandyApi"];
 
 const log = Log.repository.getLogger("extensions.shield-recipe-client");
 const prefs = Services.prefs.getBranch("extensions.shield-recipe-client.");
 
 this.NormandyApi = {
   apiCall(method, endpoint, data = {}) {
--- a/browser/extensions/shield-recipe-client/test/.eslintrc.js
+++ b/browser/extensions/shield-recipe-client/test/.eslintrc.js
@@ -3,14 +3,15 @@
 module.exports = {
   globals: {
     Assert: false,
     BrowserTestUtils: false,
     add_task: false,
     is: false,
     isnot: false,
     ok: false,
+    SpecialPowers: false,
   },
   rules: {
     "spaced-comment": 2,
     "space-before-function-paren": 2,
   }
 };
--- a/browser/extensions/shield-recipe-client/test/browser.ini
+++ b/browser/extensions/shield-recipe-client/test/browser.ini
@@ -1,6 +1,9 @@
 [browser_driver_uuids.js]
 [browser_env_expressions.js]
 [browser_EventEmitter.js]
 [browser_Storage.js]
 [browser_Heartbeat.js]
 skip-if = true # bug 1325409
+[browser_NormandyApi.js]
+  support-files =
+    test_server.sjs
new file mode 100644
--- /dev/null
+++ b/browser/extensions/shield-recipe-client/test/browser_NormandyApi.js
@@ -0,0 +1,21 @@
+"use strict";
+
+const {utils: Cu} = Components;
+Cu.import("resource://shield-recipe-client/lib/NormandyApi.jsm", this);
+
+add_task(function* () {
+  // Point the add-on to the test server.
+  yield SpecialPowers.pushPrefEnv({
+    set: [
+      [
+        "extensions.shield-recipe-client.api_url",
+        "http://mochi.test:8888/browser/browser/extensions/shield-recipe-client/test",
+      ]
+    ]
+  })
+
+  // Test that NormandyApi can fetch from the test server.
+  const response = yield NormandyApi.get("test_server.sjs");
+  const data = yield response.json();
+  Assert.deepEqual(data, {test: "data"}, "NormandyApi returned incorrect server data.");
+});
new file mode 100644
--- /dev/null
+++ b/browser/extensions/shield-recipe-client/test/test_server.sjs
@@ -0,0 +1,8 @@
+function handleRequest(request, response) {
+  // Allow cross-origin, so you can XHR to it!
+  response.setHeader("Access-Control-Allow-Origin", "*", false);
+  // Avoid confusing cache behaviors
+  response.setHeader("Cache-Control", "no-cache", false);
+  response.setHeader("Content-Type", "application/json", false);
+  response.write(JSON.stringify({test: "data"}))
+}
--- a/browser/installer/allowed-dupes.mn
+++ b/browser/installer/allowed-dupes.mn
@@ -19,17 +19,16 @@ browser/chrome/browser/content/browser/d
 browser/chrome/browser/content/browser/defaultthemes/5.header.png
 browser/chrome/browser/content/browser/extension.svg
 browser/chrome/browser/content/browser/places/bookmarkProperties.xul
 browser/chrome/browser/content/browser/places/bookmarkProperties2.xul
 browser/chrome/browser/skin/classic/browser/addons/addon-install-confirm.svg
 browser/chrome/browser/skin/classic/browser/connection-secure.svg
 browser/chrome/browser/skin/classic/browser/controlcenter/warning-gray.svg
 browser/chrome/browser/skin/classic/browser/newtab/close.png
-browser/chrome/browser/skin/classic/browser/theme-switcher-icon.png
 # devtools reduction is bug 1311178
 browser/chrome/devtools/content/dom/content/dom-view.css
 browser/chrome/devtools/content/dom/dom.html
 browser/chrome/devtools/content/dom/main.js
 browser/chrome/devtools/content/framework/toolbox-options.js
 browser/chrome/devtools/content/inspector/fonts/fonts.js
 browser/chrome/devtools/content/inspector/inspector.xhtml
 browser/chrome/devtools/content/memory/initializer.js
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -218,26 +218,24 @@
 @RESPATH@/components/dom_workers.xpt
 @RESPATH@/components/dom_xbl.xpt
 @RESPATH@/components/dom_xhr.xpt
 @RESPATH@/components/dom_xpath.xpt
 @RESPATH@/components/dom_xul.xpt
 @RESPATH@/components/dom_presentation.xpt
 @RESPATH@/components/downloads.xpt
 @RESPATH@/components/editor.xpt
-@RESPATH@/components/embed_base.xpt
 @RESPATH@/components/extensions.xpt
 @RESPATH@/components/exthandler.xpt
 @RESPATH@/components/exthelper.xpt
 @RESPATH@/components/fastfind.xpt
 @RESPATH@/components/feeds.xpt
 #ifdef MOZ_GTK
 @RESPATH@/components/filepicker.xpt
 #endif
-@RESPATH@/components/find.xpt
 @RESPATH@/components/gfx.xpt
 @RESPATH@/components/html5.xpt
 @RESPATH@/components/htmlparser.xpt
 @RESPATH@/components/identity.xpt
 @RESPATH@/components/imglib2.xpt
 @RESPATH@/components/inspector.xpt
 @RESPATH@/components/intl.xpt
 @RESPATH@/components/jar.xpt
@@ -322,16 +320,17 @@
 @RESPATH@/components/uriloader.xpt
 @RESPATH@/components/urlformatter.xpt
 @RESPATH@/components/webBrowser_core.xpt
 @RESPATH@/components/webbrowserpersist.xpt
 @RESPATH@/components/widget.xpt
 #ifdef XP_MACOSX
 @RESPATH@/components/widget_cocoa.xpt
 #endif
+@RESPATH@/components/windowcreator.xpt
 @RESPATH@/components/windowds.xpt
 @RESPATH@/components/windowwatcher.xpt
 @RESPATH@/components/xpcom_base.xpt
 @RESPATH@/components/xpcom_system.xpt
 @RESPATH@/components/xpcom_components.xpt
 @RESPATH@/components/xpcom_ds.xpt
 @RESPATH@/components/xpcom_io.xpt
 @RESPATH@/components/xpcom_threads.xpt
@@ -587,17 +586,16 @@
 
 ; [Browser Chrome Files]
 @RESPATH@/browser/chrome.manifest
 @RESPATH@/browser/chrome/browser@JAREXT@
 @RESPATH@/browser/chrome/browser.manifest
 @RESPATH@/browser/chrome/pdfjs.manifest
 @RESPATH@/browser/chrome/pdfjs/*
 @RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/chrome.manifest
-@RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
 @RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
 @RESPATH@/chrome/toolkit@JAREXT@
 @RESPATH@/chrome/toolkit.manifest
 @RESPATH@/chrome/recording.manifest
 @RESPATH@/chrome/recording/*
 #ifdef MOZ_GTK
 @RESPATH@/browser/chrome/icons/default/default16.png
 @RESPATH@/browser/chrome/icons/default/default32.png
--- a/browser/themes/moz.build
+++ b/browser/themes/moz.build
@@ -7,10 +7,8 @@
 toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
 
 if toolkit == 'cocoa':
     DIRS += ['osx']
 elif toolkit in ('gtk2', 'gtk3'):
     DIRS += ['linux']
 else:
     DIRS += ['windows']
-
-FINAL_TARGET_FILES.extensions['{972ce4c6-7e08-4474-a285-3208198ce6fd}'] += ['shared/icon.png']
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -3264,20 +3264,16 @@ menulist.translate-infobar-element > .me
   .customization-tipPanel-contentImage:-moz-locale-dir(rtl) {
     list-style-image: url(chrome://browser/skin/customizableui/customize-illustration-rtl@2x.png);
   }
 
   #customization-tipPanel > .panel-arrowcontainer > .panel-arrowbox > .panel-arrow[side="left"],
   #customization-tipPanel > .panel-arrowcontainer > .panel-arrowbox > .panel-arrow[side="right"] {
     list-style-image: url("chrome://browser/skin/customizableui/panelarrow-customizeTip@2x.png");
   }
-
-  .customization-lwtheme-menu-theme[defaulttheme] {
-    list-style-image: url(chrome://browser/skin/theme-switcher-icon@2x.png);
-  }
 }
 
 /* End customization mode */
 
 .private-browsing-indicator {
   background-image: url("chrome://browser/skin/privatebrowsing-mask.png");
   background-repeat: no-repeat;
   background-size: 100% auto;
--- a/browser/themes/shared/addons/addon-install-anchor.svg
+++ b/browser/themes/shared/addons/addon-install-anchor.svg
@@ -1,11 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- 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/. -->
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
+     class="fieldtext"
      width="16" height="16" viewBox="0 0 16 16">
+#include ../icon-colors.inc.svg
   <defs>
     <path id="shape-notifications-addons" d="M10,15c0.5,0,1-0.4,1-1v-3c0,0,0-0.8,0.8-0.8c0.6,0,0.6,0.8,1.8,0.8c0.6,0,1.5-0.2,1.5-2c0-1.8-0.9-2-1.5-2 c-1.1,0-1.1,0.7-1.8,0.7C11,7.7,11,7,11,7V6c0-0.6-0.5-1-1-1H8c0,0-0.8,0-0.8-0.8C7.2,3.6,8,3.6,8,2.5C8,1.9,7.8,1,6,1 C4.2,1,4,1.9,4,2.5c0,1.1,0.8,1.1,0.8,1.8C4.8,5,4,5,4,5H2C1.5,5,1,5.4,1,6l0,1.5c0,0-0.1,1,1.1,1c0.8,0,0.9-1,1.9-1 C4.5,7.4,5,8,5,9c0,1-0.5,1.6-1,1.6c-1,0-1.1-1.1-1.9-1.1C0.9,9.5,1,10.8,1,10.8V14c0,0.6,0.5,1,1,1l2.6,0c0,0,1.1,0,1.1-1 c0-0.8-1-0.1-1-1.1c0-0.5,0.7-1.2,1.8-1.2s1.8,0.7,1.8,1.2c0,1-1.1,0.3-1.1,1.1c0,1,1.2,1,1.2,1H10z"/>
   </defs>
-  <use id="default" xlink:href="#shape-notifications-addons" />
+  <use xlink:href="#shape-notifications-addons"/>
 </svg>
--- a/browser/themes/shared/customizableui/customizeMode.inc.css
+++ b/browser/themes/shared/customizableui/customizeMode.inc.css
@@ -189,17 +189,17 @@
   /* Sadly, button.css thinks its margins are perfect for everyone. */
   margin-inline-start: 6px !important;
 }
 
 #customization-lwtheme-button > .box-inherit > .box-inherit > .button-icon {
   width: 20px;
   height: 20px;
   border-radius: 2px;
-  background-image: url("chrome://browser/skin/theme-switcher-icon.png");
+  background-image: url("chrome://browser/content/default-theme-icon.svg");
   background-size: contain;
 }
 
 %ifdef CAN_DRAW_IN_TITLEBAR
 #customization-titlebar-visibility-button {
   list-style-image: url("chrome://browser/skin/customizableui/customize-titleBar-toggle.png");
   -moz-image-region: rect(0, 24px, 24px, 0);
 }
@@ -383,17 +383,17 @@ toolbarpaletteitem[place="toolbar"]:not(
   margin: 0 -5px 5px;
   padding-top: 0;
   padding-inline-end: 5px;
   padding-bottom: 0;
   padding-inline-start: 0;
 }
 
 .customization-lwtheme-menu-theme[defaulttheme] {
-  list-style-image: url(chrome://browser/skin/theme-switcher-icon.png);
+  list-style-image: url(chrome://browser/content/default-theme-icon.svg);
 }
 
 .customization-lwtheme-menu-theme[active="true"],
 .customization-lwtheme-menu-theme:hover {
   background-color: var(--arrowpanel-dimmed);
   border-color: var(--panel-separator-color);
 }
 
deleted file mode 100644
index 891e7afb1055e484669e792432ac1df496aa14ca..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -18,17 +18,17 @@
   skin/classic/browser/content-contextmenu.svg                 (../shared/content-contextmenu.svg)
   skin/classic/browser/addons/addon-install-blocked.svg        (../shared/addons/addon-install-blocked.svg)
   skin/classic/browser/addons/addon-install-confirm.svg        (../shared/addons/addon-install-confirm.svg)
   skin/classic/browser/addons/addon-install-downloading.svg    (../shared/addons/addon-install-downloading.svg)
   skin/classic/browser/addons/addon-install-error.svg          (../shared/addons/addon-install-error.svg)
   skin/classic/browser/addons/addon-install-installed.svg      (../shared/addons/addon-install-installed.svg)
   skin/classic/browser/addons/addon-install-restart.svg        (../shared/addons/addon-install-restart.svg)
   skin/classic/browser/addons/addon-install-warning.svg        (../shared/addons/addon-install-warning.svg)
-  skin/classic/browser/addons/addon-install-anchor.svg         (../shared/addons/addon-install-anchor.svg)
+* skin/classic/browser/addons/addon-install-anchor.svg         (../shared/addons/addon-install-anchor.svg)
 * skin/classic/browser/controlcenter/arrow-subview.svg         (../shared/controlcenter/arrow-subview.svg)
 * skin/classic/browser/controlcenter/arrow-subview-back.svg    (../shared/controlcenter/arrow-subview-back.svg)
 * skin/classic/browser/controlcenter/conn-not-secure.svg       (../shared/controlcenter/conn-not-secure.svg)
 * skin/classic/browser/controlcenter/connection.svg            (../shared/controlcenter/connection.svg)
 * skin/classic/browser/controlcenter/mcb-disabled.svg          (../shared/controlcenter/mcb-disabled.svg)
 * skin/classic/browser/controlcenter/permissions.svg           (../shared/controlcenter/permissions.svg)
 * skin/classic/browser/controlcenter/tracking-protection.svg   (../shared/controlcenter/tracking-protection.svg)
   skin/classic/browser/controlcenter/warning-gray.svg          (../shared/controlcenter/warning-gray.svg)
@@ -65,17 +65,16 @@
 * skin/classic/browser/identity-icon.svg                       (../shared/identity-block/identity-icon.svg)
   skin/classic/browser/info.svg                                (../shared/info.svg)
 * skin/classic/browser/menuPanel.svg                           (../shared/menuPanel.svg)
 * skin/classic/browser/menuPanel-small.svg                     (../shared/menuPanel-small.svg)
 * skin/classic/browser/notification-icons.svg                  (../shared/notification-icons.svg)
 * skin/classic/browser/tracking-protection-16.svg              (../shared/identity-block/tracking-protection-16.svg)
   skin/classic/browser/newtab/close.png                        (../shared/newtab/close.png)
   skin/classic/browser/newtab/controls.svg                     (../shared/newtab/controls.svg)
-  skin/classic/browser/newtab/whimsycorn.png                   (../shared/newtab/whimsycorn.png)
   skin/classic/browser/panel-icons.svg                         (../shared/panel-icons.svg)
   skin/classic/browser/preferences/in-content/favicon.ico      (../shared/incontentprefs/favicon.ico)
   skin/classic/browser/preferences/in-content/icons.svg        (../shared/incontentprefs/icons.svg)
   skin/classic/browser/preferences/in-content/search.css       (../shared/incontentprefs/search.css)
 * skin/classic/browser/preferences/in-content/containers.css   (../shared/incontentprefs/containers.css)
 * skin/classic/browser/preferences/containers.css              (../shared/preferences/containers.css)
   skin/classic/browser/fxa/default-avatar.svg                  (../shared/fxa/default-avatar.svg)
   skin/classic/browser/fxa/logo.png                            (../shared/fxa/logo.png)
@@ -95,27 +94,23 @@
   skin/classic/browser/badge-add-engine.png                    (../shared/search/badge-add-engine.png)
   skin/classic/browser/badge-add-engine@2x.png                 (../shared/search/badge-add-engine@2x.png)
   skin/classic/browser/search-indicator-badge-add.png          (../shared/search/search-indicator-badge-add.png)
   skin/classic/browser/search-indicator-badge-add@2x.png       (../shared/search/search-indicator-badge-add@2x.png)
   skin/classic/browser/search-history-icon.svg                 (../shared/search/history-icon.svg)
   skin/classic/browser/search-indicator-magnifying-glass.svg   (../shared/search/search-indicator-magnifying-glass.svg)
   skin/classic/browser/search-arrow-go.svg                     (../shared/search/search-arrow-go.svg)
   skin/classic/browser/gear.svg                                (../shared/search/gear.svg)
-  skin/classic/browser/social/gear_default.png                 (../shared/social/gear_default.png)
-  skin/classic/browser/social/gear_clicked.png                 (../shared/social/gear_clicked.png)
   skin/classic/browser/tabbrowser/connecting.png               (../shared/tabbrowser/connecting.png)
   skin/classic/browser/tabbrowser/connecting@2x.png            (../shared/tabbrowser/connecting@2x.png)
   skin/classic/browser/tabbrowser/crashed.svg                  (../shared/tabbrowser/crashed.svg)
   skin/classic/browser/tabbrowser/pendingpaint.png             (../shared/tabbrowser/pendingpaint.png)
   skin/classic/browser/tabbrowser/tab-audio.svg                (../shared/tabbrowser/tab-audio.svg)
   skin/classic/browser/tabbrowser/tab-audio-small.svg          (../shared/tabbrowser/tab-audio-small.svg)
   skin/classic/browser/tabbrowser/tab-overflow-indicator.png   (../shared/tabbrowser/tab-overflow-indicator.png)
-  skin/classic/browser/theme-switcher-icon.png                 (../shared/theme-switcher-icon.png)
-  skin/classic/browser/theme-switcher-icon@2x.png              (../shared/theme-switcher-icon@2x.png)
   skin/classic/browser/toolbarbutton-dropdown-arrow.png        (../shared/toolbarbutton-dropdown-arrow.png)
   skin/classic/browser/translating-16.png                      (../shared/translation/translating-16.png)
   skin/classic/browser/translating-16@2x.png                   (../shared/translation/translating-16@2x.png)
   skin/classic/browser/translation-16.png                      (../shared/translation/translation-16.png)
   skin/classic/browser/translation-16@2x.png                   (../shared/translation/translation-16@2x.png)
   skin/classic/browser/undoCloseTab.png                        (../shared/undoCloseTab.png)
   skin/classic/browser/undoCloseTab@2x.png                     (../shared/undoCloseTab@2x.png)
   skin/classic/browser/update-badge.svg                        (../shared/update-badge.svg)
--- a/browser/themes/shared/newtab/newTab.inc.css
+++ b/browser/themes/shared/newtab/newTab.inc.css
@@ -183,16 +183,20 @@ body.compact .newtab-thumbnail.placehold
 
 .newtab-site[type=affiliate] .newtab-thumbnail,
 .newtab-site[type=enhanced] .newtab-thumbnail,
 .newtab-site[type=organic] .newtab-thumbnail,
 .newtab-site[type=sponsored] .newtab-thumbnail {
   background-position: center center;
 }
 
+body.compact .newtab-site[type=affiliate] .newtab-thumbnail {
+  background-position: center 30%;
+}
+
 .newtab-site[type=affiliate] .newtab-thumbnail,
 body:not(.compact) .newtab-site[type=enhanced] .newtab-thumbnail,
 body:not(.compact) .newtab-site[type=organic] .newtab-thumbnail,
 body:not(.compact) .newtab-site[type=sponsored] .newtab-thumbnail {
   background-size: auto;
 }
 
 /* TITLES */
deleted file mode 100644
index 5c5c2f4989fdb128cae9fa39a8b6063d84276398..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/themes/shared/notification-icons.inc.css
+++ b/browser/themes/shared/notification-icons.inc.css
@@ -40,20 +40,16 @@
 }
 
 .notification-anchor-icon:not(.plugin-blocked):-moz-lwtheme,
 #blocked-permissions-container > .blocked-permission-icon:-moz-lwtheme {
   filter: url(chrome://global/skin/filters.svg#fill);
   fill: currentColor;
 }
 
-.notification-anchor-icon:not(.plugin-blocked):not(:hover) {
-  opacity: .8;
-}
-
 /* INDIVIDUAL NOTIFICATIONS */
 
 .popup-notification-icon[popupid="web-notifications"],
 .desktop-notification-icon {
   list-style-image: url(chrome://browser/skin/notification-icons.svg#desktop-notification);
 }
 
 .desktop-notification-icon.blocked-permission-icon {
@@ -200,17 +196,17 @@ html|*#webRTC-previewVideo {
   25% {transform: translateX(3px) }
   75% {transform: translateX(-3px) }
   100% { transform: translateX(0); }
 }
 
 /* INSTALL ADDONS */
 
 .install-icon {
-  list-style-image: url(chrome://browser/skin/addons/addon-install-anchor.svg#default);
+  list-style-image: url(chrome://browser/skin/addons/addon-install-anchor.svg);
 }
 
 .popup-notification-icon[popupid="xpinstall-disabled"],
 .popup-notification-icon[popupid="addon-install-blocked"],
 .popup-notification-icon[popupid="addon-install-origin-blocked"] {
   list-style-image: url(chrome://browser/skin/addons/addon-install-blocked.svg);
 }
 
deleted file mode 100644
index 7c93aa767e4b9542ab143f6bf7062514761f7304..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 2a9c8e19895a44c153fb6cc953d7373778befd3a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 891e7afb1055e484669e792432ac1df496aa14ca..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 286adfeaad64110999418d055e58ff097ef56c78..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -10,17 +10,16 @@ browser.jar:
   skin/classic/browser/aboutSyncTabs.css
 * skin/classic/browser/syncedtabs/sidebar.css     (syncedtabs/sidebar.css)
 * skin/classic/browser/browser.css
 * skin/classic/browser/devedition.css
 * skin/classic/browser/browser-lightweightTheme.css
   skin/classic/browser/caption-buttons.svg
   skin/classic/browser/click-to-play-warning-stripes.png
   skin/classic/browser/Info.png
-  skin/classic/browser/keyhole-forward-mask.svg
   skin/classic/browser/livemark-folder.png
   skin/classic/browser/menu-back.png
   skin/classic/browser/menu-forward.png
   skin/classic/browser/menuPanel-customize.png
   skin/classic/browser/menuPanel-customize@2x.png
   skin/classic/browser/menuPanel-exit.png
   skin/classic/browser/menuPanel-exit@2x.png
   skin/classic/browser/menuPanel-help.png
deleted file mode 100644
--- a/browser/themes/windows/keyhole-forward-mask.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-<svg xmlns="http://www.w3.org/2000/svg">
-  <mask id="mask" maskContentUnits="objectBoundingBox">
-    <rect x="0" y="0" width="1" height="1" fill="#fff"/>
-    <circle cx="-0.46" cy="0.5" r="0.63"/>
-  </mask>
-  <mask id="mask-hover" maskContentUnits="objectBoundingBox">
-    <rect x="0" y="0" width="1" height="1" fill="#fff"/>
-    <circle cx="-0.35" cy="0.5" r="0.58"/>
-  </mask>
-</svg>
--- a/caps/BasePrincipal.cpp
+++ b/caps/BasePrincipal.cpp
@@ -10,17 +10,16 @@
 #ifdef MOZ_CRASHREPORTER
 #include "nsExceptionHandler.h"
 #endif
 #include "nsIAddonPolicyService.h"
 #include "nsIContentSecurityPolicy.h"
 #include "nsIEffectiveTLDService.h"
 #include "nsIObjectInputStream.h"
 #include "nsIObjectOutputStream.h"
-#include "nsIScriptSecurityManager.h"
 
 #include "nsPrincipal.h"
 #include "nsNetUtil.h"
 #include "nsIURIWithPrincipal.h"
 #include "nsNullPrincipal.h"
 #include "nsScriptSecurityManager.h"
 #include "nsServiceManagerUtils.h"
 
@@ -30,104 +29,48 @@
 #include "mozilla/dom/ToJSValue.h"
 #include "mozilla/dom/URLSearchParams.h"
 
 namespace mozilla {
 
 using dom::URLParams;
 
 void
-PrincipalOriginAttributes::InheritFromDocShellToDoc(const DocShellOriginAttributes& aAttrs,
-                                                    const nsIURI* aURI)
+OriginAttributes::Inherit(const OriginAttributes& aAttrs)
 {
   mAppId = aAttrs.mAppId;
   mInIsolatedMozBrowser = aAttrs.mInIsolatedMozBrowser;
 
-  // addonId is computed from the principal URI and never propagated
-  mUserContextId = aAttrs.mUserContextId;
-
-  mPrivateBrowsingId = aAttrs.mPrivateBrowsingId;
-  mFirstPartyDomain = aAttrs.mFirstPartyDomain;
-}
+  StripAttributes(STRIP_ADDON_ID);
 
-void
-PrincipalOriginAttributes::InheritFromNecko(const NeckoOriginAttributes& aAttrs)
-{
-  mAppId = aAttrs.mAppId;
-  mInIsolatedMozBrowser = aAttrs.mInIsolatedMozBrowser;
-
-  // addonId is computed from the principal URI and never propagated
   mUserContextId = aAttrs.mUserContextId;
 
   mPrivateBrowsingId = aAttrs.mPrivateBrowsingId;
   mFirstPartyDomain = aAttrs.mFirstPartyDomain;
 }
 
 void
-PrincipalOriginAttributes::StripUserContextIdAndFirstPartyDomain()
-{
-  mUserContextId = nsIScriptSecurityManager::DEFAULT_USER_CONTEXT_ID;
-  mFirstPartyDomain.Truncate();
-}
-
-void
-DocShellOriginAttributes::InheritFromDocToChildDocShell(const PrincipalOriginAttributes& aAttrs)
-{
-  mAppId = aAttrs.mAppId;
-  mInIsolatedMozBrowser = aAttrs.mInIsolatedMozBrowser;
-
-  // addonId is computed from the principal URI and never propagated
-  mUserContextId = aAttrs.mUserContextId;
-
-  mPrivateBrowsingId = aAttrs.mPrivateBrowsingId;
-  mFirstPartyDomain = aAttrs.mFirstPartyDomain;
-}
-
-void
-NeckoOriginAttributes::InheritFromDocToNecko(const PrincipalOriginAttributes& aAttrs)
+OriginAttributes::SetFirstPartyDomain(const bool aIsTopLevelDocument,
+                                      nsIURI* aURI)
 {
-  mAppId = aAttrs.mAppId;
-  mInIsolatedMozBrowser = aAttrs.mInIsolatedMozBrowser;
-
-  // addonId is computed from the principal URI and never propagated
-  mUserContextId = aAttrs.mUserContextId;
-
-  mPrivateBrowsingId = aAttrs.mPrivateBrowsingId;
-  mFirstPartyDomain = aAttrs.mFirstPartyDomain;
-}
-
-void
-NeckoOriginAttributes::InheritFromDocShellToNecko(const DocShellOriginAttributes& aAttrs,
-                                                  const bool aIsTopLevelDocument,
-                                                  nsIURI* aURI)
-{
-  mAppId = aAttrs.mAppId;
-  mInIsolatedMozBrowser = aAttrs.mInIsolatedMozBrowser;
-
-  // addonId is computed from the principal URI and never propagated
-  mUserContextId = aAttrs.mUserContextId;
-
-  mPrivateBrowsingId = aAttrs.mPrivateBrowsingId;
-
   bool isFirstPartyEnabled = IsFirstPartyEnabled();
 
   // When the pref is on, we also compute the firstPartyDomain attribute
   // if this is for top-level document.
   if (isFirstPartyEnabled && aIsTopLevelDocument) {
-    nsCOMPtr<nsIEffectiveTLDService> tldService = do_GetService(NS_EFFECTIVETLDSERVICE_CONTRACTID);
+    nsCOMPtr<nsIEffectiveTLDService> tldService =
+      do_GetService(NS_EFFECTIVETLDSERVICE_CONTRACTID);
     MOZ_ASSERT(tldService);
     if (!tldService) {
       return;
     }
 
     nsAutoCString baseDomain;
     tldService->GetBaseDomain(aURI, 0, baseDomain);
     mFirstPartyDomain = NS_ConvertUTF8toUTF16(baseDomain);
-  } else {
-    mFirstPartyDomain = aAttrs.mFirstPartyDomain;
   }
 }
 
 void
 OriginAttributes::CreateSuffix(nsACString& aStr) const
 {
   UniquePtr<URLParams> params(new URLParams());
   nsAutoString value;
@@ -321,27 +264,16 @@ OriginAttributes::PopulateFromOrigin(con
 }
 
 void
 OriginAttributes::SyncAttributesWithPrivateBrowsing(bool aInPrivateBrowsing)
 {
   mPrivateBrowsingId = aInPrivateBrowsing ? 1 : 0;
 }
 
-void
-OriginAttributes::SetFromGenericAttributes(const GenericOriginAttributes& aAttrs)
-{
-  mAppId = aAttrs.mAppId;
-  mInIsolatedMozBrowser = aAttrs.mInIsolatedMozBrowser;
-  mAddonId = aAttrs.mAddonId;
-  mUserContextId = aAttrs.mUserContextId;
-  mPrivateBrowsingId = aAttrs.mPrivateBrowsingId;
-  mFirstPartyDomain = aAttrs.mFirstPartyDomain;
-}
-
 /* static */
 bool
 OriginAttributes::IsFirstPartyEnabled()
 {
   // Cache the privacy.firstparty.isolate pref.
   static bool sFirstPartyIsolation = false;
   static bool sCachedFirstPartyPref = false;
   if (!sCachedFirstPartyPref) {
@@ -352,17 +284,17 @@ OriginAttributes::IsFirstPartyEnabled()
   return sFirstPartyIsolation;
 }
 
 /* static */
 bool
 OriginAttributes::IsPrivateBrowsing(const nsACString& aOrigin)
 {
   nsAutoCString dummy;
-  PrincipalOriginAttributes attrs;
+  OriginAttributes attrs;
   if (NS_WARN_IF(!attrs.PopulateFromOrigin(aOrigin, dummy))) {
     return false;
   }
 
   return !!attrs.mPrivateBrowsingId;
 }
 
 BasePrincipal::BasePrincipal()
@@ -679,17 +611,17 @@ BasePrincipal::AddonHasPermission(const 
 
   bool retval = false;
   nsresult rv = aps->AddonHasPermission(mOriginAttributes.mAddonId, aPerm, &retval);
   NS_ENSURE_SUCCESS(rv, false);
   return retval;
 }
 
 already_AddRefed<BasePrincipal>
-BasePrincipal::CreateCodebasePrincipal(nsIURI* aURI, const PrincipalOriginAttributes& aAttrs)
+BasePrincipal::CreateCodebasePrincipal(nsIURI* aURI, const OriginAttributes& aAttrs)
 {
   // If the URI is supposed to inherit the security context of whoever loads it,
   // we shouldn't make a codebase principal for it.
   bool inheritsPrincipal;
   nsresult rv = NS_URIChainHasFlags(aURI, nsIProtocolHandler::URI_INHERITS_SECURITY_CONTEXT,
                                     &inheritsPrincipal);
   if (NS_FAILED(rv) || inheritsPrincipal) {
     return nsNullPrincipal::Create(aAttrs);
@@ -719,33 +651,34 @@ BasePrincipal::CreateCodebasePrincipal(c
 {
   MOZ_ASSERT(!StringBeginsWith(aOrigin, NS_LITERAL_CSTRING("[")),
              "CreateCodebasePrincipal does not support System and Expanded principals");
 
   MOZ_ASSERT(!StringBeginsWith(aOrigin, NS_LITERAL_CSTRING(NS_NULLPRINCIPAL_SCHEME ":")),
              "CreateCodebasePrincipal does not support nsNullPrincipal");
 
   nsAutoCString originNoSuffix;
-  mozilla::PrincipalOriginAttributes attrs;
+  mozilla::OriginAttributes attrs;
   if (!attrs.PopulateFromOrigin(aOrigin, originNoSuffix)) {
     return nullptr;
   }
 
   nsCOMPtr<nsIURI> uri;
   nsresult rv = NS_NewURI(getter_AddRefs(uri), originNoSuffix);
   NS_ENSURE_SUCCESS(rv, nullptr);
 
   return BasePrincipal::CreateCodebasePrincipal(uri, attrs);
 }
 
 already_AddRefed<BasePrincipal>
 BasePrincipal::CloneStrippingUserContextIdAndFirstPartyDomain()
 {
-  PrincipalOriginAttributes attrs = OriginAttributesRef();
-  attrs.StripUserContextIdAndFirstPartyDomain();
+  OriginAttributes attrs = OriginAttributesRef();
+  attrs.StripAttributes(OriginAttributes::STRIP_USER_CONTEXT_ID |
+                        OriginAttributes::STRIP_FIRST_PARTY_DOMAIN);
 
   nsAutoCString originNoSuffix;
   nsresult rv = GetOriginNoSuffix(originNoSuffix);
   NS_ENSURE_SUCCESS(rv, nullptr);
 
   nsCOMPtr<nsIURI> uri;
   rv = NS_NewURI(getter_AddRefs(uri), originNoSuffix);
   NS_ENSURE_SUCCESS(rv, nullptr);
--- a/caps/BasePrincipal.h
+++ b/caps/BasePrincipal.h
@@ -6,42 +6,81 @@
 
 #ifndef mozilla_BasePrincipal_h
 #define mozilla_BasePrincipal_h
 
 #include "nsJSPrincipals.h"
 
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/ChromeUtilsBinding.h"
+#include "nsIScriptSecurityManager.h"
 
 class nsIContentSecurityPolicy;
 class nsIObjectOutputStream;
 class nsIObjectInputStream;
 class nsIURI;
 
 class nsExpandedPrincipal;
 
 namespace mozilla {
 
-class GenericOriginAttributes;
-
 // Base OriginAttributes class. This has several subclass flavors, and is not
 // directly constructable itself.
 class OriginAttributes : public dom::OriginAttributesDictionary
 {
 public:
+  OriginAttributes() {}
+
+  OriginAttributes(uint32_t aAppId, bool aInIsolatedMozBrowser)
+  {
+    mAppId = aAppId;
+    mInIsolatedMozBrowser = aInIsolatedMozBrowser;
+  }
+
+  explicit OriginAttributes(const OriginAttributesDictionary& aOther)
+    : OriginAttributesDictionary(aOther)
+  {}
+
+  // This method 'clones' the OriginAttributes ignoring the addonId value becaue
+  // this is computed from the principal URI and never propagated.
+  void Inherit(const OriginAttributes& aAttrs);
+
+  void SetFirstPartyDomain(const bool aIsTopLevelDocument, nsIURI* aURI);
+
+  enum {
+    STRIP_FIRST_PARTY_DOMAIN = 0x01,
+    STRIP_ADDON_ID = 0x02,
+    STRIP_USER_CONTEXT_ID = 0x04,
+  };
+
+  inline void StripAttributes(uint32_t aFlags)
+  {
+    if (aFlags & STRIP_FIRST_PARTY_DOMAIN) {
+      mFirstPartyDomain.Truncate();
+    }
+
+    if (aFlags & STRIP_ADDON_ID) {
+      mAddonId.Truncate();
+    }
+
+    if (aFlags & STRIP_USER_CONTEXT_ID) {
+      mUserContextId = nsIScriptSecurityManager::DEFAULT_USER_CONTEXT_ID;
+    }
+  }
+
   bool operator==(const OriginAttributes& aOther) const
   {
     return mAppId == aOther.mAppId &&
            mInIsolatedMozBrowser == aOther.mInIsolatedMozBrowser &&
            mAddonId == aOther.mAddonId &&
            mUserContextId == aOther.mUserContextId &&
            mPrivateBrowsingId == aOther.mPrivateBrowsingId &&
            mFirstPartyDomain == aOther.mFirstPartyDomain;
   }
+
   bool operator!=(const OriginAttributes& aOther) const
   {
     return !(*this == aOther);
   }
 
   // Serializes/Deserializes non-default values into the suffix format, i.e.
   // |!key1=value1&key2=value2|. If there are no non-default attributes, this
   // returns an empty string.
@@ -56,115 +95,22 @@ public:
   // |uri!key1=value1&key2=value2| and returns the uri without the suffix.
   MOZ_MUST_USE bool PopulateFromOrigin(const nsACString& aOrigin,
                                        nsACString& aOriginNoSuffix);
 
   // Helper function to match mIsPrivateBrowsing to existing private browsing
   // flags. Once all other flags are removed, this can be removed too.
   void SyncAttributesWithPrivateBrowsing(bool aInPrivateBrowsing);
 
-  void SetFromGenericAttributes(const GenericOriginAttributes& aAttrs);
-
   // check if "privacy.firstparty.isolate" is enabled.
   static bool IsFirstPartyEnabled();
 
   // returns true if the originAttributes suffix has mPrivateBrowsingId value
   // different than 0.
   static bool IsPrivateBrowsing(const nsACString& aOrigin);
-
-protected:
-  OriginAttributes() {}
-  explicit OriginAttributes(const OriginAttributesDictionary& aOther)
-    : OriginAttributesDictionary(aOther) {}
-};
-
-class PrincipalOriginAttributes;
-class DocShellOriginAttributes;
-class NeckoOriginAttributes;
-
-// Various classes in Gecko contain OriginAttributes members, and those
-// OriginAttributes get propagated to other classes according to certain rules.
-// For example, the OriginAttributes on the docshell affect the OriginAttributes
-// for the principal of a document loaded inside it, whose OriginAttributes in
-// turn affect those of network loads and child docshells. To codify and
-// centralize these rules, we introduce separate subclasses for the different
-// flavors, and a variety of InheritFrom* methods to implement the transfer
-// behavior.
-
-// For OriginAttributes stored on principals.
-class PrincipalOriginAttributes : public OriginAttributes
-{
-public:
-  PrincipalOriginAttributes() {}
-  PrincipalOriginAttributes(uint32_t aAppId, bool aInIsolatedMozBrowser)
-  {
-    mAppId = aAppId;
-    mInIsolatedMozBrowser = aInIsolatedMozBrowser;
-  }
-
-  // Inheriting OriginAttributes from docshell to document when user navigates.
-  //
-  // @param aAttrs  Origin Attributes of the docshell.
-  // @param aURI    The URI of the document.
-  void InheritFromDocShellToDoc(const DocShellOriginAttributes& aAttrs,
-                                const nsIURI* aURI);
-
-  // Inherit OriginAttributes from Necko.
-  void InheritFromNecko(const NeckoOriginAttributes& aAttrs);
-
-  void StripUserContextIdAndFirstPartyDomain();
-};
-
-// For OriginAttributes stored on docshells / loadcontexts / browsing contexts.
-class DocShellOriginAttributes : public OriginAttributes
-{
-public:
-  DocShellOriginAttributes() {}
-  DocShellOriginAttributes(uint32_t aAppId, bool aInIsolatedMozBrowser)
-  {
-    mAppId = aAppId;
-    mInIsolatedMozBrowser = aInIsolatedMozBrowser;
-  }
-
-  // Inheriting OriginAttributes from document to child docshell when an
-  // <iframe> is created.
-  //
-  // @param aAttrs  Origin Attributes of the document.
-  void
-  InheritFromDocToChildDocShell(const PrincipalOriginAttributes& aAttrs);
-};
-
-// For OriginAttributes stored on Necko.
-class NeckoOriginAttributes : public OriginAttributes
-{
-public:
-  NeckoOriginAttributes() {}
-  explicit NeckoOriginAttributes(bool aInIsolatedMozBrowser)
-  {
-    mInIsolatedMozBrowser = aInIsolatedMozBrowser;
-  }
-
-  // Inheriting OriginAttributes from document to necko when a network request
-  // is made.
-  void InheritFromDocToNecko(const PrincipalOriginAttributes& aAttrs);
-
-  // Inheriting OriginAttributes from a docshell when loading a top-level
-  // document.
-  void InheritFromDocShellToNecko(const DocShellOriginAttributes& aAttrs,
-                                  const bool aIsTopLevelDocument = false,
-                                  nsIURI* aURI = nullptr);
-};
-
-// For operating on OriginAttributes not associated with any data structure.
-class GenericOriginAttributes : public OriginAttributes
-{
-public:
-  GenericOriginAttributes() {}
-  explicit GenericOriginAttributes(const OriginAttributesDictionary& aOther)
-    : OriginAttributes(aOther) {}
 };
 
 class OriginAttributesPattern : public dom::OriginAttributesPatternDictionary
 {
 public:
   // To convert a JSON string to an OriginAttributesPattern, do the following:
   //
   // OriginAttributesPattern pattern;
@@ -289,20 +235,20 @@ public:
   virtual bool AddonHasPermission(const nsAString& aPerm);
 
   virtual bool IsOnCSSUnprefixingWhitelist() override { return false; }
 
   virtual bool IsCodebasePrincipal() const { return false; };
 
   static BasePrincipal* Cast(nsIPrincipal* aPrin) { return static_cast<BasePrincipal*>(aPrin); }
   static already_AddRefed<BasePrincipal>
-  CreateCodebasePrincipal(nsIURI* aURI, const PrincipalOriginAttributes& aAttrs);
+  CreateCodebasePrincipal(nsIURI* aURI, const OriginAttributes& aAttrs);
   static already_AddRefed<BasePrincipal> CreateCodebasePrincipal(const nsACString& aOrigin);
 
-  const PrincipalOriginAttributes& OriginAttributesRef() override { return mOriginAttributes; }
+  const OriginAttributes& OriginAttributesRef() override { return mOriginAttributes; }
   uint32_t AppId() const { return mOriginAttributes.mAppId; }
   uint32_t UserContextId() const { return mOriginAttributes.mUserContextId; }
   uint32_t PrivateBrowsingId() const { return mOriginAttributes.mPrivateBrowsingId; }
   bool IsInIsolatedMozBrowserElement() const { return mOriginAttributes.mInIsolatedMozBrowser; }
 
   enum PrincipalKind {
     eNullPrincipal,
     eCodebasePrincipal,
@@ -329,14 +275,14 @@ protected:
   friend class ::nsExpandedPrincipal;
 
   // Helper to check whether this principal is associated with an addon that
   // allows unprivileged code to load aURI.
   bool AddonAllowsLoad(nsIURI* aURI);
 
   nsCOMPtr<nsIContentSecurityPolicy> mCSP;
   nsCOMPtr<nsIContentSecurityPolicy> mPreloadCSP;
-  PrincipalOriginAttributes mOriginAttributes;
+  OriginAttributes mOriginAttributes;
 };
 
 } // namespace mozilla
 
 #endif /* mozilla_BasePrincipal_h */
--- a/caps/nsIPrincipal.idl
+++ b/caps/nsIPrincipal.idl
@@ -7,28 +7,28 @@
 
 #include "nsISerializable.idl"
 
 %{C++
 struct JSPrincipals;
 #include "nsCOMPtr.h"
 #include "nsTArray.h"
 namespace mozilla {
-class PrincipalOriginAttributes;
+class OriginAttributes;
 }
 %}
 
 interface nsIURI;
 interface nsIContentSecurityPolicy;
 interface nsIDOMDocument;
 
 [ptr] native JSContext(JSContext);
 [ptr] native JSPrincipals(JSPrincipals);
 [ptr] native PrincipalArray(nsTArray<nsCOMPtr<nsIPrincipal> >);
-[ref] native const_PrincipalOriginAttributes(const mozilla::PrincipalOriginAttributes);
+[ref] native const_OriginAttributes(const mozilla::OriginAttributes);
 
 [scriptable, builtinclass, uuid(3da7b133-f1a0-4de9-a2bc-5c49014c1077)]
 interface nsIPrincipal : nsISerializable
 {
     /**
      * Returns whether the other principal is equivalent to this principal.
      * Principals are considered equal if they are the same principal, or
      * they have the same origin.
@@ -193,17 +193,17 @@ interface nsIPrincipal : nsISerializable
      *
      * If you're looking for an easy-to-use canonical stringification of the origin
      * attributes, see |originSuffix| below.
      */
     [implicit_jscontext]
     readonly attribute jsval originAttributes;
 
     [noscript, notxpcom, nostdcall, binaryname(OriginAttributesRef)]
-    const_PrincipalOriginAttributes OriginAttributesRef();
+    const_OriginAttributes OriginAttributesRef();
 
     /**
      * A canonical representation of the origin for this principal. This
      * consists of a base string (which, for codebase principals, is of the
      * format scheme://host:port), concatenated with |originAttributes| (see
      * below).
      *
      * We maintain the invariant that principalA.equals(principalB) if and only
--- a/caps/nsJSPrincipals.cpp
+++ b/caps/nsJSPrincipals.cpp
@@ -121,17 +121,17 @@ nsJSPrincipals::ReadPrincipals(JSContext
         return false;
     }
 
     return ReadKnownPrincipalType(aCx, aReader, tag, aOutPrincipals);
 }
 
 static bool
 ReadSuffixAndSpec(JSStructuredCloneReader* aReader,
-                  PrincipalOriginAttributes& aAttrs,
+                  OriginAttributes& aAttrs,
                   nsACString& aSpec)
 {
     uint32_t suffixLength, specLength;
     if (!JS_ReadUint32Pair(aReader, &suffixLength, &specLength)) {
         return false;
     }
 
     nsAutoCString suffix;
@@ -155,17 +155,17 @@ ReadSuffixAndSpec(JSStructuredCloneReade
 static bool
 ReadPrincipalInfo(JSStructuredCloneReader* aReader,
                   uint32_t aTag,
                   PrincipalInfo& aInfo)
 {
     if (aTag == SCTAG_DOM_SYSTEM_PRINCIPAL) {
         aInfo = SystemPrincipalInfo();
     } else if (aTag == SCTAG_DOM_NULL_PRINCIPAL) {
-        PrincipalOriginAttributes attrs;
+        OriginAttributes attrs;
         nsAutoCString spec;
         if (!ReadSuffixAndSpec(aReader, attrs, spec)) {
             return false;
         }
         aInfo = NullPrincipalInfo(attrs, spec);
     } else if (aTag == SCTAG_DOM_EXPANDED_PRINCIPAL) {
         uint32_t length, unused;
         if (!JS_ReadUint32Pair(aReader, &length, &unused)) {
@@ -184,17 +184,17 @@ ReadPrincipalInfo(JSStructuredCloneReade
             if (!ReadPrincipalInfo(aReader, tag, sub)) {
                 return false;
             }
             expanded.whitelist().AppendElement(sub);
         }
 
         aInfo = expanded;
     } else if (aTag == SCTAG_DOM_CONTENT_PRINCIPAL) {
-        PrincipalOriginAttributes attrs;
+        OriginAttributes attrs;
         nsAutoCString spec;
         if (!ReadSuffixAndSpec(aReader, attrs, spec)) {
             return false;
         }
 
         aInfo = ContentPrincipalInfo(attrs, spec);
     } else {
         MOZ_CRASH("unexpected principal structured clone tag");
@@ -232,17 +232,17 @@ nsJSPrincipals::ReadKnownPrincipalType(J
     }
 
     *aOutPrincipals = get(prin.forget().take());
     return true;
 }
 
 static bool
 WriteSuffixAndSpec(JSStructuredCloneWriter* aWriter,
-                   const PrincipalOriginAttributes& aAttrs,
+                   const OriginAttributes& aAttrs,
                    const nsCString& aSpec)
 {
   nsAutoCString suffix;
   aAttrs.CreateSuffix(suffix);
 
   return JS_WriteUint32Pair(aWriter, suffix.Length(), aSpec.Length()) &&
          JS_WriteBytes(aWriter, suffix.get(), suffix.Length()) &&
          JS_WriteBytes(aWriter, aSpec.get(), aSpec.Length());
--- a/caps/nsNullPrincipal.cpp
+++ b/caps/nsNullPrincipal.cpp
@@ -43,39 +43,37 @@ nsNullPrincipal::CreateWithInheritedAttr
   nsresult rv = nullPrin->Init(Cast(aInheritFrom)->OriginAttributesRef());
   MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
   return nullPrin.forget();
 }
 
 /* static */ already_AddRefed<nsNullPrincipal>
 nsNullPrincipal::CreateWithInheritedAttributes(nsIDocShell* aDocShell)
 {
-  PrincipalOriginAttributes attrs;
-  attrs.InheritFromDocShellToDoc(nsDocShell::Cast(aDocShell)->GetOriginAttributes(), nullptr);
+  OriginAttributes attrs;
+  attrs.Inherit(nsDocShell::Cast(aDocShell)->GetOriginAttributes());
 
   RefPtr<nsNullPrincipal> nullPrin = new nsNullPrincipal();
   nsresult rv = nullPrin->Init(attrs);
   MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
   return nullPrin.forget();
 }
 
 /* static */ already_AddRefed<nsNullPrincipal>
-nsNullPrincipal::Create(const PrincipalOriginAttributes& aOriginAttributes,
-                        nsIURI* aURI)
+nsNullPrincipal::Create(const OriginAttributes& aOriginAttributes, nsIURI* aURI)
 {
   RefPtr<nsNullPrincipal> nullPrin = new nsNullPrincipal();
   nsresult rv = nullPrin->Init(aOriginAttributes, aURI);
   MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
 
   return nullPrin.forget();
 }
 
 nsresult
-nsNullPrincipal::Init(const PrincipalOriginAttributes& aOriginAttributes,
-                      nsIURI* aURI)
+nsNullPrincipal::Init(const OriginAttributes& aOriginAttributes, nsIURI* aURI)
 {
   mOriginAttributes = aOriginAttributes;
 
   if (aURI) {
     nsAutoCString scheme;
     nsresult rv = aURI->GetScheme(scheme);
     NS_ENSURE_SUCCESS(rv, rv);
 
--- a/caps/nsNullPrincipal.h
+++ b/caps/nsNullPrincipal.h
@@ -48,20 +48,20 @@ public:
   NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) override;
   nsresult GetOriginInternal(nsACString& aOrigin) override;
 
   static already_AddRefed<nsNullPrincipal> CreateWithInheritedAttributes(nsIPrincipal* aInheritFrom);
 
   static already_AddRefed<nsNullPrincipal> CreateWithInheritedAttributes(nsIDocShell* aDocShell);
 
   static already_AddRefed<nsNullPrincipal>
-  Create(const mozilla::PrincipalOriginAttributes& aOriginAttributes = mozilla::PrincipalOriginAttributes(),
+  Create(const mozilla::OriginAttributes& aOriginAttributes = mozilla::OriginAttributes(),
          nsIURI* aURI = nullptr);
 
-  nsresult Init(const mozilla::PrincipalOriginAttributes& aOriginAttributes = mozilla::PrincipalOriginAttributes(),
+  nsresult Init(const mozilla::OriginAttributes& aOriginAttributes = mozilla::OriginAttributes(),
                 nsIURI* aURI = nullptr);
 
   virtual nsresult GetScriptLocation(nsACString &aStr) override;
 
   PrincipalKind Kind() override { return eNullPrincipal; }
 
  protected:
   virtual ~nsNullPrincipal() {}
--- a/caps/nsPrincipal.cpp
+++ b/caps/nsPrincipal.cpp
@@ -77,17 +77,17 @@ nsPrincipal::~nsPrincipal()
 {
   // let's clear the principal within the csp to avoid a tangling pointer
   if (mCSP) {
     static_cast<nsCSPContext*>(mCSP.get())->clearLoadingPrincipal();
   }
 }
 
 nsresult
-nsPrincipal::Init(nsIURI *aCodebase, const PrincipalOriginAttributes& aOriginAttributes)
+nsPrincipal::Init(nsIURI *aCodebase, const OriginAttributes& aOriginAttributes)
 {
   NS_ENSURE_STATE(!mInitialized);
   NS_ENSURE_ARG(aCodebase);
 
   mInitialized = true;
 
   mCodebase = NS_TryToMakeImmutable(aCodebase);
   mCodebaseImmutable = URIIsImmutable(mCodebase);
@@ -399,17 +399,17 @@ nsPrincipal::Read(nsIObjectInputStream* 
   }
 
   domain = do_QueryInterface(supports);
 
   nsAutoCString suffix;
   rv = aStream->ReadCString(suffix);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  PrincipalOriginAttributes attrs;
+  OriginAttributes attrs;
   bool ok = attrs.PopulateFromSuffix(suffix);
   NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE);
 
   rv = NS_ReadOptionalObject(aStream, true, getter_AddRefs(supports));
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = Init(codebase, attrs);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -683,17 +683,17 @@ struct OriginComparator
     nsAutoCString originB;
     rv = b->GetOrigin(originB);
     NS_ENSURE_SUCCESS(rv, false);
     return a == b;
   }
 };
 
 nsExpandedPrincipal::nsExpandedPrincipal(nsTArray<nsCOMPtr<nsIPrincipal>> &aWhiteList,
-                                         const PrincipalOriginAttributes& aAttrs)
+                                         const OriginAttributes& aAttrs)
 {
   // We force the principals to be sorted by origin so that nsExpandedPrincipal
   // origins can have a canonical form.
   OriginComparator c;
   for (size_t i = 0; i < aWhiteList.Length(); ++i) {
     mPrincipals.InsertElementSorted(aWhiteList[i], c);
   }
   mOriginAttributes = aAttrs;
--- a/caps/nsPrincipal.h
+++ b/caps/nsPrincipal.h
@@ -27,17 +27,18 @@ public:
   NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) override;
   virtual bool IsOnCSSUnprefixingWhitelist() override;
   bool IsCodebasePrincipal() const override { return true; }
   nsresult GetOriginInternal(nsACString& aOrigin) override;
 
   nsPrincipal();
 
   // Init() must be called before the principal is in a usable state.
-  nsresult Init(nsIURI* aCodebase, const mozilla::PrincipalOriginAttributes& aOriginAttributes);
+  nsresult Init(nsIURI* aCodebase,
+                const mozilla::OriginAttributes& aOriginAttributes);
 
   virtual nsresult GetScriptLocation(nsACString& aStr) override;
   void SetURI(nsIURI* aURI);
 
   /**
    * Called at startup to setup static data, e.g. about:config pref-observers.
    */
   static void InitializeStatics();
@@ -58,17 +59,17 @@ protected:
   bool SubsumesInternal(nsIPrincipal* aOther, DocumentDomainConsideration aConsideration) override;
   bool MayLoadInternal(nsIURI* aURI) override;
 };
 
 class nsExpandedPrincipal : public nsIExpandedPrincipal, public mozilla::BasePrincipal
 {
 public:
   nsExpandedPrincipal(nsTArray<nsCOMPtr<nsIPrincipal>> &aWhiteList,
-                      const mozilla::PrincipalOriginAttributes& aAttrs);
+                      const mozilla::OriginAttributes& aAttrs);
 
   NS_DECL_NSIEXPANDEDPRINCIPAL
   NS_DECL_NSISERIALIZABLE
   NS_IMETHOD_(MozExternalRefCountType) AddRef() override { return nsJSPrincipals::AddRef(); };
   NS_IMETHOD_(MozExternalRefCountType) Release() override { return nsJSPrincipals::Release(); };
   NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) override;
   NS_IMETHOD GetHashValue(uint32_t* aHashValue) override;
   NS_IMETHOD GetURI(nsIURI** aURI) override;
--- a/caps/nsScriptSecurityManager.cpp
+++ b/caps/nsScriptSecurityManager.cpp
@@ -293,21 +293,20 @@ nsScriptSecurityManager::GetChannelResul
 
     if (loadInfo) {
         if (!aIgnoreSandboxing && loadInfo->GetLoadingSandboxed()) {
             RefPtr<nsNullPrincipal> prin;
             if (loadInfo->LoadingPrincipal()) {
               prin =
                 nsNullPrincipal::CreateWithInheritedAttributes(loadInfo->LoadingPrincipal());
             } else {
-              NeckoOriginAttributes nAttrs;
-              loadInfo->GetOriginAttributes(&nAttrs);
-              PrincipalOriginAttributes pAttrs;
-              pAttrs.InheritFromNecko(nAttrs);
-              prin = nsNullPrincipal::Create(pAttrs);
+              OriginAttributes attrs;
+              loadInfo->GetOriginAttributes(&attrs);
+              attrs.StripAttributes(OriginAttributes::STRIP_ADDON_ID);
+              prin = nsNullPrincipal::Create(attrs);
             }
             prin.forget(aPrincipal);
             return NS_OK;
         }
 
         bool forceInherit = loadInfo->GetForceInheritPrincipal();
         if (aIgnoreSandboxing && !forceInherit) {
           // Check if SEC_FORCE_INHERIT_PRINCIPAL was dropped because of
@@ -351,17 +350,17 @@ nsScriptSecurityManager::GetChannelResul
                 return NS_OK;
             }
         }
     }
     return GetChannelURIPrincipal(aChannel, aPrincipal);
 }
 
 nsresult
-nsScriptSecurityManager::MaybeSetAddonIdFromURI(PrincipalOriginAttributes& aAttrs, nsIURI* aURI)
+nsScriptSecurityManager::MaybeSetAddonIdFromURI(OriginAttributes& aAttrs, nsIURI* aURI)
 {
   nsAutoCString scheme;
   nsresult rv = aURI->GetScheme(scheme);
   NS_ENSURE_SUCCESS(rv, rv);
   if (scheme.EqualsLiteral("moz-extension") && GetAddonPolicyService()) {
     rv = GetAddonPolicyService()->ExtensionURIToAddonId(aURI, aAttrs.mAddonId);
     NS_ENSURE_SUCCESS(rv, rv);
   }
@@ -395,21 +394,21 @@ nsScriptSecurityManager::GetChannelURIPr
     nsCOMPtr<nsILoadInfo> loadInfo;
     aChannel->GetLoadInfo(getter_AddRefs(loadInfo));
 
     // Inherit the origin attributes from loadInfo.
     // If this is a top-level document load, the origin attributes of the
     // loadInfo will be set from nsDocShell::DoURILoad.
     // For subresource loading, the origin attributes of the loadInfo is from
     // its loadingPrincipal.
-    PrincipalOriginAttributes attrs;
+    OriginAttributes attrs;
 
     // For addons loadInfo might be null.
     if (loadInfo) {
-      attrs.InheritFromNecko(loadInfo->GetOriginAttributes());
+      attrs.Inherit(loadInfo->GetOriginAttributes());
     }
     rv = MaybeSetAddonIdFromURI(attrs, uri);
     NS_ENSURE_SUCCESS(rv, rv);
     nsCOMPtr<nsIPrincipal> prin = BasePrincipal::CreateCodebasePrincipal(uri, attrs);
     prin.forget(aPrincipal);
     return *aPrincipal ? NS_OK : NS_ERROR_FAILURE;
 }
 
@@ -1065,34 +1064,34 @@ nsScriptSecurityManager::GetSystemPrinci
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsScriptSecurityManager::GetNoAppCodebasePrincipal(nsIURI* aURI,
                                                    nsIPrincipal** aPrincipal)
 {
-  PrincipalOriginAttributes attrs(NO_APP_ID, false);
+  OriginAttributes attrs;
   nsCOMPtr<nsIPrincipal> prin = BasePrincipal::CreateCodebasePrincipal(aURI, attrs);
   prin.forget(aPrincipal);
   return *aPrincipal ? NS_OK : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsScriptSecurityManager::GetCodebasePrincipal(nsIURI* aURI,
                                               nsIPrincipal** aPrincipal)
 {
   return GetNoAppCodebasePrincipal(aURI, aPrincipal);
 }
 
 NS_IMETHODIMP
 nsScriptSecurityManager::CreateCodebasePrincipal(nsIURI* aURI, JS::Handle<JS::Value> aOriginAttributes,
                                                  JSContext* aCx, nsIPrincipal** aPrincipal)
 {
-  PrincipalOriginAttributes attrs;
+  OriginAttributes attrs;
   if (!aOriginAttributes.isObject() || !attrs.Init(aCx, aOriginAttributes)) {
       return NS_ERROR_INVALID_ARG;
   }
   nsCOMPtr<nsIPrincipal> prin = BasePrincipal::CreateCodebasePrincipal(aURI, attrs);
   prin.forget(aPrincipal);
   return *aPrincipal ? NS_OK : NS_ERROR_FAILURE;
 }
 
@@ -1112,17 +1111,17 @@ nsScriptSecurityManager::CreateCodebaseP
   prin.forget(aPrincipal);
   return *aPrincipal ? NS_OK : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsScriptSecurityManager::CreateNullPrincipal(JS::Handle<JS::Value> aOriginAttributes,
                                              JSContext* aCx, nsIPrincipal** aPrincipal)
 {
-  PrincipalOriginAttributes attrs;
+  OriginAttributes attrs;
   if (!aOriginAttributes.isObject() || !attrs.Init(aCx, aOriginAttributes)) {
       return NS_ERROR_INVALID_ARG;
   }
   nsCOMPtr<nsIPrincipal> prin = nsNullPrincipal::Create(attrs);
   prin.forget(aPrincipal);
   return NS_OK;
 }
 
@@ -1130,50 +1129,50 @@ NS_IMETHODIMP
 nsScriptSecurityManager::GetAppCodebasePrincipal(nsIURI* aURI,
                                                  uint32_t aAppId,
                                                  bool aInIsolatedMozBrowser,
                                                  nsIPrincipal** aPrincipal)
 {
   NS_ENSURE_TRUE(aAppId != nsIScriptSecurityManager::UNKNOWN_APP_ID,
                  NS_ERROR_INVALID_ARG);
 
-  PrincipalOriginAttributes attrs(aAppId, aInIsolatedMozBrowser);
+  OriginAttributes attrs(aAppId, aInIsolatedMozBrowser);
   nsCOMPtr<nsIPrincipal> prin = BasePrincipal::CreateCodebasePrincipal(aURI, attrs);
   prin.forget(aPrincipal);
   return *aPrincipal ? NS_OK : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsScriptSecurityManager::
   GetLoadContextCodebasePrincipal(nsIURI* aURI,
                                   nsILoadContext* aLoadContext,
                                   nsIPrincipal** aPrincipal)
 {
   NS_ENSURE_STATE(aLoadContext);
-  DocShellOriginAttributes docShellAttrs;
+  OriginAttributes docShellAttrs;
   bool result = aLoadContext->GetOriginAttributes(docShellAttrs);;
   NS_ENSURE_TRUE(result, NS_ERROR_FAILURE);
 
-  PrincipalOriginAttributes attrs;
-  attrs.InheritFromDocShellToDoc(docShellAttrs, aURI);
+  OriginAttributes attrs;
+  attrs.Inherit(docShellAttrs);
 
   nsresult rv = MaybeSetAddonIdFromURI(attrs, aURI);
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsIPrincipal> prin = BasePrincipal::CreateCodebasePrincipal(aURI, attrs);
   prin.forget(aPrincipal);
   return *aPrincipal ? NS_OK : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsScriptSecurityManager::GetDocShellCodebasePrincipal(nsIURI* aURI,
                                                       nsIDocShell* aDocShell,
                                                       nsIPrincipal** aPrincipal)
 {
-  PrincipalOriginAttributes attrs;
-  attrs.InheritFromDocShellToDoc(nsDocShell::Cast(aDocShell)->GetOriginAttributes(), aURI);
+  OriginAttributes attrs;
+  attrs.Inherit(nsDocShell::Cast(aDocShell)->GetOriginAttributes());
 
   nsresult rv = MaybeSetAddonIdFromURI(attrs, aURI);
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsIPrincipal> prin = BasePrincipal::CreateCodebasePrincipal(aURI, attrs);
   prin.forget(aPrincipal);
   return *aPrincipal ? NS_OK : NS_ERROR_FAILURE;
 }
 
--- a/caps/nsScriptSecurityManager.h
+++ b/caps/nsScriptSecurityManager.h
@@ -22,17 +22,17 @@
 #include <stdint.h>
 
 class nsCString;
 class nsIIOService;
 class nsIStringBundle;
 class nsSystemPrincipal;
 
 namespace mozilla {
-class PrincipalOriginAttributes;
+class OriginAttributes;
 } // namespace mozilla
 
 /////////////////////////////
 // nsScriptSecurityManager //
 /////////////////////////////
 #define NS_SCRIPTSECURITYMANAGER_CID \
 { 0x7ee2a4c0, 0x4b93, 0x17d3, \
 { 0xba, 0x18, 0x00, 0x60, 0xb0, 0xf1, 0x99, 0xa2 }}
@@ -107,17 +107,17 @@ private:
 
     inline void
     ScriptSecurityPrefChanged();
 
     inline void
     AddSitesToFileURIWhitelist(const nsCString& aSiteList);
 
     // If aURI is a moz-extension:// URI, set mAddonId to the associated addon.
-    nsresult MaybeSetAddonIdFromURI(mozilla::PrincipalOriginAttributes& aAttrs, nsIURI* aURI);
+    nsresult MaybeSetAddonIdFromURI(mozilla::OriginAttributes& aAttrs, nsIURI* aURI);
 
     nsresult GetChannelResultPrincipal(nsIChannel* aChannel,
                                        nsIPrincipal** aPrincipal,
                                        bool aIgnoreSandboxing);
 
     nsresult
     CheckLoadURIFlags(nsIURI* aSourceURI, nsIURI* aTargetURI, nsIURI* aSourceBaseURI,
                       nsIURI* aTargetBaseURI, uint32_t aFlags);
--- a/caps/tests/gtest/TestOriginAttributes.cpp
+++ b/caps/tests/gtest/TestOriginAttributes.cpp
@@ -1,38 +1,38 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "gtest/gtest.h"
 #include "mozilla/BasePrincipal.h"
 
-using mozilla::PrincipalOriginAttributes;
+using mozilla::OriginAttributes;
 
 static void
-TestSuffix(const PrincipalOriginAttributes& attrs)
+TestSuffix(const OriginAttributes& attrs)
 {
   nsAutoCString suffix;
   attrs.CreateSuffix(suffix);
 
-  PrincipalOriginAttributes attrsFromSuffix;
+  OriginAttributes attrsFromSuffix;
   bool success = attrsFromSuffix.PopulateFromSuffix(suffix);
   EXPECT_TRUE(success);
 
   EXPECT_EQ(attrs, attrsFromSuffix);
 }
 
-TEST(PrincipalOriginAttributes, Suffix_default)
+TEST(OriginAttributes, Suffix_default)
 {
-  PrincipalOriginAttributes attrs;
+  OriginAttributes attrs;
   TestSuffix(attrs);
 }
 
-TEST(PrincipalOriginAttributes, Suffix_appId_inIsolatedMozBrowser)
+TEST(OriginAttributes, Suffix_appId_inIsolatedMozBrowser)
 {
-  PrincipalOriginAttributes attrs(1, true);
+  OriginAttributes attrs(1, true);
   TestSuffix(attrs);
 }
 
-TEST(PrincipalOriginAttributes, Suffix_maxAppId_inIsolatedMozBrowser)
+TEST(OriginAttributes, Suffix_maxAppId_inIsolatedMozBrowser)
 {
-  PrincipalOriginAttributes attrs(4294967295, true);
+  OriginAttributes attrs(4294967295, true);
   TestSuffix(attrs);
 }
--- a/devtools/client/debugger/test/mochitest/browser2.ini
+++ b/devtools/client/debugger/test/mochitest/browser2.ini
@@ -268,17 +268,17 @@ skip-if = e10s && debug
 skip-if = e10s && debug
 [browser_dbg_search-symbols.js]
 skip-if = (e10s && debug) || os == "linux" # Bug 1132375
 [browser_dbg_searchbox-help-popup-01.js]
 skip-if = e10s && debug
 [browser_dbg_searchbox-help-popup-02.js]
 skip-if = e10s && debug
 [browser_dbg_searchbox-parse.js]
-skip-if = e10s && debug
+skip-if = (e10s && debug) || (os == 'linux' && asan) # asan, bug 1313861
 [browser_dbg_source-maps-01.js]
 skip-if = e10s && debug
 [browser_dbg_source-maps-02.js]
 skip-if = e10s && debug
 [browser_dbg_source-maps-03.js]
 skip-if = e10s && debug
 [browser_dbg_source-maps-04.js]
 skip-if = e10s # Bug 1093535
--- a/devtools/client/framework/devtools-browser.js
+++ b/devtools/client/framework/devtools-browser.js
@@ -67,17 +67,17 @@ var gDevToolsBrowser = exports.gDevTools
   toggleToolboxCommand: function (gBrowser) {
     let target = TargetFactory.forTab(gBrowser.selectedTab);
     let toolbox = gDevTools.getToolbox(target);
 
     // If a toolbox exists, using toggle from the Main window :
     // - should close a docked toolbox
     // - should focus a windowed toolbox
     let isDocked = toolbox && toolbox.hostType != Toolbox.HostType.WINDOW;
-    isDocked ? toolbox.destroy() : gDevTools.showToolbox(target);
+    isDocked ? gDevTools.closeToolbox(target) : gDevTools.showToolbox(target);
   },
 
   /**
    * This function ensures the right commands are enabled in a window,
    * depending on their relevant prefs. It gets run when a window is registered,
    * or when any of the devtools prefs change.
    */
   updateCommandAvailability: function (win) {
@@ -188,17 +188,17 @@ var gDevToolsBrowser = exports.gDevTools
         (toolbox.currentToolId == toolId ||
           (toolId == "webconsole" && toolbox.splitConsole)))
     {
       toolbox.fireCustomKey(toolId);
 
       if (toolDefinition.preventClosingOnKey || toolbox.hostType == Toolbox.HostType.WINDOW) {
         toolbox.raise();
       } else {
-        toolbox.destroy();
+        gDevTools.closeToolbox(target);
       }
       gDevTools.emit("select-tool-command", toolId);
     } else {
       gDevTools.showToolbox(target, toolId).then(() => {
         let target = TargetFactory.forTab(gBrowser.selectedTab);
         let toolbox = gDevTools.getToolbox(target);
 
         toolbox.fireCustomKey(toolId);
--- a/devtools/client/framework/devtools.js
+++ b/devtools/client/framework/devtools.js
@@ -460,23 +460,27 @@ DevTools.prototype = {
   /**
    * Close the toolbox for a given target
    *
    * @return promise
    *         This promise will resolve to false if no toolbox was found
    *         associated to the target. true, if the toolbox was successfully
    *         closed.
    */
-  closeToolbox: function DT_closeToolbox(target) {
-    let toolbox = this._toolboxes.get(target);
-    if (toolbox == null) {
-      return promise.resolve(false);
+  closeToolbox: Task.async(function* (target) {
+    let toolbox = yield this._creatingToolboxes.get(target);
+    if (!toolbox) {
+      toolbox = this._toolboxes.get(target);
     }
-    return toolbox.destroy().then(() => true);
-  },
+    if (!toolbox) {
+      return false;
+    }
+    yield toolbox.destroy();
+    return true;
+  }),
 
   /**
    * Either the SDK Loader has been destroyed by the add-on contribution
    * workflow, or firefox is shutting down.
 
    * @param {boolean} shuttingDown
    *        True if firefox is currently shutting down. We may prevent doing
    *        some cleanups to speed it up. Otherwise everything need to be
--- a/devtools/client/framework/sidebar.js
+++ b/devtools/client/framework/sidebar.js
@@ -426,17 +426,18 @@ ToolSidebar.prototype = {
   },
 
   /**
    * Return the tab based on the provided id, if one was registered with this id.
    * @param {String} id
    * @return {DOMNode}
    */
   getTab: function (id) {
-    return this._tabs.get(id);
+    // FIXME: A workaround for broken browser_net_raw_headers.js failure only in non-e10s mode
+    return this._tabs && this._tabs.get(id);
   },
 
   /**
    * Event handler.
    */
   handleEvent: function (event) {
     if (event.type !== "select" || this._destroyed) {
       return;
--- a/devtools/client/framework/test/browser.ini
+++ b/devtools/client/framework/test/browser.ini
@@ -55,16 +55,17 @@ skip-if = true # Bug 1177463 - Temporari
 [browser_toolbox_options.js]
 [browser_toolbox_options_disable_buttons.js]
 [browser_toolbox_options_disable_cache-01.js]
 [browser_toolbox_options_disable_cache-02.js]
 [browser_toolbox_options_disable_js.js]
 [browser_toolbox_options_enable_serviceworkers_testing.js]
 # [browser_toolbox_raise.js] # Bug 962258
 # skip-if = os == "win"
+[browser_toolbox_races.js]
 [browser_toolbox_ready.js]
 [browser_toolbox_remoteness_change.js]
 run-if = e10s
 [browser_toolbox_select_event.js]
 skip-if = e10s # Bug 1069044 - destroyInspector may hang during shutdown
 [browser_toolbox_selected_tool_unavailable.js]
 [browser_toolbox_sidebar.js]
 [browser_toolbox_sidebar_events.js]
new file mode 100644
--- /dev/null
+++ b/devtools/client/framework/test/browser_toolbox_races.js
@@ -0,0 +1,81 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test toggling the toolbox quickly and see if there is any race breaking it.
+
+const URL = "data:text/html;charset=utf-8,Toggling devtools quickly";
+
+add_task(function* () {
+  // Make sure this test starts with the selectedTool pref cleared. Previous
+  // tests select various tools, and that sets this pref.
+  Services.prefs.clearUserPref("devtools.toolbox.selectedTool");
+
+  let tab = yield addTab(URL);
+
+  let created = 0, ready = 0, destroy = 0, destroyed = 0;
+  let onCreated = () => {
+    created++;
+  };
+  let onReady = () => {
+    ready++;
+  };
+  let onDestroy = () => {
+    destroy++;
+  };
+  let onDestroyed = () => {
+    destroyed++;
+  };
+  gDevTools.on("toolbox-created", onCreated);
+  gDevTools.on("toolbox-ready", onReady);
+  gDevTools.on("toolbox-destroy", onDestroy);
+  gDevTools.on("toolbox-destroyed", onDestroyed);
+
+  // The current implementation won't toggle the toolbox many times,
+  // instead it will ignore toggles that happens while the toolbox is still
+  // creating or still destroying.
+
+  // Toggle the toolbox at least 3 times.
+  info("Trying to toggle the toolbox 3 times");
+  while (created < 3) {
+    // Sent multiple event to try to race the code during toolbox creation and destruction
+    toggle();
+    toggle();
+    toggle();
+
+    // Release the event loop to let a chance to actually create or destroy the toolbox!
+    yield wait(50);
+  }
+  info("Toggled the toolbox 3 times");
+
+  // Now wait for the 3rd toolbox to be fully ready before closing it.
+  // We close the last toolbox manually, out of the first while() loop to
+  // avoid races and be sure we end up we no toolbox and waited for all the
+  // requests to be done.
+  while (ready != 3) {
+    yield wait(100);
+  }
+  toggle();
+  while (destroyed != 3) {
+    yield wait(100);
+  }
+
+  is(created, 3, "right number of created events");
+  is(ready, 3, "right number of ready events");
+  is(destroy, 3, "right number of destroy events");
+  is(destroyed, 3, "right number of destroyed events");
+
+  gDevTools.off("toolbox-created", onCreated);
+  gDevTools.off("toolbox-ready", onReady);
+  gDevTools.off("toolbox-destroy", onDestroy);
+  gDevTools.off("toolbox-destroyed", onDestroyed);
+
+  gBrowser.removeCurrentTab();
+});
+
+function toggle() {
+  EventUtils.synthesizeKey("VK_F12", {});
+}
--- a/devtools/client/inspector/breadcrumbs.js
+++ b/devtools/client/inspector/breadcrumbs.js
@@ -375,26 +375,16 @@ HTMLBreadcrumbs.prototype = {
     this.arrowScrollBox = new ArrowScrollBox(
         this.win,
         this.outer);
 
     this.container = this.arrowScrollBox.inner;
     this.scroll = this.scroll.bind(this);
     this.arrowScrollBox.on("overflow", this.scroll);
 
-    // These separators are used for CSS purposes only, and are positioned
-    // off screen, but displayed with -moz-element.
-    this.separators = this.doc.createElementNS(NS_XHTML, "div");
-    this.separators.className = "breadcrumb-separator-container";
-    this.separators.innerHTML =
-                      "<div id='breadcrumb-separator-before'></div>" +
-                      "<div id='breadcrumb-separator-after'></div>" +
-                      "<div id='breadcrumb-separator-normal'></div>";
-    this.container.parentNode.appendChild(this.separators);
-
     this.outer.addEventListener("click", this, true);
     this.outer.addEventListener("mouseover", this, true);
     this.outer.addEventListener("mouseout", this, true);
     this.outer.addEventListener("focus", this, true);
 
     this.shortcuts = new KeyShortcuts({ window: this.win, target: this.outer });
     this.handleShortcut = this.handleShortcut.bind(this);
 
@@ -622,24 +612,22 @@ HTMLBreadcrumbs.prototype = {
 
     this.container.removeEventListener("click", this, true);
     this.container.removeEventListener("mouseover", this, true);
     this.container.removeEventListener("mouseout", this, true);
     this.container.removeEventListener("focus", this, true);
     this.shortcuts.destroy();
 
     this.empty();
-    this.separators.remove();
 
     this.arrowScrollBox.off("overflow", this.scroll);
     this.arrowScrollBox.destroy();
     this.arrowScrollBox = null;
     this.outer = null;
     this.container = null;
-    this.separators = null;
     this.nodeHierarchy = null;
 
     this.isDestroyed = true;
   },
 
   /**
    * Empty the breadcrumbs container.
    */
--- a/devtools/client/jar.mn
+++ b/devtools/client/jar.mn
@@ -164,17 +164,16 @@ devtools.jar:
     skin/images/command-rulers.svg (themes/images/command-rulers.svg)
     skin/images/command-measure.svg (themes/images/command-measure.svg)
     skin/images/command-noautohide.svg (themes/images/command-noautohide.svg)
     skin/markup.css (themes/markup.css)
     skin/images/editor-error.png (themes/images/editor-error.png)
     skin/images/breakpoint.svg (themes/images/breakpoint.svg)
     skin/webconsole.css (themes/webconsole.css)
     skin/images/webconsole.svg (themes/images/webconsole.svg)
-    skin/images/breadcrumbs-divider@2x.png (themes/images/breadcrumbs-divider@2x.png)
     skin/images/breadcrumbs-scrollbutton.png (themes/images/breadcrumbs-scrollbutton.png)
     skin/images/breadcrumbs-scrollbutton@2x.png (themes/images/breadcrumbs-scrollbutton@2x.png)
     skin/animationinspector.css (themes/animationinspector.css)
     skin/canvasdebugger.css (themes/canvasdebugger.css)
     skin/debugger.css (themes/debugger.css)
     skin/netmonitor.css (themes/netmonitor.css)
     skin/performance.css (themes/performance.css)
     skin/memory.css (themes/memory.css)
--- a/devtools/client/netmonitor/details-view.js
+++ b/devtools/client/netmonitor/details-view.js
@@ -11,29 +11,26 @@ const promise = require("promise");
 const EventEmitter = require("devtools/shared/event-emitter");
 const { Heritage } = require("devtools/client/shared/widgets/view-helpers");
 const { Task } = require("devtools/shared/task");
 const { ToolSidebar } = require("devtools/client/framework/sidebar");
 const { VariablesView } = require("resource://devtools/client/shared/widgets/VariablesView.jsm");
 const { EVENTS } = require("./events");
 const { L10N } = require("./l10n");
 const { Filters } = require("./filter-predicates");
-const {
-  decodeUnicodeUrl,
-} = require("./request-utils");
 const { createFactory } = require("devtools/client/shared/vendor/react");
 const ReactDOM = require("devtools/client/shared/vendor/react-dom");
 const Provider = createFactory(require("devtools/client/shared/vendor/react-redux").Provider);
+const HeadersPanel = createFactory(require("./shared/components/headers-panel"));
 const ParamsPanel = createFactory(require("./shared/components/params-panel"));
 const PreviewPanel = createFactory(require("./shared/components/preview-panel"));
 const ResponsePanel = createFactory(require("./shared/components/response-panel"));
 const SecurityPanel = createFactory(require("./shared/components/security-panel"));
 const TimingsPanel = createFactory(require("./shared/components/timings-panel"));
 
-const HEADERS_SIZE_DECIMALS = 3;
 const GENERIC_VARIABLES_VIEW_SETTINGS = {
   lazyEmpty: true,
   // ms
   lazyEmptyDelay: 10,
   searchEnabled: true,
   editableValueTooltip: "",
   editableNameTooltip: "",
   preventDisableOnChange: true,
@@ -68,16 +65,23 @@ DetailsView.prototype = {
   },
 
   /**
    * Initialization function, called when the network monitor is started.
    */
   initialize: function (store) {
     dumpn("Initializing the DetailsView");
 
+    this._headersPanelNode = $("#react-headers-tabpanel-hook");
+
+    ReactDOM.render(Provider(
+      { store },
+      HeadersPanel()
+    ), this._headersPanelNode);
+
     this._paramsPanelNode = $("#react-params-tabpanel-hook");
 
     ReactDOM.render(Provider(
       { store },
       ParamsPanel()
     ), this._paramsPanelNode);
 
     this._previewPanelNode = $("#react-preview-tabpanel-hook");
@@ -109,42 +113,35 @@ DetailsView.prototype = {
     ), this._timingsPanelNode);
 
     this.widget = $("#event-details-pane");
     this.sidebar = new ToolSidebar(this.widget, this, "netmonitor", {
       disableTelemetry: true,
       showAllTabsMenu: true
     });
 
-    this._headers = new VariablesView($("#all-headers"),
-      Heritage.extend(GENERIC_VARIABLES_VIEW_SETTINGS, {
-        emptyText: L10N.getStr("headersEmptyText"),
-        searchPlaceholder: L10N.getStr("headersFilterText")
-      }));
     this._cookies = new VariablesView($("#all-cookies"),
       Heritage.extend(GENERIC_VARIABLES_VIEW_SETTINGS, {
         emptyText: L10N.getStr("cookiesEmptyText"),
         searchPlaceholder: L10N.getStr("cookiesFilterText")
       }));
 
-    this._requestHeaders = L10N.getStr("requestHeaders");
-    this._requestHeadersFromUpload = L10N.getStr("requestHeadersFromUpload");
-    this._responseHeaders = L10N.getStr("responseHeaders");
     this._requestCookies = L10N.getStr("requestCookies");
     this._responseCookies = L10N.getStr("responseCookies");
 
     $("tabpanels", this.widget).addEventListener("select", this._onTabSelect);
   },
 
   /**
    * Destruction function, called when the network monitor is closed.
    */
   destroy: function () {
     dumpn("Destroying the DetailsView");
     ReactDOM.unmountComponentAtNode(this._paramsPanelNode);
+    ReactDOM.unmountComponentAtNode(this._headersPanelNode);
     ReactDOM.unmountComponentAtNode(this._previewPanelNode);
     ReactDOM.unmountComponentAtNode(this._responsePanelNode);
     ReactDOM.unmountComponentAtNode(this._securityPanelNode);
     ReactDOM.unmountComponentAtNode(this._timingsPanelNode);
     this.sidebar.destroy();
     $("tabpanels", this.widget).removeEventListener("select",
       this._onTabSelect);
   },
@@ -153,18 +150,16 @@ DetailsView.prototype = {
    * Populates this view with the specified data.
    *
    * @param object data
    *        The data source (this should be the attachment of a request item).
    * @return object
    *        Returns a promise that resolves upon population the view.
    */
   populate: function (data) {
-    $("#raw-headers").hidden = true;
-
     let isHtml = Filters.html(data);
 
     // Show the "Preview" tabpanel only for plain HTML responses.
     this.sidebar.toggleTab(isHtml, "preview-tab");
 
     // Show the "Security" tab only for requests that
     //   1) are https (state != insecure)
     //   2) come from a target that provides security information.
@@ -177,17 +172,16 @@ DetailsView.prototype = {
     // request has no security information.
 
     if (!isHtml && this.widget.selectedPanel === $("#preview-tabpanel") ||
         !hasSecurityInfo && this.widget.selectedPanel ===
           $("#security-tabpanel")) {
       this.widget.selectedIndex = 0;
     }
 
-    this._headers.empty();
     this._cookies.empty();
 
     this._dataSrc = { src: data, populated: [] };
     this._onTabSelect();
     window.emit(EVENTS.NETWORKDETAILSVIEW_POPULATED);
 
     return promise.resolve();
   },
@@ -214,24 +208,16 @@ DetailsView.prototype = {
       viewState.dirty[tab] = true;
       viewState.latestData = src;
       return;
     }
 
     Task.spawn(function* () {
       viewState.updating[tab] = true;
       switch (tab) {
-        // "Headers"
-        case 0:
-          yield view._setSummary(src);
-          yield view._setResponseHeaders(src.responseHeaders);
-          yield view._setRequestHeaders(
-            src.requestHeaders,
-            src.requestHeadersFromUploadStream);
-          break;
         // "Cookies"
         case 1:
           yield view._setResponseCookies(src.responseCookies);
           yield view._setRequestCookies(src.requestCookies);
           break;
       }
       viewState.updating[tab] = false;
     }).then(() => {
@@ -249,140 +235,16 @@ DetailsView.prototype = {
         // Tab is dirty but no longer selected. Don't refresh it now, it'll be
         // done if the tab is shown again.
         viewState.dirty[tab] = false;
       }
     }, e => console.error(e));
   },
 
   /**
-   * Sets the network request summary shown in this view.
-   *
-   * @param object data
-   *        The data source (this should be the attachment of a request item).
-   */
-  _setSummary: function (data) {
-    if (data.url) {
-      let unicodeUrl = decodeUnicodeUrl(data.url);
-      $("#headers-summary-url-value").setAttribute("value", unicodeUrl);
-      $("#headers-summary-url-value").setAttribute("tooltiptext", unicodeUrl);
-      $("#headers-summary-url").removeAttribute("hidden");
-    } else {
-      $("#headers-summary-url").setAttribute("hidden", "true");
-    }
-
-    if (data.method) {
-      $("#headers-summary-method-value").setAttribute("value", data.method);
-      $("#headers-summary-method").removeAttribute("hidden");
-    } else {
-      $("#headers-summary-method").setAttribute("hidden", "true");
-    }
-
-    if (data.remoteAddress) {
-      let address = data.remoteAddress;
-      if (address.indexOf(":") != -1) {
-        address = `[${address}]`;
-      }
-      if (data.remotePort) {
-        address += `:${data.remotePort}`;
-      }
-      $("#headers-summary-address-value").setAttribute("value", address);
-      $("#headers-summary-address-value").setAttribute("tooltiptext", address);
-      $("#headers-summary-address").removeAttribute("hidden");
-    } else {
-      $("#headers-summary-address").setAttribute("hidden", "true");
-    }
-
-    if (data.status) {
-      // "code" attribute is only used by css to determine the icon color
-      let code;
-      if (data.fromCache) {
-        code = "cached";
-      } else if (data.fromServiceWorker) {
-        code = "service worker";
-      } else {
-        code = data.status;
-      }
-      $("#headers-summary-status-circle").setAttribute("data-code", code);
-      $("#headers-summary-status-value").setAttribute("value",
-        data.status + " " + data.statusText);
-      $("#headers-summary-status").removeAttribute("hidden");
-    } else {
-      $("#headers-summary-status").setAttribute("hidden", "true");
-    }
-
-    if (data.httpVersion) {
-      $("#headers-summary-version-value").setAttribute("value",
-        data.httpVersion);
-      $("#headers-summary-version").removeAttribute("hidden");
-    } else {
-      $("#headers-summary-version").setAttribute("hidden", "true");
-    }
-  },
-
-  /**
-   * Sets the network request headers shown in this view.
-   *
-   * @param object headers
-   *        The "requestHeaders" message received from the server.
-   * @param object uploadHeaders
-   *        The "requestHeadersFromUploadStream" inferred from the POST payload.
-   * @return object
-   *        A promise that resolves when request headers are set.
-   */
-  _setRequestHeaders: Task.async(function* (headers, uploadHeaders) {
-    if (headers && headers.headers.length) {
-      yield this._addHeaders(this._requestHeaders, headers);
-    }
-    if (uploadHeaders && uploadHeaders.headers.length) {
-      yield this._addHeaders(this._requestHeadersFromUpload, uploadHeaders);
-    }
-  }),
-
-  /**
-   * Sets the network response headers shown in this view.
-   *
-   * @param object response
-   *        The message received from the server.
-   * @return object
-   *        A promise that resolves when response headers are set.
-   */
-  _setResponseHeaders: Task.async(function* (response) {
-    if (response && response.headers.length) {
-      response.headers.sort((a, b) => a.name > b.name);
-      yield this._addHeaders(this._responseHeaders, response);
-    }
-  }),
-
-  /**
-   * Populates the headers container in this view with the specified data.
-   *
-   * @param string name
-   *        The type of headers to populate (request or response).
-   * @param object response
-   *        The message received from the server.
-   * @return object
-   *        A promise that resolves when headers are added.
-   */
-  _addHeaders: Task.async(function* (name, response) {
-    let kb = response.headersSize / 1024;
-    let size = L10N.numberWithDecimals(kb, HEADERS_SIZE_DECIMALS);
-    let text = L10N.getFormatStr("networkMenu.sizeKB", size);
-
-    let headersScope = this._headers.addScope(name + " (" + text + ")");
-    headersScope.expanded = true;
-
-    for (let header of response.headers) {
-      let headerVar = headersScope.addItem(header.name, {}, {relaxed: true});
-      let headerValue = yield gNetwork.getString(header.value);
-      headerVar.setGrip(headerValue);
-    }
-  }),
-
-  /**
    * Sets the network request cookies shown in this view.
    *