Bug 1561435 - Format netwerk/, a=automatic-formatting
authorVictor Porof <vporof@mozilla.com>
Fri, 05 Jul 2019 10:55:23 +0200
changeset 481400 d9a6985d5acd2cdd1c8e582868a5975473a78794
parent 481399 b0329baff86060df3bfd0f2aecc8ab5381056036
child 481401 9d81554c410bd0b5d0f384fc5ceb3117bc7f5ced
push id36243
push uservporof@mozilla.com
push dateFri, 05 Jul 2019 14:04:25 +0000
treeherdermozilla-central@041abaa4aa85 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatic-formatting
bugs1561435
milestone69.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
Bug 1561435 - Format netwerk/, a=automatic-formatting # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D35919
.eslintrc.js
.prettierignore
netwerk/base/NetUtil.jsm
netwerk/cookie/test/browser/browser_broadcastChannel.js
netwerk/cookie/test/browser/browser_cookies.js
netwerk/cookie/test/browser/browser_domCache.js
netwerk/cookie/test/browser/browser_originattributes.js
netwerk/cookie/test/browser/browser_serviceWorker.js
netwerk/cookie/test/browser/head.js
netwerk/cookie/test/mochitest/cookiesHelper.js
netwerk/cookie/test/unit/test_bug1155169.js
netwerk/cookie/test/unit/test_bug1321912.js
netwerk/cookie/test/unit/test_bug643051.js
netwerk/cookie/test/unit/test_eviction.js
netwerk/cookie/test/unit/test_parser_0001.js
netwerk/cookie/test/unit/test_parser_0019.js
netwerk/cookie/test/unit/test_rawSameSite.js
netwerk/dns/mdns/libmdns/DNSServiceDiscovery.jsm
netwerk/dns/mdns/libmdns/MulticastDNSAndroid.jsm
netwerk/dns/mdns/libmdns/fallback/DNSPacket.jsm
netwerk/dns/mdns/libmdns/fallback/DNSRecord.jsm
netwerk/dns/mdns/libmdns/fallback/DNSResourceRecord.jsm
netwerk/dns/mdns/libmdns/fallback/DNSTypes.jsm
netwerk/dns/mdns/libmdns/fallback/DataReader.jsm
netwerk/dns/mdns/libmdns/fallback/DataWriter.jsm
netwerk/dns/mdns/libmdns/fallback/MulticastDNS.jsm
netwerk/protocol/http/UAOverridesBootstrapper.jsm
netwerk/protocol/http/UserAgentOverrides.jsm
netwerk/protocol/http/UserAgentUpdates.jsm
netwerk/protocol/http/WellKnownOpportunisticUtils.jsm
netwerk/test/browser/browser_NetUtil.js
netwerk/test/browser/browser_about_cache.js
netwerk/test/browser/browser_bug1535877.js
netwerk/test/browser/browser_child_resource.js
netwerk/test/browser/browser_cookie_sync_across_tabs.js
netwerk/test/browser/browser_cross_process_redirect.js
netwerk/test/browser/browser_nsIFormPOSTActionChannel.js
netwerk/test/browser/browser_post_file.js
netwerk/test/browser/browser_resource_navigation.js
netwerk/test/browser/browser_test_favicon.js
netwerk/test/browser/browser_test_io_activity.js
netwerk/test/httpserver/httpd.js
netwerk/test/httpserver/test/head_utils.js
netwerk/test/httpserver/test/test_async_response_sending.js
netwerk/test/httpserver/test/test_basic_functionality.js
netwerk/test/httpserver/test/test_body_length.js
netwerk/test/httpserver/test/test_byte_range.js
netwerk/test/httpserver/test/test_cern_meta.js
netwerk/test/httpserver/test/test_default_index_handler.js
netwerk/test/httpserver/test/test_empty_body.js
netwerk/test/httpserver/test/test_errorhandler_exception.js
netwerk/test/httpserver/test/test_header_array.js
netwerk/test/httpserver/test/test_headers.js
netwerk/test/httpserver/test/test_host.js
netwerk/test/httpserver/test/test_linedata.js
netwerk/test/httpserver/test/test_load_module.js
netwerk/test/httpserver/test/test_name_scheme.js
netwerk/test/httpserver/test/test_processasync.js
netwerk/test/httpserver/test/test_qi.js
netwerk/test/httpserver/test/test_registerdirectory.js
netwerk/test/httpserver/test/test_registerprefix.js
netwerk/test/httpserver/test/test_request_line_split_in_two_packets.js
netwerk/test/httpserver/test/test_response_write.js
netwerk/test/httpserver/test/test_seizepower.js
netwerk/test/httpserver/test/test_setstatusline.js
netwerk/test/httpserver/test/test_sjs.js
netwerk/test/httpserver/test/test_sjs_object_state.js
netwerk/test/httpserver/test/test_sjs_state.js
netwerk/test/httpserver/test/test_sjs_throwing_exceptions.js
netwerk/test/httpserver/test/test_start_stop.js
netwerk/test/mochitests/file_1331680.js
netwerk/test/mochitests/file_chromecommon.js
netwerk/test/mochitests/file_documentcookie_maxage_chromescript.js
netwerk/test/mochitests/file_testcommon.js
netwerk/test/mochitests/file_testloadflags.js
netwerk/test/mochitests/file_testloadflags_chromescript.js
netwerk/test/unit/client_cert_chooser.js
netwerk/test/unit/head_cache.js
netwerk/test/unit/head_cache2.js
netwerk/test/unit/head_channels.js
netwerk/test/unit/head_cookies.js
netwerk/test/unit/socks_client_subprocess.js
netwerk/test/unit/test_1073747.js
netwerk/test/unit/test_304_responses.js
netwerk/test/unit/test_307_redirect.js
netwerk/test/unit/test_421.js
netwerk/test/unit/test_MIME_params.js
netwerk/test/unit/test_NetUtil.js
netwerk/test/unit/test_URIs.js
netwerk/test/unit/test_URIs2.js
netwerk/test/unit/test_XHR_redirects.js
netwerk/test/unit/test_about_networking.js
netwerk/test/unit/test_about_protocol.js
netwerk/test/unit/test_aboutblank.js
netwerk/test/unit/test_addr_in_use_error.js
netwerk/test/unit/test_alt-data_closeWithStatus.js
netwerk/test/unit/test_alt-data_cross_process.js
netwerk/test/unit/test_alt-data_overwrite.js
netwerk/test/unit/test_alt-data_simple.js
netwerk/test/unit/test_alt-data_stream.js
netwerk/test/unit/test_alt-data_too_big.js
netwerk/test/unit/test_altsvc.js
netwerk/test/unit/test_anonymous-coalescing.js
netwerk/test/unit/test_auth_dialog_permission.js
netwerk/test/unit/test_auth_jar.js
netwerk/test/unit/test_auth_proxy.js
netwerk/test/unit/test_authentication.js
netwerk/test/unit/test_authpromptwrapper.js
netwerk/test/unit/test_backgroundfilesaver.js
netwerk/test/unit/test_be_conservative.js
netwerk/test/unit/test_be_conservative_error_handling.js
netwerk/test/unit/test_bug1064258.js
netwerk/test/unit/test_bug1177909.js
netwerk/test/unit/test_bug1195415.js
netwerk/test/unit/test_bug1218029.js
netwerk/test/unit/test_bug1279246.js
netwerk/test/unit/test_bug1312774_http1.js
netwerk/test/unit/test_bug1312782_http1.js
netwerk/test/unit/test_bug1355539_http1.js
netwerk/test/unit/test_bug1378385_http1.js
netwerk/test/unit/test_bug1411316_http1.js
netwerk/test/unit/test_bug1527293.js
netwerk/test/unit/test_bug203271.js
netwerk/test/unit/test_bug248970_cache.js
netwerk/test/unit/test_bug248970_cookie.js
netwerk/test/unit/test_bug261425.js
netwerk/test/unit/test_bug263127.js
netwerk/test/unit/test_bug282432.js
netwerk/test/unit/test_bug321706.js
netwerk/test/unit/test_bug331825.js
netwerk/test/unit/test_bug336501.js
netwerk/test/unit/test_bug337744.js
netwerk/test/unit/test_bug365133.js
netwerk/test/unit/test_bug368702.js
netwerk/test/unit/test_bug369787.js
netwerk/test/unit/test_bug371473.js
netwerk/test/unit/test_bug376844.js
netwerk/test/unit/test_bug376865.js
netwerk/test/unit/test_bug379034.js
netwerk/test/unit/test_bug380994.js
netwerk/test/unit/test_bug388281.js
netwerk/test/unit/test_bug396389.js
netwerk/test/unit/test_bug401564.js
netwerk/test/unit/test_bug411952.js
netwerk/test/unit/test_bug412457.js
netwerk/test/unit/test_bug412945.js
netwerk/test/unit/test_bug414122.js
netwerk/test/unit/test_bug427957.js
netwerk/test/unit/test_bug429347.js
netwerk/test/unit/test_bug455311.js
netwerk/test/unit/test_bug464591.js
netwerk/test/unit/test_bug468426.js
netwerk/test/unit/test_bug468594.js
netwerk/test/unit/test_bug470716.js
netwerk/test/unit/test_bug477578.js
netwerk/test/unit/test_bug479413.js
netwerk/test/unit/test_bug479485.js
netwerk/test/unit/test_bug482601.js
netwerk/test/unit/test_bug482934.js
netwerk/test/unit/test_bug484684.js
netwerk/test/unit/test_bug490095.js
netwerk/test/unit/test_bug504014.js
netwerk/test/unit/test_bug510359.js
netwerk/test/unit/test_bug515583.js
netwerk/test/unit/test_bug526789.js
netwerk/test/unit/test_bug528292.js
netwerk/test/unit/test_bug536324_64bit_content_length.js
netwerk/test/unit/test_bug540566.js
netwerk/test/unit/test_bug543805.js
netwerk/test/unit/test_bug553970.js
netwerk/test/unit/test_bug561042.js
netwerk/test/unit/test_bug561276.js
netwerk/test/unit/test_bug580508.js
netwerk/test/unit/test_bug586908.js
netwerk/test/unit/test_bug596443.js
netwerk/test/unit/test_bug618835.js
netwerk/test/unit/test_bug633743.js
netwerk/test/unit/test_bug650522.js
netwerk/test/unit/test_bug650995.js
netwerk/test/unit/test_bug652761.js
netwerk/test/unit/test_bug654926.js
netwerk/test/unit/test_bug654926_doom_and_read.js
netwerk/test/unit/test_bug654926_test_seek.js
netwerk/test/unit/test_bug659569.js
netwerk/test/unit/test_bug660066.js
netwerk/test/unit/test_bug667087.js
netwerk/test/unit/test_bug667818.js
netwerk/test/unit/test_bug667907.js
netwerk/test/unit/test_bug669001.js
netwerk/test/unit/test_bug767025.js
netwerk/test/unit/test_bug770243.js
netwerk/test/unit/test_bug812167.js
netwerk/test/unit/test_bug826063.js
netwerk/test/unit/test_bug856978.js
netwerk/test/unit/test_bug894586.js
netwerk/test/unit/test_bug935499.js
netwerk/test/unit/test_cache-control_request.js
netwerk/test/unit/test_cache-entry-id.js
netwerk/test/unit/test_cache2-00-service-get.js
netwerk/test/unit/test_cache2-01-basic.js
netwerk/test/unit/test_cache2-01a-basic-readonly.js
netwerk/test/unit/test_cache2-01b-basic-datasize.js
netwerk/test/unit/test_cache2-01c-basic-hasmeta-only.js
netwerk/test/unit/test_cache2-01d-basic-not-wanted.js
netwerk/test/unit/test_cache2-01e-basic-bypass-if-busy.js
netwerk/test/unit/test_cache2-01f-basic-openTruncate.js
netwerk/test/unit/test_cache2-02-open-non-existing.js
netwerk/test/unit/test_cache2-03-oncacheentryavail-throws.js
netwerk/test/unit/test_cache2-04-oncacheentryavail-throws2x.js
netwerk/test/unit/test_cache2-05-visit.js
netwerk/test/unit/test_cache2-06-pb-mode.js
netwerk/test/unit/test_cache2-07-visit-memory.js
netwerk/test/unit/test_cache2-07a-open-memory.js
netwerk/test/unit/test_cache2-08-evict-disk-by-memory-storage.js
netwerk/test/unit/test_cache2-09-evict-disk-by-uri.js
netwerk/test/unit/test_cache2-10-evict-direct.js
netwerk/test/unit/test_cache2-10b-evict-direct-immediate.js
netwerk/test/unit/test_cache2-11-evict-memory.js
netwerk/test/unit/test_cache2-12-evict-disk.js
netwerk/test/unit/test_cache2-13-evict-non-existing.js
netwerk/test/unit/test_cache2-14-concurent-readers.js
netwerk/test/unit/test_cache2-14b-concurent-readers-complete.js
netwerk/test/unit/test_cache2-15-conditional-304.js
netwerk/test/unit/test_cache2-16-conditional-200.js
netwerk/test/unit/test_cache2-17-evict-all.js
netwerk/test/unit/test_cache2-18-not-valid.js
netwerk/test/unit/test_cache2-19-range-206.js
netwerk/test/unit/test_cache2-20-range-200.js
netwerk/test/unit/test_cache2-21-anon-storage.js
netwerk/test/unit/test_cache2-22-anon-visit.js
netwerk/test/unit/test_cache2-23-read-over-chunk.js
netwerk/test/unit/test_cache2-24-exists.js
netwerk/test/unit/test_cache2-25-chunk-memory-limit.js
netwerk/test/unit/test_cache2-26-no-outputstream-open.js
netwerk/test/unit/test_cache2-27-force-valid-for.js
netwerk/test/unit/test_cache2-28-last-access-attrs.js
netwerk/test/unit/test_cache2-28a-OPEN_SECRETLY.js
netwerk/test/unit/test_cache2-29a-concurrent_read_resumable_entry_size_zero.js
netwerk/test/unit/test_cache2-29b-concurrent_read_non-resumable_entry_size_zero.js
netwerk/test/unit/test_cache2-29c-concurrent_read_half-interrupted.js
netwerk/test/unit/test_cache2-29d-concurrent_read_half-corrupted-206.js
netwerk/test/unit/test_cache2-29e-concurrent_read_half-non-206-response.js
netwerk/test/unit/test_cache2-30a-entry-pinning.js
netwerk/test/unit/test_cache2-30b-pinning-storage-clear.js
netwerk/test/unit/test_cache2-30c-pinning-deferred-doom.js
netwerk/test/unit/test_cache2-30d-pinning-WasEvicted-API.js
netwerk/test/unit/test_cache2-31-visit-all.js
netwerk/test/unit/test_cache2-32-clear-origin.js
netwerk/test/unit/test_cacheForOfflineUse_no-store.js
netwerk/test/unit/test_cache_jar.js
netwerk/test/unit/test_cacheflags.js
netwerk/test/unit/test_captive_portal_service.js
netwerk/test/unit/test_channel_close.js
netwerk/test/unit/test_channel_priority.js
netwerk/test/unit/test_chunked_responses.js
netwerk/test/unit/test_compareURIs.js
netwerk/test/unit/test_compressappend.js
netwerk/test/unit/test_content_encoding_gzip.js
netwerk/test/unit/test_content_length_underrun.js
netwerk/test/unit/test_content_sniffer.js
netwerk/test/unit/test_cookie_blacklist.js
netwerk/test/unit/test_cookie_header.js
netwerk/test/unit/test_cookiejars.js
netwerk/test/unit/test_cookiejars_safebrowsing.js
netwerk/test/unit/test_cookies_async_failure.js
netwerk/test/unit/test_cookies_persistence.js
netwerk/test/unit/test_cookies_privatebrowsing.js
netwerk/test/unit/test_cookies_profile_close.js
netwerk/test/unit/test_cookies_read.js
netwerk/test/unit/test_cookies_sync_failure.js
netwerk/test/unit/test_cookies_thirdparty.js
netwerk/test/unit/test_cookies_thirdparty_nonsecure_session.js
netwerk/test/unit/test_cookies_thirdparty_session.js
netwerk/test/unit/test_data_protocol.js
netwerk/test/unit/test_disabled_ftp.js
netwerk/test/unit/test_dns_cancel.js
netwerk/test/unit/test_dns_disable_ipv4.js
netwerk/test/unit/test_dns_disable_ipv6.js
netwerk/test/unit/test_dns_localredirect.js
netwerk/test/unit/test_dns_offline.js
netwerk/test/unit/test_dns_onion.js
netwerk/test/unit/test_dns_originAttributes.js
netwerk/test/unit/test_dns_proxy_bypass.js
netwerk/test/unit/test_dns_service.js
netwerk/test/unit/test_domain_eviction.js
netwerk/test/unit/test_doomentry.js
netwerk/test/unit/test_duplicate_headers.js
netwerk/test/unit/test_esni_dns_fetch.js
netwerk/test/unit/test_event_sink.js
netwerk/test/unit/test_eviction.js
netwerk/test/unit/test_extract_charset_from_content_type.js
netwerk/test/unit/test_fallback_no-cache-entry_canceled.js
netwerk/test/unit/test_fallback_no-cache-entry_passing.js
netwerk/test/unit/test_fallback_redirect-to-different-origin_canceled.js
netwerk/test/unit/test_fallback_redirect-to-different-origin_passing.js
netwerk/test/unit/test_fallback_request-error_canceled.js
netwerk/test/unit/test_fallback_request-error_passing.js
netwerk/test/unit/test_fallback_response-error_canceled.js
netwerk/test/unit/test_fallback_response-error_passing.js
netwerk/test/unit/test_file_protocol.js
netwerk/test/unit/test_filestreams.js
netwerk/test/unit/test_freshconnection.js
netwerk/test/unit/test_getHost.js
netwerk/test/unit/test_gre_resources.js
netwerk/test/unit/test_gzipped_206.js
netwerk/test/unit/test_head.js
netwerk/test/unit/test_head_request_no_response_body.js
netwerk/test/unit/test_header_Accept-Language.js
netwerk/test/unit/test_header_Accept-Language_case.js
netwerk/test/unit/test_header_Server_Timing.js
netwerk/test/unit/test_headers.js
netwerk/test/unit/test_hostnameIsLocalIPAddress.js
netwerk/test/unit/test_http1-proxy.js
netwerk/test/unit/test_http2-proxy.js
netwerk/test/unit/test_http2.js
netwerk/test/unit/test_httpResponseTimeout.js
netwerk/test/unit/test_http_headers.js
netwerk/test/unit/test_httpauth.js
netwerk/test/unit/test_httpcancel.js
netwerk/test/unit/test_httpsuspend.js
netwerk/test/unit/test_idn_blacklist.js
netwerk/test/unit/test_idn_urls.js
netwerk/test/unit/test_idna2008.js
netwerk/test/unit/test_idnservice.js
netwerk/test/unit/test_immutable.js
netwerk/test/unit/test_inhibit_caching.js
netwerk/test/unit/test_ioservice.js
netwerk/test/unit/test_large_port.js
netwerk/test/unit/test_localstreams.js
netwerk/test/unit/test_mismatch_last-modified.js
netwerk/test/unit/test_mozTXTToHTMLConv.js
netwerk/test/unit/test_multipart_byteranges.js
netwerk/test/unit/test_multipart_streamconv-byte-by-byte.js
netwerk/test/unit/test_multipart_streamconv.js
netwerk/test/unit/test_multipart_streamconv_missing_boundary_lead_dashes.js
netwerk/test/unit/test_multipart_streamconv_missing_lead_boundary.js
netwerk/test/unit/test_nestedabout_serialize.js
netwerk/test/unit/test_net_addr.js
netwerk/test/unit/test_network_activity.js
netwerk/test/unit/test_network_connectivity_service.js
netwerk/test/unit/test_nojsredir.js
netwerk/test/unit/test_nsIBufferedOutputStream_writeFrom_block.js
netwerk/test/unit/test_offline_status.js
netwerk/test/unit/test_offlinecache_custom-directory.js
netwerk/test/unit/test_origin.js
netwerk/test/unit/test_original_sent_received_head.js
netwerk/test/unit/test_parse_content_type.js
netwerk/test/unit/test_partial_response_entry_size_smart_shrink.js
netwerk/test/unit/test_permmgr.js
netwerk/test/unit/test_ping_aboutnetworking.js
netwerk/test/unit/test_pinned_app_cache.js
netwerk/test/unit/test_plaintext_sniff.js
netwerk/test/unit/test_post.js
netwerk/test/unit/test_predictor.js
netwerk/test/unit/test_private_cookie_changed.js
netwerk/test/unit/test_private_necko_channel.js
netwerk/test/unit/test_progress.js
netwerk/test/unit/test_protocolproxyservice-async-filters.js
netwerk/test/unit/test_protocolproxyservice.js
netwerk/test/unit/test_proxy-failover_canceled.js
netwerk/test/unit/test_proxy-failover_passing.js
netwerk/test/unit/test_proxy-replace_canceled.js
netwerk/test/unit/test_proxy-replace_passing.js
netwerk/test/unit/test_proxyconnect.js
netwerk/test/unit/test_psl.js
netwerk/test/unit/test_race_cache_with_network.js
netwerk/test/unit/test_range_requests.js
netwerk/test/unit/test_readline.js
netwerk/test/unit/test_redirect-caching_canceled.js
netwerk/test/unit/test_redirect-caching_failure.js
netwerk/test/unit/test_redirect-caching_passing.js
netwerk/test/unit/test_redirect_baduri.js
netwerk/test/unit/test_redirect_canceled.js
netwerk/test/unit/test_redirect_different-protocol.js
netwerk/test/unit/test_redirect_failure.js
netwerk/test/unit/test_redirect_from_script.js
netwerk/test/unit/test_redirect_from_script_after-open_passing.js
netwerk/test/unit/test_redirect_history.js
netwerk/test/unit/test_redirect_loop.js
netwerk/test/unit/test_redirect_passing.js
netwerk/test/unit/test_reentrancy.js
netwerk/test/unit/test_referrer.js
netwerk/test/unit/test_referrer_cross_origin.js
netwerk/test/unit/test_referrer_policy.js
netwerk/test/unit/test_reopen.js
netwerk/test/unit/test_reply_without_content_type.js
netwerk/test/unit/test_resumable_channel.js
netwerk/test/unit/test_resumable_truncate.js
netwerk/test/unit/test_safeoutputstream.js
netwerk/test/unit/test_safeoutputstream_append.js
netwerk/test/unit/test_schema_2_migration.js
netwerk/test/unit/test_schema_3_migration.js
netwerk/test/unit/test_separate_connections.js
netwerk/test/unit/test_signature_extraction.js
netwerk/test/unit/test_simple.js
netwerk/test/unit/test_sockettransportsvc_available.js
netwerk/test/unit/test_socks.js
netwerk/test/unit/test_speculative_connect.js
netwerk/test/unit/test_stale-while-revalidate_max-age-0.js
netwerk/test/unit/test_stale-while-revalidate_negative.js
netwerk/test/unit/test_stale-while-revalidate_positive.js
netwerk/test/unit/test_standardurl.js
netwerk/test/unit/test_standardurl_default_port.js
netwerk/test/unit/test_standardurl_port.js
netwerk/test/unit/test_streamcopier.js
netwerk/test/unit/test_substituting_protocol_handler.js
netwerk/test/unit/test_suspend_channel_before_connect.js
netwerk/test/unit/test_suspend_channel_on_authRetry.js
netwerk/test/unit/test_suspend_channel_on_examine.js
netwerk/test/unit/test_suspend_channel_on_examine_merged_response.js
netwerk/test/unit/test_suspend_channel_on_modified.js
netwerk/test/unit/test_synthesized_response.js
netwerk/test/unit/test_throttlechannel.js
netwerk/test/unit/test_throttlequeue.js
netwerk/test/unit/test_throttling.js
netwerk/test/unit/test_tldservice_nextsubdomain.js
netwerk/test/unit/test_tls_flags.js
netwerk/test/unit/test_tls_flags_separate_connections.js
netwerk/test/unit/test_tls_server.js
netwerk/test/unit/test_tls_server_multiple_clients.js
netwerk/test/unit/test_traceable_channel.js
netwerk/test/unit/test_trackingProtection_annotateChannels.js
netwerk/test/unit/test_trr.js
netwerk/test/unit/test_udp_multicast.js
netwerk/test/unit/test_udpsocket.js
netwerk/test/unit/test_udpsocket_offline.js
netwerk/test/unit/test_unescapestring.js
netwerk/test/unit/test_unix_domain.js
netwerk/test/unit/test_uri_mutator.js
netwerk/test/unit/test_websocket_offline.js
netwerk/test/unit/test_xmlhttprequest.js
netwerk/test/unit_ipc/child_channel_id.js
netwerk/test/unit_ipc/child_cookie_header.js
netwerk/test/unit_ipc/head_channels_clone.js
netwerk/test/unit_ipc/test_alt-data_closeWithStatus_wrap.js
netwerk/test/unit_ipc/test_alt-data_cross_process_wrap.js
netwerk/test/unit_ipc/test_alt-data_simple_wrap.js
netwerk/test/unit_ipc/test_bug528292_wrap.js
netwerk/test/unit_ipc/test_cache-entry-id_wrap.js
netwerk/test/unit_ipc/test_channel_id.js
netwerk/test/unit_ipc/test_channel_priority_wrap.js
netwerk/test/unit_ipc/test_cookie_header_stripped.js
netwerk/test/unit_ipc/test_cookiejars_wrap.js
netwerk/test/unit_ipc/test_httpcancel_wrap.js
netwerk/test/unit_ipc/test_httpsuspend_wrap.js
netwerk/test/unit_ipc/test_predictor_wrap.js
netwerk/test/unit_ipc/test_redirect-caching_canceled_wrap.js
netwerk/test/unit_ipc/test_redirect-caching_failure_wrap.js
netwerk/test/unit_ipc/test_redirect-caching_passing_wrap.js
netwerk/test/unit_ipc/test_redirect_canceled_wrap.js
netwerk/test/unit_ipc/test_reentrancy_wrap.js
netwerk/test/unit_ipc/test_synthesized_response_wrap.js
netwerk/test/unit_ipc/test_trackingProtection_annotateChannels_wrap1.js
netwerk/test/unit_ipc/test_trackingProtection_annotateChannels_wrap2.js
netwerk/url-classifier/UrlClassifierSkipListService.jsm
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -40,17 +40,16 @@ module.exports = {
     "plugin:mozilla/recommended"
   ],
   "plugins": [
     "mozilla"
   ],
   "overrides": [{
       "files": [
         "devtools/**",
-        "netwerk/**",
         "nsprpub/**",
         "other-licenses/**",
         "parser/**",
         "python/**",
         "remote/**",
         "security/**",
         "services/**",
         "servo/**",
--- a/.prettierignore
+++ b/.prettierignore
@@ -35,17 +35,16 @@ security/manager/ssl/security-prefs.js
 services/common/services-common.js
 services/sync/services-sync.js
 services/sync/tests/unit/prefs_test_prefs_store.js
 testing/marionette/prefs/marionette.js
 toolkit/components/telemetry/datareporting-prefs.js
 toolkit/components/telemetry/healthreport-prefs.js
 
 # Ignore all top-level directories for now.
-netwerk/**
 nsprpub/**
 other-licenses/**
 parser/**
 python/**
 remote/**
 security/**
 services/**
 servo/**
--- a/netwerk/base/NetUtil.jsm
+++ b/netwerk/base/NetUtil.jsm
@@ -1,429 +1,449 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 4 -*-
  * vim: sw=4 ts=4 sts=4 et filetype=javascript
  * 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/. */
 
-var EXPORTED_SYMBOLS = [
-  "NetUtil",
-];
+var EXPORTED_SYMBOLS = ["NetUtil"];
 
 /**
  * Necko utilities
  */
 
 // //////////////////////////////////////////////////////////////////////////////
 // // Constants
 
 const PR_UINT32_MAX = 0xffffffff;
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-const BinaryInputStream = Components.Constructor("@mozilla.org/binaryinputstream;1",
-                                                 "nsIBinaryInputStream", "setInputStream");
+const BinaryInputStream = Components.Constructor(
+  "@mozilla.org/binaryinputstream;1",
+  "nsIBinaryInputStream",
+  "setInputStream"
+);
 
 // //////////////////////////////////////////////////////////////////////////////
 // // NetUtil Object
 
 var NetUtil = {
-    /**
-     * Function to perform simple async copying from aSource (an input stream)
-     * to aSink (an output stream).  The copy will happen on some background
-     * thread.  Both streams will be closed when the copy completes.
-     *
-     * @param aSource
-     *        The input stream to read from
-     * @param aSink
-     *        The output stream to write to
-     * @param aCallback [optional]
-     *        A function that will be called at copy completion with a single
-     *        argument: the nsresult status code for the copy operation.
-     *
-     * @return An nsIRequest representing the copy operation (for example, this
-     *         can be used to cancel the copying).  The consumer can ignore the
-     *         return value if desired.
-     */
-    asyncCopy: function NetUtil_asyncCopy(aSource, aSink,
-                                          aCallback = null) {
-        if (!aSource || !aSink) {
-            let exception = new Components.Exception(
-                "Must have a source and a sink",
-                Cr.NS_ERROR_INVALID_ARG,
-                Components.stack.caller
-            );
-            throw exception;
-        }
+  /**
+   * Function to perform simple async copying from aSource (an input stream)
+   * to aSink (an output stream).  The copy will happen on some background
+   * thread.  Both streams will be closed when the copy completes.
+   *
+   * @param aSource
+   *        The input stream to read from
+   * @param aSink
+   *        The output stream to write to
+   * @param aCallback [optional]
+   *        A function that will be called at copy completion with a single
+   *        argument: the nsresult status code for the copy operation.
+   *
+   * @return An nsIRequest representing the copy operation (for example, this
+   *         can be used to cancel the copying).  The consumer can ignore the
+   *         return value if desired.
+   */
+  asyncCopy: function NetUtil_asyncCopy(aSource, aSink, aCallback = null) {
+    if (!aSource || !aSink) {
+      let exception = new Components.Exception(
+        "Must have a source and a sink",
+        Cr.NS_ERROR_INVALID_ARG,
+        Components.stack.caller
+      );
+      throw exception;
+    }
 
-        // make a stream copier
-        var copier = Cc["@mozilla.org/network/async-stream-copier;1"].
-            createInstance(Ci.nsIAsyncStreamCopier2);
-        copier.init(aSource, aSink,
-                    null /* Default event target */,
-                    0 /* Default length */,
-                    true, true /* Auto-close */);
+    // make a stream copier
+    var copier = Cc[
+      "@mozilla.org/network/async-stream-copier;1"
+    ].createInstance(Ci.nsIAsyncStreamCopier2);
+    copier.init(
+      aSource,
+      aSink,
+      null /* Default event target */,
+      0 /* Default length */,
+      true,
+      true /* Auto-close */
+    );
 
-        var observer;
-        if (aCallback) {
-            observer = {
-                onStartRequest(aRequest) {},
-                onStopRequest(aRequest, aStatusCode) {
-                    aCallback(aStatusCode);
-                },
-            };
-        } else {
-            observer = null;
-        }
+    var observer;
+    if (aCallback) {
+      observer = {
+        onStartRequest(aRequest) {},
+        onStopRequest(aRequest, aStatusCode) {
+          aCallback(aStatusCode);
+        },
+      };
+    } else {
+      observer = null;
+    }
+
+    // start the copying
+    copier.QueryInterface(Ci.nsIAsyncStreamCopier).asyncCopy(observer, null);
+    return copier;
+  },
 
-        // start the copying
-        copier.QueryInterface(Ci.nsIAsyncStreamCopier).asyncCopy(observer, null);
-        return copier;
-    },
+  /**
+   * Asynchronously opens a source and fetches the response.  While the fetch
+   * is asynchronous, I/O may happen on the main thread.  When reading from
+   * a local file, prefer using "OS.File" methods instead.
+   *
+   * @param aSource
+   *        This argument can be one of the following:
+   *         - An options object that will be passed to NetUtil.newChannel.
+   *         - An existing nsIChannel.
+   *         - An existing nsIInputStream.
+   *        Using an nsIURI, nsIFile, or string spec directly is deprecated.
+   * @param aCallback
+   *        The callback function that will be notified upon completion.  It
+   *        will get these arguments:
+   *        1) An nsIInputStream containing the data from aSource, if any.
+   *        2) The status code from opening the source.
+   *        3) Reference to the nsIRequest.
+   */
+  asyncFetch: function NetUtil_asyncFetch(aSource, aCallback) {
+    if (!aSource || !aCallback) {
+      let exception = new Components.Exception(
+        "Must have a source and a callback",
+        Cr.NS_ERROR_INVALID_ARG,
+        Components.stack.caller
+      );
+      throw exception;
+    }
+
+    // Create a pipe that will create our output stream that we can use once
+    // we have gotten all the data.
+    let pipe = Cc["@mozilla.org/pipe;1"].createInstance(Ci.nsIPipe);
+    pipe.init(true, true, 0, PR_UINT32_MAX, null);
+
+    // Create a listener that will give data to the pipe's output stream.
+    let listener = Cc[
+      "@mozilla.org/network/simple-stream-listener;1"
+    ].createInstance(Ci.nsISimpleStreamListener);
+    listener.init(pipe.outputStream, {
+      onStartRequest(aRequest) {},
+      onStopRequest(aRequest, aStatusCode) {
+        pipe.outputStream.close();
+        aCallback(pipe.inputStream, aStatusCode, aRequest);
+      },
+    });
 
-    /**
-     * Asynchronously opens a source and fetches the response.  While the fetch
-     * is asynchronous, I/O may happen on the main thread.  When reading from
-     * a local file, prefer using "OS.File" methods instead.
-     *
-     * @param aSource
-     *        This argument can be one of the following:
-     *         - An options object that will be passed to NetUtil.newChannel.
-     *         - An existing nsIChannel.
-     *         - An existing nsIInputStream.
-     *        Using an nsIURI, nsIFile, or string spec directly is deprecated.
-     * @param aCallback
-     *        The callback function that will be notified upon completion.  It
-     *        will get these arguments:
-     *        1) An nsIInputStream containing the data from aSource, if any.
-     *        2) The status code from opening the source.
-     *        3) Reference to the nsIRequest.
-     */
-    asyncFetch: function NetUtil_asyncFetch(aSource, aCallback) {
-        if (!aSource || !aCallback) {
-            let exception = new Components.Exception(
-                "Must have a source and a callback",
-                Cr.NS_ERROR_INVALID_ARG,
-                Components.stack.caller
-            );
-            throw exception;
-        }
+    // Input streams are handled slightly differently from everything else.
+    if (aSource instanceof Ci.nsIInputStream) {
+      let pump = Cc["@mozilla.org/network/input-stream-pump;1"].createInstance(
+        Ci.nsIInputStreamPump
+      );
+      pump.init(aSource, 0, 0, true);
+      pump.asyncRead(listener, null);
+      return;
+    }
+
+    let channel = aSource;
+    if (!(channel instanceof Ci.nsIChannel)) {
+      channel = this.newChannel(aSource);
+    }
+
+    try {
+      channel.asyncOpen(listener);
+    } catch (e) {
+      let exception = new Components.Exception(
+        "Failed to open input source '" + channel.originalURI.spec + "'",
+        e.result,
+        Components.stack.caller,
+        aSource,
+        e
+      );
+      throw exception;
+    }
+  },
 
-        // Create a pipe that will create our output stream that we can use once
-        // we have gotten all the data.
-        let pipe = Cc["@mozilla.org/pipe;1"].
-                   createInstance(Ci.nsIPipe);
-        pipe.init(true, true, 0, PR_UINT32_MAX, null);
+  /**
+   * Constructs a new URI for the given spec, character set, and base URI, or
+   * an nsIFile.
+   *
+   * @param aTarget
+   *        The string spec for the desired URI or an nsIFile.
+   * @param aOriginCharset [optional]
+   *        The character set for the URI.  Only used if aTarget is not an
+   *        nsIFile.
+   * @param aBaseURI [optional]
+   *        The base URI for the spec.  Only used if aTarget is not an
+   *        nsIFile.
+   *
+   * @return an nsIURI object.
+   */
+  newURI: function NetUtil_newURI(aTarget, aOriginCharset, aBaseURI) {
+    if (!aTarget) {
+      let exception = new Components.Exception(
+        "Must have a non-null string spec or nsIFile object",
+        Cr.NS_ERROR_INVALID_ARG,
+        Components.stack.caller
+      );
+      throw exception;
+    }
 
-        // Create a listener that will give data to the pipe's output stream.
-        let listener = Cc["@mozilla.org/network/simple-stream-listener;1"].
-                       createInstance(Ci.nsISimpleStreamListener);
-        listener.init(pipe.outputStream, {
-            onStartRequest(aRequest) {},
-            onStopRequest(aRequest, aStatusCode) {
-                pipe.outputStream.close();
-                aCallback(pipe.inputStream, aStatusCode, aRequest);
-            },
-        });
+    if (aTarget instanceof Ci.nsIFile) {
+      return Services.io.newFileURI(aTarget);
+    }
+
+    return Services.io.newURI(aTarget, aOriginCharset, aBaseURI);
+  },
 
-        // Input streams are handled slightly differently from everything else.
-        if (aSource instanceof Ci.nsIInputStream) {
-            let pump = Cc["@mozilla.org/network/input-stream-pump;1"].
-                       createInstance(Ci.nsIInputStreamPump);
-            pump.init(aSource, 0, 0, true);
-            pump.asyncRead(listener, null);
-            return;
-        }
-
-        let channel = aSource;
-        if (!(channel instanceof Ci.nsIChannel)) {
-            channel = this.newChannel(aSource);
-        }
+  /**
+   * Constructs a new channel for the given source.
+   *
+   * Keep in mind that URIs coming from a webpage should *never* use the
+   * systemPrincipal as the loadingPrincipal.
+   *
+   * @param aWhatToLoad
+   *        This argument used to be a string spec for the desired URI, an
+   *        nsIURI, or an nsIFile.  Now it should be an options object with
+   *        the following properties:
+   *        {
+   *          uri:
+   *            The full URI spec string, nsIURI or nsIFile to create the
+   *            channel for.
+   *            Note that this cannot be an nsIFile if you have to specify a
+   *            non-default charset or base URI.  Call NetUtil.newURI first if
+   *            you need to construct an URI using those options.
+   *          loadingNode:
+   *          loadingPrincipal:
+   *          triggeringPrincipal:
+   *          securityFlags:
+   *          contentPolicyType:
+   *            These will be used as values for the nsILoadInfo object on the
+   *            created channel. For details, see nsILoadInfo in nsILoadInfo.idl
+   *          loadUsingSystemPrincipal:
+   *            Set this to true to use the system principal as
+   *            loadingPrincipal.  This must be omitted if loadingPrincipal or
+   *            loadingNode are present.
+   *            This should be used with care as it skips security checks.
+   *        }
+   * @return an nsIChannel object.
+   */
+  newChannel: function NetUtil_newChannel(aWhatToLoad) {
+    // Make sure the API is called using only the options object.
+    if (typeof aWhatToLoad != "object" || arguments.length != 1) {
+      throw new Components.Exception(
+        "newChannel requires a single object argument",
+        Cr.NS_ERROR_INVALID_ARG,
+        Components.stack.caller
+      );
+    }
 
-        try {
-            channel.asyncOpen(listener);
-        } catch (e) {
-            let exception = new Components.Exception(
-                "Failed to open input source '" + channel.originalURI.spec + "'",
-                e.result,
-                Components.stack.caller,
-                aSource,
-                e
-            );
-            throw exception;
-        }
-    },
+    let {
+      uri,
+      loadingNode,
+      loadingPrincipal,
+      loadUsingSystemPrincipal,
+      triggeringPrincipal,
+      securityFlags,
+      contentPolicyType,
+    } = aWhatToLoad;
+
+    if (!uri) {
+      throw new Components.Exception(
+        "newChannel requires the 'uri' property on the options object.",
+        Cr.NS_ERROR_INVALID_ARG,
+        Components.stack.caller
+      );
+    }
+
+    if (typeof uri == "string" || uri instanceof Ci.nsIFile) {
+      uri = this.newURI(uri);
+    }
+
+    if (!loadingNode && !loadingPrincipal && !loadUsingSystemPrincipal) {
+      throw new Components.Exception(
+        "newChannel requires at least one of the 'loadingNode'," +
+          " 'loadingPrincipal', or 'loadUsingSystemPrincipal'" +
+          " properties on the options object.",
+        Cr.NS_ERROR_INVALID_ARG,
+        Components.stack.caller
+      );
+    }
 
-    /**
-     * Constructs a new URI for the given spec, character set, and base URI, or
-     * an nsIFile.
-     *
-     * @param aTarget
-     *        The string spec for the desired URI or an nsIFile.
-     * @param aOriginCharset [optional]
-     *        The character set for the URI.  Only used if aTarget is not an
-     *        nsIFile.
-     * @param aBaseURI [optional]
-     *        The base URI for the spec.  Only used if aTarget is not an
-     *        nsIFile.
-     *
-     * @return an nsIURI object.
-     */
-    newURI: function NetUtil_newURI(aTarget, aOriginCharset, aBaseURI) {
-        if (!aTarget) {
-            let exception = new Components.Exception(
-                "Must have a non-null string spec or nsIFile object",
-                Cr.NS_ERROR_INVALID_ARG,
-                Components.stack.caller
-            );
-            throw exception;
-        }
+    if (loadUsingSystemPrincipal === true) {
+      if (loadingNode || loadingPrincipal) {
+        throw new Components.Exception(
+          "newChannel does not accept 'loadUsingSystemPrincipal'" +
+            " if the 'loadingNode' or 'loadingPrincipal' properties" +
+            " are present on the options object.",
+          Cr.NS_ERROR_INVALID_ARG,
+          Components.stack.caller
+        );
+      }
+      loadingPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
+    } else if (loadUsingSystemPrincipal !== undefined) {
+      throw new Components.Exception(
+        "newChannel requires the 'loadUsingSystemPrincipal'" +
+          " property on the options object to be 'true' or 'undefined'.",
+        Cr.NS_ERROR_INVALID_ARG,
+        Components.stack.caller
+      );
+    }
 
-        if (aTarget instanceof Ci.nsIFile) {
-            return Services.io.newFileURI(aTarget);
-        }
+    if (securityFlags === undefined) {
+      if (!loadUsingSystemPrincipal) {
+        throw new Components.Exception(
+          "newChannel requires the 'securityFlags' property on" +
+            " the options object unless loading from system principal.",
+          Cr.NS_ERROR_INVALID_ARG,
+          Components.stack.caller
+        );
+      }
+      securityFlags = Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL;
+    }
 
-        return Services.io.newURI(aTarget, aOriginCharset, aBaseURI);
-    },
+    if (contentPolicyType === undefined) {
+      if (!loadUsingSystemPrincipal) {
+        throw new Components.Exception(
+          "newChannel requires the 'contentPolicyType' property on" +
+            " the options object unless loading from system principal.",
+          Cr.NS_ERROR_INVALID_ARG,
+          Components.stack.caller
+        );
+      }
+      contentPolicyType = Ci.nsIContentPolicy.TYPE_OTHER;
+    }
+
+    return Services.io.newChannelFromURI(
+      uri,
+      loadingNode || null,
+      loadingPrincipal || null,
+      triggeringPrincipal || null,
+      securityFlags,
+      contentPolicyType
+    );
+  },
 
-    /**
-     * Constructs a new channel for the given source.
-     *
-     * Keep in mind that URIs coming from a webpage should *never* use the
-     * systemPrincipal as the loadingPrincipal.
-     *
-     * @param aWhatToLoad
-     *        This argument used to be a string spec for the desired URI, an
-     *        nsIURI, or an nsIFile.  Now it should be an options object with
-     *        the following properties:
-     *        {
-     *          uri:
-     *            The full URI spec string, nsIURI or nsIFile to create the
-     *            channel for.
-     *            Note that this cannot be an nsIFile if you have to specify a
-     *            non-default charset or base URI.  Call NetUtil.newURI first if
-     *            you need to construct an URI using those options.
-     *          loadingNode:
-     *          loadingPrincipal:
-     *          triggeringPrincipal:
-     *          securityFlags:
-     *          contentPolicyType:
-     *            These will be used as values for the nsILoadInfo object on the
-     *            created channel. For details, see nsILoadInfo in nsILoadInfo.idl
-     *          loadUsingSystemPrincipal:
-     *            Set this to true to use the system principal as
-     *            loadingPrincipal.  This must be omitted if loadingPrincipal or
-     *            loadingNode are present.
-     *            This should be used with care as it skips security checks.
-     *        }
-     * @return an nsIChannel object.
-     */
-    newChannel: function NetUtil_newChannel(aWhatToLoad) {
-        // Make sure the API is called using only the options object.
-        if (typeof aWhatToLoad != "object" || arguments.length != 1) {
-            throw new Components.Exception(
-                "newChannel requires a single object argument",
-                Cr.NS_ERROR_INVALID_ARG,
-                Components.stack.caller
-            );
+  /**
+   * Reads aCount bytes from aInputStream into a string.
+   *
+   * @param aInputStream
+   *        The input stream to read from.
+   * @param aCount
+   *        The number of bytes to read from the stream.
+   * @param aOptions [optional]
+   *        charset
+   *          The character encoding of stream data.
+   *        replacement
+   *          The character to replace unknown byte sequences.
+   *          If unset, it causes an exceptions to be thrown.
+   *
+   * @return the bytes from the input stream in string form.
+   *
+   * @throws NS_ERROR_INVALID_ARG if aInputStream is not an nsIInputStream.
+   * @throws NS_BASE_STREAM_WOULD_BLOCK if reading from aInputStream would
+   *         block the calling thread (non-blocking mode only).
+   * @throws NS_ERROR_FAILURE if there are not enough bytes available to read
+   *         aCount amount of data.
+   * @throws NS_ERROR_ILLEGAL_INPUT if aInputStream has invalid sequences
+   */
+  readInputStreamToString: function NetUtil_readInputStreamToString(
+    aInputStream,
+    aCount,
+    aOptions
+  ) {
+    if (!(aInputStream instanceof Ci.nsIInputStream)) {
+      let exception = new Components.Exception(
+        "First argument should be an nsIInputStream",
+        Cr.NS_ERROR_INVALID_ARG,
+        Components.stack.caller
+      );
+      throw exception;
+    }
+
+    if (!aCount) {
+      let exception = new Components.Exception(
+        "Non-zero amount of bytes must be specified",
+        Cr.NS_ERROR_INVALID_ARG,
+        Components.stack.caller
+      );
+      throw exception;
+    }
+
+    if (aOptions && "charset" in aOptions) {
+      let cis = Cc["@mozilla.org/intl/converter-input-stream;1"].createInstance(
+        Ci.nsIConverterInputStream
+      );
+      try {
+        // When replacement is set, the character that is unknown sequence
+        // replaces with aOptions.replacement character.
+        if (!("replacement" in aOptions)) {
+          // aOptions.replacement isn't set.
+          // If input stream has unknown sequences for aOptions.charset,
+          // throw NS_ERROR_ILLEGAL_INPUT.
+          aOptions.replacement = 0;
         }
 
-        let { uri,
-              loadingNode,
-              loadingPrincipal,
-              loadUsingSystemPrincipal,
-              triggeringPrincipal,
-              securityFlags,
-              contentPolicyType } = aWhatToLoad;
-
-        if (!uri) {
-            throw new Components.Exception(
-                "newChannel requires the 'uri' property on the options object.",
-                Cr.NS_ERROR_INVALID_ARG,
-                Components.stack.caller
-            );
-        }
-
-        if (typeof uri == "string" || uri instanceof Ci.nsIFile) {
-            uri = this.newURI(uri);
-        }
-
-        if (!loadingNode && !loadingPrincipal && !loadUsingSystemPrincipal) {
-            throw new Components.Exception(
-                "newChannel requires at least one of the 'loadingNode'," +
-                " 'loadingPrincipal', or 'loadUsingSystemPrincipal'" +
-                " properties on the options object.",
-                Cr.NS_ERROR_INVALID_ARG,
-                Components.stack.caller
-            );
-        }
+        cis.init(aInputStream, aOptions.charset, aCount, aOptions.replacement);
+        let str = {};
+        cis.readString(-1, str);
+        cis.close();
+        return str.value;
+      } catch (e) {
+        // Adjust the stack so it throws at the caller's location.
+        throw new Components.Exception(
+          e.message,
+          e.result,
+          Components.stack.caller,
+          e.data
+        );
+      }
+    }
 
-        if (loadUsingSystemPrincipal === true) {
-            if (loadingNode || loadingPrincipal) {
-                throw new Components.Exception(
-                    "newChannel does not accept 'loadUsingSystemPrincipal'" +
-                    " if the 'loadingNode' or 'loadingPrincipal' properties" +
-                    " are present on the options object.",
-                    Cr.NS_ERROR_INVALID_ARG,
-                    Components.stack.caller
-                );
-            }
-            loadingPrincipal = Services.scriptSecurityManager
-                                       .getSystemPrincipal();
-        } else if (loadUsingSystemPrincipal !== undefined) {
-            throw new Components.Exception(
-                "newChannel requires the 'loadUsingSystemPrincipal'" +
-                " property on the options object to be 'true' or 'undefined'.",
-                Cr.NS_ERROR_INVALID_ARG,
-                Components.stack.caller
-            );
-        }
-
-        if (securityFlags === undefined) {
-            if (!loadUsingSystemPrincipal) {
-                throw new Components.Exception(
-                    "newChannel requires the 'securityFlags' property on" +
-                    " the options object unless loading from system principal.",
-                    Cr.NS_ERROR_INVALID_ARG,
-                    Components.stack.caller
-                );
-            }
-            securityFlags = Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL;
-        }
-
-        if (contentPolicyType === undefined) {
-            if (!loadUsingSystemPrincipal) {
-                throw new Components.Exception(
-                    "newChannel requires the 'contentPolicyType' property on" +
-                    " the options object unless loading from system principal.",
-                    Cr.NS_ERROR_INVALID_ARG,
-                    Components.stack.caller
-                );
-            }
-            contentPolicyType = Ci.nsIContentPolicy.TYPE_OTHER;
-        }
-
-        return Services.io.newChannelFromURI(uri,
-                                             loadingNode || null,
-                                             loadingPrincipal || null,
-                                             triggeringPrincipal || null,
-                                             securityFlags,
-                                             contentPolicyType);
-    },
+    let sis = Cc["@mozilla.org/scriptableinputstream;1"].createInstance(
+      Ci.nsIScriptableInputStream
+    );
+    sis.init(aInputStream);
+    try {
+      return sis.readBytes(aCount);
+    } catch (e) {
+      // Adjust the stack so it throws at the caller's location.
+      throw new Components.Exception(
+        e.message,
+        e.result,
+        Components.stack.caller,
+        e.data
+      );
+    }
+  },
 
-    /**
-     * Reads aCount bytes from aInputStream into a string.
-     *
-     * @param aInputStream
-     *        The input stream to read from.
-     * @param aCount
-     *        The number of bytes to read from the stream.
-     * @param aOptions [optional]
-     *        charset
-     *          The character encoding of stream data.
-     *        replacement
-     *          The character to replace unknown byte sequences.
-     *          If unset, it causes an exceptions to be thrown.
-     *
-     * @return the bytes from the input stream in string form.
-     *
-     * @throws NS_ERROR_INVALID_ARG if aInputStream is not an nsIInputStream.
-     * @throws NS_BASE_STREAM_WOULD_BLOCK if reading from aInputStream would
-     *         block the calling thread (non-blocking mode only).
-     * @throws NS_ERROR_FAILURE if there are not enough bytes available to read
-     *         aCount amount of data.
-     * @throws NS_ERROR_ILLEGAL_INPUT if aInputStream has invalid sequences
-     */
-    readInputStreamToString: function NetUtil_readInputStreamToString(aInputStream,
-                                                                      aCount,
-                                                                      aOptions) {
-        if (!(aInputStream instanceof Ci.nsIInputStream)) {
-            let exception = new Components.Exception(
-                "First argument should be an nsIInputStream",
-                Cr.NS_ERROR_INVALID_ARG,
-                Components.stack.caller
-            );
-            throw exception;
-        }
-
-        if (!aCount) {
-            let exception = new Components.Exception(
-                "Non-zero amount of bytes must be specified",
-                Cr.NS_ERROR_INVALID_ARG,
-                Components.stack.caller
-            );
-            throw exception;
-        }
-
-        if (aOptions && "charset" in aOptions) {
-          let cis = Cc["@mozilla.org/intl/converter-input-stream;1"].
-                    createInstance(Ci.nsIConverterInputStream);
-          try {
-            // When replacement is set, the character that is unknown sequence
-            // replaces with aOptions.replacement character.
-            if (!("replacement" in aOptions)) {
-              // aOptions.replacement isn't set.
-              // If input stream has unknown sequences for aOptions.charset,
-              // throw NS_ERROR_ILLEGAL_INPUT.
-              aOptions.replacement = 0;
-            }
+  /**
+   * Reads aCount bytes from aInputStream into a string.
+   *
+   * @param {nsIInputStream} aInputStream
+   *        The input stream to read from.
+   * @param {integer} [aCount = aInputStream.available()]
+   *        The number of bytes to read from the stream.
+   *
+   * @return the bytes from the input stream in string form.
+   *
+   * @throws NS_ERROR_INVALID_ARG if aInputStream is not an nsIInputStream.
+   * @throws NS_BASE_STREAM_WOULD_BLOCK if reading from aInputStream would
+   *         block the calling thread (non-blocking mode only).
+   * @throws NS_ERROR_FAILURE if there are not enough bytes available to read
+   *         aCount amount of data.
+   */
+  readInputStream(aInputStream, aCount) {
+    if (!(aInputStream instanceof Ci.nsIInputStream)) {
+      let exception = new Components.Exception(
+        "First argument should be an nsIInputStream",
+        Cr.NS_ERROR_INVALID_ARG,
+        Components.stack.caller
+      );
+      throw exception;
+    }
 
-            cis.init(aInputStream, aOptions.charset, aCount,
-                     aOptions.replacement);
-            let str = {};
-            cis.readString(-1, str);
-            cis.close();
-            return str.value;
-          } catch (e) {
-            // Adjust the stack so it throws at the caller's location.
-            throw new Components.Exception(e.message, e.result,
-                                           Components.stack.caller, e.data);
-          }
-        }
-
-        let sis = Cc["@mozilla.org/scriptableinputstream;1"].
-                  createInstance(Ci.nsIScriptableInputStream);
-        sis.init(aInputStream);
-        try {
-            return sis.readBytes(aCount);
-        } catch (e) {
-            // Adjust the stack so it throws at the caller's location.
-            throw new Components.Exception(e.message, e.result,
-                                           Components.stack.caller, e.data);
-        }
-    },
+    if (!aCount) {
+      aCount = aInputStream.available();
+    }
 
-    /**
-     * Reads aCount bytes from aInputStream into a string.
-     *
-     * @param {nsIInputStream} aInputStream
-     *        The input stream to read from.
-     * @param {integer} [aCount = aInputStream.available()]
-     *        The number of bytes to read from the stream.
-     *
-     * @return the bytes from the input stream in string form.
-     *
-     * @throws NS_ERROR_INVALID_ARG if aInputStream is not an nsIInputStream.
-     * @throws NS_BASE_STREAM_WOULD_BLOCK if reading from aInputStream would
-     *         block the calling thread (non-blocking mode only).
-     * @throws NS_ERROR_FAILURE if there are not enough bytes available to read
-     *         aCount amount of data.
-     */
-    readInputStream(aInputStream, aCount) {
-        if (!(aInputStream instanceof Ci.nsIInputStream)) {
-            let exception = new Components.Exception(
-                "First argument should be an nsIInputStream",
-                Cr.NS_ERROR_INVALID_ARG,
-                Components.stack.caller
-            );
-            throw exception;
-        }
-
-        if (!aCount) {
-            aCount = aInputStream.available();
-        }
-
-        let stream = new BinaryInputStream(aInputStream);
-        let result = new ArrayBuffer(aCount);
-        stream.readArrayBuffer(result.byteLength, result);
-        return result;
-    },
+    let stream = new BinaryInputStream(aInputStream);
+    let result = new ArrayBuffer(aCount);
+    stream.readArrayBuffer(result.byteLength, result);
+    return result;
+  },
 };
--- a/netwerk/cookie/test/browser/browser_broadcastChannel.js
+++ b/netwerk/cookie/test/browser/browser_broadcastChannel.js
@@ -10,27 +10,29 @@ CookiePolicyHelper.runTest("BroadcastCha
   cookieJarAccessDenied: async w => {
     try {
       new w.BroadcastChannel("hello");
       ok(false, "BroadcastChannel cannot be used!");
     } catch (e) {
       ok(true, "BroadcastChannel cannot be used!");
       is(e.name, "SecurityError", "We want a security error message.");
     }
-  }
+  },
 });
 
 CookiePolicyHelper.runTest("BroadcastChannel in workers", {
   cookieJarAccessAllowed: async w => {
     function nonBlockingCode() {
       new BroadcastChannel("hello");
       postMessage(true);
     }
 
-    let blob = new w.Blob([nonBlockingCode.toString() + "; nonBlockingCode();"]);
+    let blob = new w.Blob([
+      nonBlockingCode.toString() + "; nonBlockingCode();",
+    ]);
     ok(blob, "Blob has been created");
 
     let blobURL = w.URL.createObjectURL(blob);
     ok(blobURL, "Blob URL has been created");
 
     let worker = new w.Worker(blobURL);
     ok(worker, "Worker has been created");
 
@@ -68,10 +70,10 @@ CookiePolicyHelper.runTest("BroadcastCha
       worker.onmessage = function(e) {
         if (e) {
           resolve();
         } else {
           reject();
         }
       };
     });
-  }
+  },
 });
--- a/netwerk/cookie/test/browser/browser_cookies.js
+++ b/netwerk/cookie/test/browser/browser_cookies.js
@@ -1,35 +1,51 @@
 CookiePolicyHelper.runTest("document.cookies", {
   cookieJarAccessAllowed: async _ => {
     let hasCookie = !!content.document.cookie.length;
 
-    await content.fetch("server.sjs").then(r => r.text()).then(text => {
-      is(text, hasCookie ? "cookie-present" : "cookie-not-present", "document.cookie is consistent with fetch requests");
-    });
+    await content
+      .fetch("server.sjs")
+      .then(r => r.text())
+      .then(text => {
+        is(
+          text,
+          hasCookie ? "cookie-present" : "cookie-not-present",
+          "document.cookie is consistent with fetch requests"
+        );
+      });
 
     content.document.cookie = "name=value";
     ok(content.document.cookie.includes("name=value"), "Some cookies for me");
     ok(content.document.cookie.includes("foopy=1"), "Some cookies for me");
 
-    await content.fetch("server.sjs").then(r => r.text()).then(text => {
-      is(text, "cookie-present", "We should have cookies");
-    });
+    await content
+      .fetch("server.sjs")
+      .then(r => r.text())
+      .then(text => {
+        is(text, "cookie-present", "We should have cookies");
+      });
 
     ok(!!content.document.cookie.length, "Some Cookies for me");
   },
 
   cookieJarAccessDenied: async _ => {
     is(content.document.cookie, "", "No cookies for me");
     content.document.cookie = "name=value";
     is(content.document.cookie, "", "No cookies for me");
 
-    await content.fetch("server.sjs").then(r => r.text()).then(text => {
-      is(text, "cookie-not-present", "We should not have cookies");
-    });
+    await content
+      .fetch("server.sjs")
+      .then(r => r.text())
+      .then(text => {
+        is(text, "cookie-not-present", "We should not have cookies");
+      });
     // Let's do it twice.
-    await content.fetch("server.sjs").then(r => r.text()).then(text => {
-      is(text, "cookie-not-present", "We should not have cookies");
-    });
+    await content
+      .fetch("server.sjs")
+      .then(r => r.text())
+      .then(text => {
+        is(text, "cookie-not-present", "We should not have cookies");
+      });
 
     is(content.document.cookie, "", "Still no cookies for me");
-  }
+  },
 });
--- a/netwerk/cookie/test/browser/browser_domCache.js
+++ b/netwerk/cookie/test/browser/browser_domCache.js
@@ -1,13 +1,23 @@
 CookiePolicyHelper.runTest("DOM Cache", {
   cookieJarAccessAllowed: async w => {
     await w.caches.open("wow").then(
-      _ => { ok(true, "DOM Cache can be used!"); },
-      _ => { ok(false, "DOM Cache can be used!"); });
+      _ => {
+        ok(true, "DOM Cache can be used!");
+      },
+      _ => {
+        ok(false, "DOM Cache can be used!");
+      }
+    );
   },
 
   cookieJarAccessDenied: async w => {
     await w.caches.open("wow").then(
-      _ => { ok(false, "DOM Cache cannot be used!"); },
-      _ => { ok(true, "DOM Cache cannot be used!"); });
+      _ => {
+        ok(false, "DOM Cache cannot be used!");
+      },
+      _ => {
+        ok(true, "DOM Cache cannot be used!");
+      }
+    );
   },
 });
--- a/netwerk/cookie/test/browser/browser_originattributes.js
+++ b/netwerk/cookie/test/browser/browser_originattributes.js
@@ -9,94 +9,104 @@ const TEST_URL =
   "http://example.com/browser/netwerk/cookie/test/browser/file_empty.html";
 
 let cm = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager);
 
 // opens `uri' in a new tab with the provided userContextId and focuses it.
 // returns the newly opened tab
 async function openTabInUserContext(uri, userContextId) {
   // open the tab in the correct userContextId
-  let tab = BrowserTestUtils.addTab(gBrowser, uri, {userContextId});
+  let tab = BrowserTestUtils.addTab(gBrowser, uri, { userContextId });
 
   // select tab and make sure its browser is focused
   gBrowser.selectedTab = tab;
   tab.ownerGlobal.focus();
 
   let browser = gBrowser.getBrowserForTab(tab);
   // wait for tab load
   await BrowserTestUtils.browserLoaded(browser);
 
-  return {tab, browser};
+  return { tab, browser };
 }
 
 add_task(async function setup() {
   // make sure userContext is enabled.
   await new Promise(resolve => {
-    SpecialPowers.pushPrefEnv({"set": [
-      ["privacy.userContext.enabled", true]
-    ]}, resolve);
+    SpecialPowers.pushPrefEnv(
+      { set: [["privacy.userContext.enabled", true]] },
+      resolve
+    );
   });
 });
 
 add_task(async function test() {
   // load the page in 3 different contexts and set a cookie
   // which should only be visible in that context
   for (let userContextId of Object.keys(USER_CONTEXTS)) {
     // open our tab in the given user context
-    let {tab, browser} = await openTabInUserContext(TEST_URL, userContextId);
+    let { tab, browser } = await openTabInUserContext(TEST_URL, userContextId);
 
-    await ContentTask.spawn(browser,
-        {names: COOKIE_NAMES, value: USER_CONTEXTS[userContextId]},
-        function(opts) {
-          for (let name of opts.names) {
-            content.document.cookie = name + "=" + opts.value;
-          }
-        });
+    await ContentTask.spawn(
+      browser,
+      { names: COOKIE_NAMES, value: USER_CONTEXTS[userContextId] },
+      function(opts) {
+        for (let name of opts.names) {
+          content.document.cookie = name + "=" + opts.value;
+        }
+      }
+    );
 
     // remove the tab
     gBrowser.removeTab(tab);
   }
 
   let expectedValues = USER_CONTEXTS.slice(0);
   await checkCookies(expectedValues, "before removal");
 
   // remove cookies that belongs to user context id #1
-  cm.removeCookiesWithOriginAttributes(JSON.stringify({userContextId: 1}));
+  cm.removeCookiesWithOriginAttributes(JSON.stringify({ userContextId: 1 }));
 
   expectedValues[1] = undefined;
   await checkCookies(expectedValues, "after removal");
 });
 
 async function checkCookies(expectedValues, time) {
   for (let userContextId of Object.keys(expectedValues)) {
     let cookiesFromTitle = await getCookiesFromJS(userContextId);
     let cookiesFromManager = getCookiesFromManager(userContextId);
 
     let expectedValue = expectedValues[userContextId];
     for (let name of COOKIE_NAMES) {
-      is(cookiesFromTitle[name], expectedValue,
-          `User context ${userContextId}: ${name} should be correct from title ${time}`);
-      is(cookiesFromManager[name], expectedValue,
-          `User context ${userContextId}: ${name} should be correct from manager ${time}`);
+      is(
+        cookiesFromTitle[name],
+        expectedValue,
+        `User context ${userContextId}: ${name} should be correct from title ${time}`
+      );
+      is(
+        cookiesFromManager[name],
+        expectedValue,
+        `User context ${userContextId}: ${name} should be correct from manager ${time}`
+      );
     }
-
   }
 }
 
 function getCookiesFromManager(userContextId) {
   let cookies = {};
-  let enumerator = cm.getCookiesWithOriginAttributes(JSON.stringify({userContextId}));
+  let enumerator = cm.getCookiesWithOriginAttributes(
+    JSON.stringify({ userContextId })
+  );
   for (let cookie of enumerator) {
     cookies[cookie.name] = cookie.value;
   }
   return cookies;
 }
 
 async function getCookiesFromJS(userContextId) {
-  let {tab, browser} = await openTabInUserContext(TEST_URL, userContextId);
+  let { tab, browser } = await openTabInUserContext(TEST_URL, userContextId);
 
   // get the cookies
   let cookieString = await ContentTask.spawn(browser, null, function() {
     return content.document.cookie;
   });
 
   // check each item in the title and validate it meets expectatations
   let cookies = {};
--- a/netwerk/cookie/test/browser/browser_serviceWorker.js
+++ b/netwerk/cookie/test/browser/browser_serviceWorker.js
@@ -2,23 +2,42 @@ CookiePolicyHelper.runTest("ServiceWorke
   prefs: [
     ["dom.serviceWorkers.exemptFromPerDomainMax", true],
     ["dom.ipc.processCount", 1],
     ["dom.serviceWorkers.enabled", true],
     ["dom.serviceWorkers.testing.enabled", true],
   ],
 
   cookieJarAccessAllowed: async w => {
-    await w.navigator.serviceWorker.register("file_empty.js").then(
-      reg => { ok(true, "ServiceWorker can be used!"); return reg; },
-      _ => { ok(false, "ServiceWorker cannot be used! " + _); }).then(
-      reg => reg.unregister(),
-      _ => { ok(false, "unregister failed"); }).
-      catch(e => ok(false, "Promise rejected: " + e));
+    await w.navigator.serviceWorker
+      .register("file_empty.js")
+      .then(
+        reg => {
+          ok(true, "ServiceWorker can be used!");
+          return reg;
+        },
+        _ => {
+          ok(false, "ServiceWorker cannot be used! " + _);
+        }
+      )
+      .then(
+        reg => reg.unregister(),
+        _ => {
+          ok(false, "unregister failed");
+        }
+      )
+      .catch(e => ok(false, "Promise rejected: " + e));
   },
 
   cookieJarAccessDenied: async w => {
-    await w.navigator.serviceWorker.register("file_empty.js").then(
-      _ => { ok(false, "ServiceWorker cannot be used!"); },
-      _ => { ok(true, "ServiceWorker cannot be used!"); }).
-      catch(e => ok(false, "Promise rejected: " + e));
+    await w.navigator.serviceWorker
+      .register("file_empty.js")
+      .then(
+        _ => {
+          ok(false, "ServiceWorker cannot be used!");
+        },
+        _ => {
+          ok(true, "ServiceWorker cannot be used!");
+        }
+      )
+      .catch(e => ok(false, "Promise rejected: " + e));
   },
 });
--- a/netwerk/cookie/test/browser/head.js
+++ b/netwerk/cookie/test/browser/head.js
@@ -15,155 +15,181 @@ const TEST_TOP_PAGE = TEST_DOMAIN + TEST
 // permutations. This includes verifying that changing the permission while the
 // page is open still results in the state of the permission when the
 // document/global was created still applying. Code will execute in the
 // ContentTask.spawn frame-script context, use content to access the underlying
 // page.
 this.CookiePolicyHelper = {
   runTest(testName, config) {
     // Testing allowed to blocked by cookie behavior
-    this._createTest(testName,
-                     config.cookieJarAccessAllowed,
-                     config.cookieJarAccessDenied,
-                     config.prefs,
-                     {
-                       fromBehavior: BEHAVIOR_ACCEPT,
-                       toBehavior: BEHAVIOR_REJECT,
-                       fromPermission: PERM_DEFAULT,
-                       toPermission: PERM_DEFAULT,
-                     });
+    this._createTest(
+      testName,
+      config.cookieJarAccessAllowed,
+      config.cookieJarAccessDenied,
+      config.prefs,
+      {
+        fromBehavior: BEHAVIOR_ACCEPT,
+        toBehavior: BEHAVIOR_REJECT,
+        fromPermission: PERM_DEFAULT,
+        toPermission: PERM_DEFAULT,
+      }
+    );
 
     // Testing blocked to allowed by cookie behavior
-    this._createTest(testName,
-                     config.cookieJarAccessDenied,
-                     config.cookieJarAccessAllowed,
-                     config.prefs,
-                     {
-                       fromBehavior: BEHAVIOR_REJECT,
-                       toBehavior: BEHAVIOR_ACCEPT,
-                       fromPermission: PERM_DEFAULT,
-                       toPermission: PERM_DEFAULT,
-                     });
+    this._createTest(
+      testName,
+      config.cookieJarAccessDenied,
+      config.cookieJarAccessAllowed,
+      config.prefs,
+      {
+        fromBehavior: BEHAVIOR_REJECT,
+        toBehavior: BEHAVIOR_ACCEPT,
+        fromPermission: PERM_DEFAULT,
+        toPermission: PERM_DEFAULT,
+      }
+    );
 
     // Testing allowed to blocked by cookie permission
-    this._createTest(testName,
-                     config.cookieJarAccessAllowed,
-                     config.cookieJarAccessDenied,
-                     config.prefs,
-                     {
-                       fromBehavior: BEHAVIOR_REJECT,
-                       toBehavior: BEHAVIOR_REJECT,
-                       fromPermission: PERM_ALLOW,
-                       toPermission: PERM_DEFAULT,
-                     });
+    this._createTest(
+      testName,
+      config.cookieJarAccessAllowed,
+      config.cookieJarAccessDenied,
+      config.prefs,
+      {
+        fromBehavior: BEHAVIOR_REJECT,
+        toBehavior: BEHAVIOR_REJECT,
+        fromPermission: PERM_ALLOW,
+        toPermission: PERM_DEFAULT,
+      }
+    );
 
     // Testing blocked to allowed by cookie permission
-    this._createTest(testName,
-                     config.cookieJarAccessDenied,
-                     config.cookieJarAccessAllowed,
-                     config.prefs,
-                     {
-                       fromBehavior: BEHAVIOR_ACCEPT,
-                       toBehavior: BEHAVIOR_ACCEPT,
-                       fromPermission: PERM_DENY,
-                       toPermission: PERM_DEFAULT,
-                     });
+    this._createTest(
+      testName,
+      config.cookieJarAccessDenied,
+      config.cookieJarAccessAllowed,
+      config.prefs,
+      {
+        fromBehavior: BEHAVIOR_ACCEPT,
+        toBehavior: BEHAVIOR_ACCEPT,
+        fromPermission: PERM_DENY,
+        toPermission: PERM_DEFAULT,
+      }
+    );
   },
 
   _createTest(testName, goodCb, badCb, prefs, config) {
     add_task(async _ => {
       info("Starting " + testName + ": " + config.toSource());
 
       await SpecialPowers.flushPrefEnv();
 
       if (prefs) {
-        await SpecialPowers.pushPrefEnv({"set": prefs });
+        await SpecialPowers.pushPrefEnv({ set: prefs });
       }
 
       let uri = Services.io.newURI(TEST_DOMAIN);
 
       // Let's set the first cookie pref.
       Services.perms.add(uri, "cookie", config.fromPermission);
-      await SpecialPowers.pushPrefEnv({"set": [
-        ["network.cookie.cookieBehavior", config.fromBehavior],
-      ]});
+      await SpecialPowers.pushPrefEnv({
+        set: [["network.cookie.cookieBehavior", config.fromBehavior]],
+      });
 
       // Let's open a tab and load content.
       let tab = BrowserTestUtils.addTab(gBrowser, TEST_TOP_PAGE);
       gBrowser.selectedTab = tab;
 
       let browser = gBrowser.getBrowserForTab(tab);
       await BrowserTestUtils.browserLoaded(browser);
 
       // Let's create an iframe.
-      await ContentTask.spawn(browser, { url: TEST_TOP_PAGE },
-                              async obj => {
+      await ContentTask.spawn(browser, { url: TEST_TOP_PAGE }, async obj => {
         return new content.Promise(resolve => {
-          let ifr = content.document.createElement('iframe');
+          let ifr = content.document.createElement("iframe");
           ifr.setAttribute("id", "iframe");
           ifr.src = obj.url;
           ifr.onload = resolve;
           content.document.body.appendChild(ifr);
         });
       });
 
       // Let's exec the "good" callback.
-      info("Executing the test after setting the cookie behavior to " + config.fromBehavior + " and permission to " + config.fromPermission);
-      await ContentTask.spawn(browser,
-                              { callback: goodCb.toString() },
-                              async obj => {
-        let runnableStr = `(() => {return (${obj.callback});})();`;
-        let runnable = eval(runnableStr); // eslint-disable-line no-eval
-        await runnable(content);
+      info(
+        "Executing the test after setting the cookie behavior to " +
+          config.fromBehavior +
+          " and permission to " +
+          config.fromPermission
+      );
+      await ContentTask.spawn(
+        browser,
+        { callback: goodCb.toString() },
+        async obj => {
+          let runnableStr = `(() => {return (${obj.callback});})();`;
+          let runnable = eval(runnableStr); // eslint-disable-line no-eval
+          await runnable(content);
 
-        let ifr = content.document.getElementById("iframe");
-        await runnable(ifr.contentWindow);
-      });
+          let ifr = content.document.getElementById("iframe");
+          await runnable(ifr.contentWindow);
+        }
+      );
 
       // Now, let's change the cookie settings
       Services.perms.add(uri, "cookie", config.toPermission);
-      await SpecialPowers.pushPrefEnv({"set": [
-        ["network.cookie.cookieBehavior", config.toBehavior],
-      ]});
+      await SpecialPowers.pushPrefEnv({
+        set: [["network.cookie.cookieBehavior", config.toBehavior]],
+      });
 
       // We still want the good callback to succeed.
-      info("Executing the test after setting the cookie behavior to " + config.toBehavior + " and permission to " + config.toPermission);
-      await ContentTask.spawn(browser,
-                              { callback: goodCb.toString() },
-                              async obj => {
-        let runnableStr = `(() => {return (${obj.callback});})();`;
-        let runnable = eval(runnableStr); // eslint-disable-line no-eval
-        await runnable(content);
+      info(
+        "Executing the test after setting the cookie behavior to " +
+          config.toBehavior +
+          " and permission to " +
+          config.toPermission
+      );
+      await ContentTask.spawn(
+        browser,
+        { callback: goodCb.toString() },
+        async obj => {
+          let runnableStr = `(() => {return (${obj.callback});})();`;
+          let runnable = eval(runnableStr); // eslint-disable-line no-eval
+          await runnable(content);
 
-        let ifr = content.document.getElementById("iframe");
-        await runnable(ifr.contentWindow);
-      });
+          let ifr = content.document.getElementById("iframe");
+          await runnable(ifr.contentWindow);
+        }
+      );
 
       // Let's close the tab.
       BrowserTestUtils.removeTab(tab);
 
       // Let's open a new tab and load content again.
       tab = BrowserTestUtils.addTab(gBrowser, TEST_TOP_PAGE);
       gBrowser.selectedTab = tab;
 
       browser = gBrowser.getBrowserForTab(tab);
       await BrowserTestUtils.browserLoaded(browser);
 
       // Let's exec the "bad" callback.
       info("Executing the test in a new tab");
-      await ContentTask.spawn(browser,
-                              { callback: badCb.toString() },
-                              async obj => {
-        let runnableStr = `(() => {return (${obj.callback});})();`;
-        let runnable = eval(runnableStr); // eslint-disable-line no-eval
-        await runnable(content);
-      });
+      await ContentTask.spawn(
+        browser,
+        { callback: badCb.toString() },
+        async obj => {
+          let runnableStr = `(() => {return (${obj.callback});})();`;
+          let runnable = eval(runnableStr); // eslint-disable-line no-eval
+          await runnable(content);
+        }
+      );
 
       // Let's close the tab.
       BrowserTestUtils.removeTab(tab);
 
       // Cleanup.
       await new Promise(resolve => {
-        Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, resolve);
+        Services.clearData.deleteData(
+          Ci.nsIClearDataService.CLEAR_ALL,
+          resolve
+        );
       });
     });
   },
 };
--- a/netwerk/cookie/test/mochitest/cookiesHelper.js
+++ b/netwerk/cookie/test/mochitest/cookiesHelper.js
@@ -1,52 +1,67 @@
 const ALLOWED = 0;
 const BLOCKED = 1;
 
 async function cleanupData() {
   await new Promise(resolve => {
     const chromeScript = SpecialPowers.loadChromeScript(_ => {
       // eslint-disable-next-line no-undef
       addMessageListener("go", __ => {
-        const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-        Services.clearData.deleteData(Services.clearData.CLEAR_COOKIES |
-                                      Services.clearData.CLEAR_ALL_CACHES |
-                                      Services.clearData.CLEAR_DOM_STORAGES, ___ => {
-          // eslint-disable-next-line no-undef
-          sendAsyncMessage("done");
-        });
+        const { Services } = ChromeUtils.import(
+          "resource://gre/modules/Services.jsm"
+        );
+        Services.clearData.deleteData(
+          Services.clearData.CLEAR_COOKIES |
+            Services.clearData.CLEAR_ALL_CACHES |
+            Services.clearData.CLEAR_DOM_STORAGES,
+          ___ => {
+            // eslint-disable-next-line no-undef
+            sendAsyncMessage("done");
+          }
+        );
       });
     });
 
     chromeScript.addMessageListener("done", _ => {
       chromeScript.destroy();
       resolve();
     });
 
     chromeScript.sendAsyncMessage("go");
   });
 }
 
 async function checkLastRequest(type, state) {
-  let json = await fetch("cookie.sjs?last&" + Math.random()).then(r => r.json());
+  let json = await fetch("cookie.sjs?last&" + Math.random()).then(r =>
+    r.json()
+  );
   is(json.type, type, "Type: " + type);
   is(json.hasCookie, state == ALLOWED, "Fetch has cookies");
 }
 
 async function runTests(currentTest) {
   await cleanupData();
-  await SpecialPowers.pushPrefEnv({ set: [["network.cookie.cookieBehavior", 2]] });
+  await SpecialPowers.pushPrefEnv({
+    set: [["network.cookie.cookieBehavior", 2]],
+  });
   let windowBlocked = window.open("cookie.sjs?window&" + Math.random());
-  await new Promise(resolve => { windowBlocked.onload = resolve; });
+  await new Promise(resolve => {
+    windowBlocked.onload = resolve;
+  });
   await currentTest(windowBlocked, BLOCKED);
   windowBlocked.close();
 
   await cleanupData();
-  await SpecialPowers.pushPrefEnv({ set: [["network.cookie.cookieBehavior", 1]] });
+  await SpecialPowers.pushPrefEnv({
+    set: [["network.cookie.cookieBehavior", 1]],
+  });
   let windowAllowed = window.open("cookie.sjs?window&" + Math.random());
-  await new Promise(resolve => { windowAllowed.onload = resolve; });
+  await new Promise(resolve => {
+    windowAllowed.onload = resolve;
+  });
   await currentTest(windowAllowed, ALLOWED);
   windowAllowed.close();
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
--- a/netwerk/cookie/test/unit/test_bug1155169.js
+++ b/netwerk/cookie/test/unit/test_bug1155169.js
@@ -1,47 +1,61 @@
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 const URI = Services.io.newURI("http://example.org/");
 
-const cs = Cc["@mozilla.org/cookieService;1"]
-             .getService(Ci.nsICookieService);
+const cs = Cc["@mozilla.org/cookieService;1"].getService(Ci.nsICookieService);
 
 function run_test() {
   // Allow all cookies.
   Services.prefs.setIntPref("network.cookie.cookieBehavior", 0);
 
   // Clear cookies.
   Services.cookies.removeAll();
 
   // Add a new cookie.
   setCookie("foo=bar", {
-    type: "added", isSession: true, isSecure: false, isHttpOnly: false,
+    type: "added",
+    isSession: true,
+    isSecure: false,
+    isHttpOnly: false,
   });
 
   // Update cookie with isHttpOnly=true.
   setCookie("foo=bar; HttpOnly", {
-    type: "changed", isSession: true, isSecure: false, isHttpOnly: true,
+    type: "changed",
+    isSession: true,
+    isSecure: false,
+    isHttpOnly: true,
   });
 
   // Update cookie with isSecure=true.
   setCookie("foo=bar; Secure", {
-    type: "changed", isSession: true, isSecure: true, isHttpOnly: false,
+    type: "changed",
+    isSession: true,
+    isSecure: true,
+    isHttpOnly: false,
   });
 
   // Update cookie with isSession=false.
   let expiry = new Date();
   expiry.setUTCFullYear(expiry.getUTCFullYear() + 2);
   setCookie(`foo=bar; Expires=${expiry.toGMTString()}`, {
-    type: "changed", isSession: false, isSecure: false, isHttpOnly: false,
+    type: "changed",
+    isSession: false,
+    isSecure: false,
+    isHttpOnly: false,
   });
 
   // Reset cookie.
   setCookie("foo=bar", {
-    type: "changed", isSession: true, isSecure: false, isHttpOnly: false,
+    type: "changed",
+    isSession: true,
+    isSecure: false,
+    isHttpOnly: false,
   });
 }
 
 function setCookie(value, expected) {
   function setCookieInternal(valueInternal, expectedInternal = null) {
     function observer(subject, topic, data) {
       if (!expectedInternal) {
         do_throw("no notification expected");
--- a/netwerk/cookie/test/unit/test_bug1321912.js
+++ b/netwerk/cookie/test/unit/test_bug1321912.js
@@ -1,80 +1,102 @@
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 do_get_profile();
 const dirSvc = Services.dirsvc;
 
 let dbFile = dirSvc.get("ProfD", Ci.nsIFile);
 dbFile.append("cookies.sqlite");
 
 let storage = Services.storage;
-let properties = Cc["@mozilla.org/hash-property-bag;1"].
-                 createInstance(Ci.nsIWritablePropertyBag);
+let properties = Cc["@mozilla.org/hash-property-bag;1"].createInstance(
+  Ci.nsIWritablePropertyBag
+);
 properties.setProperty("shared", true);
 let conn = storage.openDatabase(dbFile);
 
 // Write the schema v7 to the database.
 conn.schemaVersion = 7;
-conn.executeSimpleSQL("CREATE TABLE moz_cookies (" +
-  "id INTEGER PRIMARY KEY, " +
-  "baseDomain TEXT, " +
-  "originAttributes TEXT NOT NULL DEFAULT '', " +
-  "name TEXT, " +
-  "value TEXT, " +
-  "host TEXT, " +
-  "path TEXT, " +
-  "expiry INTEGER, " +
-  "lastAccessed INTEGER, " +
-  "creationTime INTEGER, " +
-  "isSecure INTEGER, " +
-  "isHttpOnly INTEGER, " +
-  "appId INTEGER DEFAULT 0, " +
-  "inBrowserElement INTEGER DEFAULT 0, " +
-  "CONSTRAINT moz_uniqueid UNIQUE (name, host, path, originAttributes)" +
-")");
-conn.executeSimpleSQL("CREATE INDEX moz_basedomain ON moz_cookies (baseDomain, " +
-                                                                  "originAttributes)");
+conn.executeSimpleSQL(
+  "CREATE TABLE moz_cookies (" +
+    "id INTEGER PRIMARY KEY, " +
+    "baseDomain TEXT, " +
+    "originAttributes TEXT NOT NULL DEFAULT '', " +
+    "name TEXT, " +
+    "value TEXT, " +
+    "host TEXT, " +
+    "path TEXT, " +
+    "expiry INTEGER, " +
+    "lastAccessed INTEGER, " +
+    "creationTime INTEGER, " +
+    "isSecure INTEGER, " +
+    "isHttpOnly INTEGER, " +
+    "appId INTEGER DEFAULT 0, " +
+    "inBrowserElement INTEGER DEFAULT 0, " +
+    "CONSTRAINT moz_uniqueid UNIQUE (name, host, path, originAttributes)" +
+    ")"
+);
+conn.executeSimpleSQL(
+  "CREATE INDEX moz_basedomain ON moz_cookies (baseDomain, " +
+    "originAttributes)"
+);
 
 conn.executeSimpleSQL("PRAGMA synchronous = OFF");
 conn.executeSimpleSQL("PRAGMA journal_mode = WAL");
 conn.executeSimpleSQL("PRAGMA wal_autocheckpoint = 16");
 
 let now = Date.now();
-conn.executeSimpleSQL("INSERT INTO moz_cookies(" +
-  "baseDomain, host, name, value, path, expiry, " +
-  "lastAccessed, creationTime, isSecure, isHttpOnly) VALUES (" +
-  "'foo.com', '.foo.com', 'foo', 'bar=baz', '/', " +
-  now + ", " + now + ", " + now + ", 1, 1)");
+conn.executeSimpleSQL(
+  "INSERT INTO moz_cookies(" +
+    "baseDomain, host, name, value, path, expiry, " +
+    "lastAccessed, creationTime, isSecure, isHttpOnly) VALUES (" +
+    "'foo.com', '.foo.com', 'foo', 'bar=baz', '/', " +
+    now +
+    ", " +
+    now +
+    ", " +
+    now +
+    ", 1, 1)"
+);
 
 // Now start the cookie service, and then check the fields in the table.
 // Get sessionEnumerator to wait for the initialization in cookie thread
 const enumerator = Services.cookies.sessionEnumerator;
 
 Assert.equal(conn.schemaVersion, 10);
-let stmt = conn.createStatement("SELECT sql FROM sqlite_master " +
-                                  "WHERE type = 'table' AND " +
-                                  "      name = 'moz_cookies'");
+let stmt = conn.createStatement(
+  "SELECT sql FROM sqlite_master " +
+    "WHERE type = 'table' AND " +
+    "      name = 'moz_cookies'"
+);
 try {
   Assert.ok(stmt.executeStep());
   let sql = stmt.getString(0);
   Assert.equal(sql.indexOf("appId"), -1);
 } finally {
   stmt.finalize();
 }
 
-stmt = conn.createStatement("SELECT * FROM moz_cookies " +
-                            "WHERE baseDomain = 'foo.com' AND " +
-                            "      host = '.foo.com' AND " +
-                            "      name = 'foo' AND " +
-                            "      value = 'bar=baz' AND " +
-                            "      path = '/' AND " +
-                            "      expiry = " + now + " AND " +
-                            "      lastAccessed = " + now + " AND " +
-                            "      creationTime = " + now + " AND " +
-                            "      isSecure = 1 AND " +
-                            "      isHttpOnly = 1");
+stmt = conn.createStatement(
+  "SELECT * FROM moz_cookies " +
+    "WHERE baseDomain = 'foo.com' AND " +
+    "      host = '.foo.com' AND " +
+    "      name = 'foo' AND " +
+    "      value = 'bar=baz' AND " +
+    "      path = '/' AND " +
+    "      expiry = " +
+    now +
+    " AND " +
+    "      lastAccessed = " +
+    now +
+    " AND " +
+    "      creationTime = " +
+    now +
+    " AND " +
+    "      isSecure = 1 AND " +
+    "      isHttpOnly = 1"
+);
 try {
   Assert.ok(stmt.executeStep());
 } finally {
   stmt.finalize();
 }
 conn.close();
--- a/netwerk/cookie/test/unit/test_bug643051.js
+++ b/netwerk/cookie/test/unit/test_bug643051.js
@@ -1,10 +1,10 @@
-const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function run_test() {
   // Allow all cookies.
   Services.prefs.setIntPref("network.cookie.cookieBehavior", 0);
 
   let cs = Cc["@mozilla.org/cookieService;1"].getService(Ci.nsICookieService);
 
   let uri = NetUtil.newURI("http://example.org/");
@@ -18,9 +18,8 @@ function run_test() {
 
   uri = NetUtil.newURI("http://example.com/");
   cs.setCookieString(uri, null, set, null);
 
   expected = "foo=bar";
   actual = cs.getCookieString(uri, null, null);
   Assert.equal(actual, expected);
 }
-
--- a/netwerk/cookie/test/unit/test_eviction.js
+++ b/netwerk/cookie/test/unit/test_eviction.js
@@ -1,144 +1,184 @@
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 const BASE_HOSTNAMES = ["example.org", "example.co.uk"];
 const SUBDOMAINS = ["", "pub.", "www.", "other."];
 
 const cs = Cc["@mozilla.org/cookieService;1"].getService(Ci.nsICookieService);
 const cm = cs.QueryInterface(Ci.nsICookieManager);
 
 function run_test() {
-    Services.prefs.setIntPref("network.cookie.staleThreshold", 0);
-    add_task(async function() {
-        await test_basic_eviction("example.org");
-        cm.removeAll();
-    });
+  Services.prefs.setIntPref("network.cookie.staleThreshold", 0);
+  add_task(async function() {
+    await test_basic_eviction("example.org");
+    cm.removeAll();
+  });
 
-    run_next_test();
+  run_next_test();
 }
 
 async function test_basic_eviction(base_host) {
-    Services.prefs.setIntPref("network.cookie.quotaPerHost", 2);
-    Services.prefs.setIntPref("network.cookie.maxPerHost", 5);
+  Services.prefs.setIntPref("network.cookie.quotaPerHost", 2);
+  Services.prefs.setIntPref("network.cookie.maxPerHost", 5);
 
-    const BASE_URI = Services.io.newURI("http://" + base_host);
-    const FOO_PATH = Services.io.newURI("http://" + base_host + "/foo/");
-    const BAR_PATH = Services.io.newURI("http://" + base_host + "/bar/");
+  const BASE_URI = Services.io.newURI("http://" + base_host);
+  const FOO_PATH = Services.io.newURI("http://" + base_host + "/foo/");
+  const BAR_PATH = Services.io.newURI("http://" + base_host + "/bar/");
 
-    await setCookie("session_foo_path_1", null, "/foo", null, FOO_PATH);
-    await setCookie("session_foo_path_2", null, "/foo", null, FOO_PATH);
-    await setCookie("session_foo_path_3", null, "/foo", null, FOO_PATH);
-    await setCookie("session_foo_path_4", null, "/foo", null, FOO_PATH);
-    await setCookie("session_foo_path_5", null, "/foo", null, FOO_PATH);
-    verifyCookies(["session_foo_path_1",
-                   "session_foo_path_2",
-                   "session_foo_path_3",
-                   "session_foo_path_4",
-                   "session_foo_path_5"], BASE_URI);
+  await setCookie("session_foo_path_1", null, "/foo", null, FOO_PATH);
+  await setCookie("session_foo_path_2", null, "/foo", null, FOO_PATH);
+  await setCookie("session_foo_path_3", null, "/foo", null, FOO_PATH);
+  await setCookie("session_foo_path_4", null, "/foo", null, FOO_PATH);
+  await setCookie("session_foo_path_5", null, "/foo", null, FOO_PATH);
+  verifyCookies(
+    [
+      "session_foo_path_1",
+      "session_foo_path_2",
+      "session_foo_path_3",
+      "session_foo_path_4",
+      "session_foo_path_5",
+    ],
+    BASE_URI
+  );
 
-    // Check if cookies are evicted by creation time.
-    await setCookie("session_foo_path_6", null, "/foo", null, FOO_PATH);
-    verifyCookies(["session_foo_path_4",
-                   "session_foo_path_5",
-                   "session_foo_path_6"], BASE_URI);
+  // Check if cookies are evicted by creation time.
+  await setCookie("session_foo_path_6", null, "/foo", null, FOO_PATH);
+  verifyCookies(
+    ["session_foo_path_4", "session_foo_path_5", "session_foo_path_6"],
+    BASE_URI
+  );
 
-    await setCookie("session_bar_path_1", null, "/bar", null, BAR_PATH);
-    await setCookie("session_bar_path_2", null, "/bar", null, BAR_PATH);
+  await setCookie("session_bar_path_1", null, "/bar", null, BAR_PATH);
+  await setCookie("session_bar_path_2", null, "/bar", null, BAR_PATH);
 
-    verifyCookies(["session_foo_path_4",
-                   "session_foo_path_5",
-                   "session_foo_path_6",
-                   "session_bar_path_1",
-                   "session_bar_path_2"], BASE_URI);
+  verifyCookies(
+    [
+      "session_foo_path_4",
+      "session_foo_path_5",
+      "session_foo_path_6",
+      "session_bar_path_1",
+      "session_bar_path_2",
+    ],
+    BASE_URI
+  );
 
-    // Check if cookies are evicted by last accessed time.
-    cs.getCookieString(FOO_PATH, null);
-    await setCookie("session_foo_path_7", null, "/foo", null, FOO_PATH);
-    verifyCookies(["session_foo_path_5",
-                   "session_foo_path_6",
-                   "session_foo_path_7"], BASE_URI);
+  // Check if cookies are evicted by last accessed time.
+  cs.getCookieString(FOO_PATH, null);
+  await setCookie("session_foo_path_7", null, "/foo", null, FOO_PATH);
+  verifyCookies(
+    ["session_foo_path_5", "session_foo_path_6", "session_foo_path_7"],
+    BASE_URI
+  );
 
-    const EXPIRED_TIME = 3;
+  const EXPIRED_TIME = 3;
 
-    await setCookie("non_session_expired_foo_path_1", null, "/foo", EXPIRED_TIME, FOO_PATH);
-    await setCookie("non_session_expired_foo_path_2", null, "/foo", EXPIRED_TIME, FOO_PATH);
-    verifyCookies(["session_foo_path_5",
-                   "session_foo_path_6",
-                   "session_foo_path_7",
-                   "non_session_expired_foo_path_1",
-                   "non_session_expired_foo_path_2"], BASE_URI);
+  await setCookie(
+    "non_session_expired_foo_path_1",
+    null,
+    "/foo",
+    EXPIRED_TIME,
+    FOO_PATH
+  );
+  await setCookie(
+    "non_session_expired_foo_path_2",
+    null,
+    "/foo",
+    EXPIRED_TIME,
+    FOO_PATH
+  );
+  verifyCookies(
+    [
+      "session_foo_path_5",
+      "session_foo_path_6",
+      "session_foo_path_7",
+      "non_session_expired_foo_path_1",
+      "non_session_expired_foo_path_2",
+    ],
+    BASE_URI
+  );
 
-    // Check if expired cookies are evicted first.
-    await new Promise(resolve => do_timeout(EXPIRED_TIME * 1000, resolve));
-    await setCookie("session_foo_path_8", null, "/foo", null, FOO_PATH);
-    verifyCookies(["session_foo_path_6",
-                   "session_foo_path_7",
-                   "session_foo_path_8"], BASE_URI);
+  // Check if expired cookies are evicted first.
+  await new Promise(resolve => do_timeout(EXPIRED_TIME * 1000, resolve));
+  await setCookie("session_foo_path_8", null, "/foo", null, FOO_PATH);
+  verifyCookies(
+    ["session_foo_path_6", "session_foo_path_7", "session_foo_path_8"],
+    BASE_URI
+  );
 }
 
 // Verify that the given cookie names exist, and are ordered from least to most recently accessed
 function verifyCookies(names, uri) {
-    Assert.equal(cm.countCookiesFromHost(uri.host), names.length);
-    let actual_cookies = [];
-    for (let cookie of cm.getCookiesFromHost(uri.host, {})) {
-        actual_cookies.push(cookie);
+  Assert.equal(cm.countCookiesFromHost(uri.host), names.length);
+  let actual_cookies = [];
+  for (let cookie of cm.getCookiesFromHost(uri.host, {})) {
+    actual_cookies.push(cookie);
+  }
+  if (names.length != actual_cookies.length) {
+    let left = names.filter(function(n) {
+      return (
+        actual_cookies.findIndex(function(c) {
+          return c.name == n;
+        }) == -1
+      );
+    });
+    let right = actual_cookies
+      .filter(function(c) {
+        return (
+          names.findIndex(function(n) {
+            return c.name == n;
+          }) == -1
+        );
+      })
+      .map(function(c) {
+        return c.name;
+      });
+    if (left.length) {
+      info("unexpected cookies: " + left);
     }
-    if (names.length != actual_cookies.length) {
-        let left = names.filter(function(n) {
-            return actual_cookies.findIndex(function(c) {
-                return c.name == n;
-            }) == -1;
-        });
-        let right = actual_cookies.filter(function(c) {
-            return names.findIndex(function(n) {
-                return c.name == n;
-            }) == -1;
-        }).map(function(c) { return c.name; });
-        if (left.length) {
-            info("unexpected cookies: " + left);
-        }
-        if (right.length) {
-            info("expected cookies: " + right);
-        }
+    if (right.length) {
+      info("expected cookies: " + right);
+    }
+  }
+  Assert.equal(names.length, actual_cookies.length);
+  actual_cookies.sort(function(a, b) {
+    if (a.lastAccessed < b.lastAccessed) {
+      return -1;
     }
-    Assert.equal(names.length, actual_cookies.length);
-    actual_cookies.sort(function(a, b) {
-        if (a.lastAccessed < b.lastAccessed)
-            return -1;
-        if (a.lastAccessed > b.lastAccessed)
-            return 1;
-        return 0;
-    });
-    for (var i = 0; i < names.length; i++) {
-        Assert.equal(names[i], actual_cookies[i].name);
-        Assert.equal(names[i].startsWith("session"), actual_cookies[i].isSession);
+    if (a.lastAccessed > b.lastAccessed) {
+      return 1;
     }
+    return 0;
+  });
+  for (var i = 0; i < names.length; i++) {
+    Assert.equal(names[i], actual_cookies[i].name);
+    Assert.equal(names[i].startsWith("session"), actual_cookies[i].isSession);
+  }
 }
 
 var lastValue = 0;
 function setCookie(name, domain, path, maxAge, url) {
-    let value = name + "=" + ++lastValue;
-    var s = "setting cookie " + value;
-    if (domain) {
-        value += "; Domain=" + domain;
-        s += " (d=" + domain + ")";
-    }
-    if (path) {
-        value += "; Path=" + path;
-        s += " (p=" + path + ")";
-    }
-    if (maxAge) {
-        value += "; Max-Age=" + maxAge;
-        s += " (non-session)";
-    } else {
-        s += " (session)";
-    }
-    s += " for " + url.spec;
-    info(s);
-    cs.setCookieStringFromHttp(url, null, null, value, null, null);
-    return new Promise(function(resolve) {
-        // Windows XP has low precision timestamps that cause our cookie eviction
-        // algorithm to produce different results from other platforms. We work around
-        // this by ensuring that there's a clear gap between each cookie update.
-        do_timeout(10, resolve);
-    });
+  let value = name + "=" + ++lastValue;
+  var s = "setting cookie " + value;
+  if (domain) {
+    value += "; Domain=" + domain;
+    s += " (d=" + domain + ")";
+  }
+  if (path) {
+    value += "; Path=" + path;
+    s += " (p=" + path + ")";
+  }
+  if (maxAge) {
+    value += "; Max-Age=" + maxAge;
+    s += " (non-session)";
+  } else {
+    s += " (session)";
+  }
+  s += " for " + url.spec;
+  info(s);
+  cs.setCookieStringFromHttp(url, null, null, value, null, null);
+  return new Promise(function(resolve) {
+    // Windows XP has low precision timestamps that cause our cookie eviction
+    // algorithm to produce different results from other platforms. We work around
+    // this by ensuring that there's a clear gap between each cookie update.
+    do_timeout(10, resolve);
+  });
 }
--- a/netwerk/cookie/test/unit/test_parser_0001.js
+++ b/netwerk/cookie/test/unit/test_parser_0001.js
@@ -1,24 +1,24 @@
-const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function inChildProcess() {
   return Services.appinfo.processType != Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
 }
 
 function run_test() {
   // Allow all cookies if the pref service is available in this process.
-  if (!inChildProcess())
+  if (!inChildProcess()) {
     Services.prefs.setIntPref("network.cookie.cookieBehavior", 0);
+  }
 
   let cs = Cc["@mozilla.org/cookieService;1"].getService(Ci.nsICookieService);
 
   let uri = NetUtil.newURI("http://example.org/");
 
   let set = "foo=bar";
   cs.setCookieStringFromHttp(uri, null, null, set, null, null);
 
   let expected = "foo=bar";
   let actual = cs.getCookieStringFromHttp(uri, null, null);
   Assert.equal(actual, expected);
 }
-
--- a/netwerk/cookie/test/unit/test_parser_0019.js
+++ b/netwerk/cookie/test/unit/test_parser_0019.js
@@ -1,24 +1,24 @@
-const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function inChildProcess() {
   return Services.appinfo.processType != Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
 }
 
 function run_test() {
   // Allow all cookies if the pref service is available in this process.
-  if (!inChildProcess())
+  if (!inChildProcess()) {
     Services.prefs.setIntPref("network.cookie.cookieBehavior", 0);
+  }
 
   let cs = Cc["@mozilla.org/cookieService;1"].getService(Ci.nsICookieService);
 
   let uri = NetUtil.newURI("http://example.org/");
 
   let set = "foo=b;max-age=3600, c=d;path=/";
   cs.setCookieStringFromHttp(uri, null, null, set, null, null);
 
   let expected = "foo=b";
   let actual = cs.getCookieStringFromHttp(uri, null, null);
   Assert.equal(actual, expected);
 }
-
--- a/netwerk/cookie/test/unit/test_rawSameSite.js
+++ b/netwerk/cookie/test/unit/test_rawSameSite.js
@@ -1,82 +1,93 @@
-const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function inChildProcess() {
   return Services.appinfo.processType != Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
 }
 
 add_task(async _ => {
   do_get_profile();
 
   let dbFile = Services.dirsvc.get("ProfD", Ci.nsIFile);
   dbFile.append("cookies.sqlite");
 
   let storage = Services.storage;
-  let properties = Cc["@mozilla.org/hash-property-bag;1"].
-                     createInstance(Ci.nsIWritablePropertyBag);
+  let properties = Cc["@mozilla.org/hash-property-bag;1"].createInstance(
+    Ci.nsIWritablePropertyBag
+  );
   properties.setProperty("shared", true);
   let conn = storage.openDatabase(dbFile);
 
   conn.schemaVersion = 9;
   conn.executeSimpleSQL("DROP TABLE IF EXISTS moz_cookies");
-  conn.executeSimpleSQL("CREATE TABLE moz_cookies (" +
+  conn.executeSimpleSQL(
+    "CREATE TABLE moz_cookies (" +
       "id INTEGER PRIMARY KEY, " +
       "baseDomain TEXT, " +
       "originAttributes TEXT NOT NULL DEFAULT '', " +
       "name TEXT, " +
       "value TEXT, " +
       "host TEXT, " +
       "path TEXT, " +
       "expiry INTEGER, " +
       "lastAccessed INTEGER, " +
       "creationTime INTEGER, " +
       "isSecure INTEGER, " +
       "isHttpOnly INTEGER, " +
       "inBrowserElement INTEGER DEFAULT 0, " +
       "sameSite INTEGER DEFAULT 0, " +
       "CONSTRAINT moz_uniqueid UNIQUE (name, host, path, originAttributes)" +
-      ")");
+      ")"
+  );
   conn.close();
 
   // Allow all cookies if the pref service is available in this process.
   if (!inChildProcess()) {
     Services.prefs.setIntPref("network.cookie.cookieBehavior", 0);
-    Services.prefs.setBoolPref("network.cookieSettings.unblocked_for_testing", true);
+    Services.prefs.setBoolPref(
+      "network.cookieSettings.unblocked_for_testing",
+      true
+    );
     Services.prefs.setBoolPref("network.cookie.sameSite.laxByDefault", true);
-    Services.prefs.setBoolPref("network.cookie.sameSite.noneRequiresSecure", true);
+    Services.prefs.setBoolPref(
+      "network.cookie.sameSite.noneRequiresSecure",
+      true
+    );
   }
 
   let cs = Cc["@mozilla.org/cookieService;1"].getService(Ci.nsICookieService);
 
   let uri = NetUtil.newURI("http://example.org/");
 
-  let principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
+  let principal = Services.scriptSecurityManager.createCodebasePrincipal(
+    uri,
+    {}
+  );
 
   let channel = NetUtil.newChannel({
     uri,
     loadingPrincipal: principal,
     securityFlags: Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
     contentPolicyType: Ci.nsIContentPolicy.TYPE_OTHER,
   });
 
   let tests = [
-    { cookie: "foo=b;max-age=3600, c=d;path=/; sameSite=strict",
+    {
+      cookie: "foo=b;max-age=3600, c=d;path=/; sameSite=strict",
       sameSite: 2,
       rawSameSite: 2,
     },
-    { cookie: "foo=b;max-age=3600, c=d;path=/; sameSite=lax",
+    {
+      cookie: "foo=b;max-age=3600, c=d;path=/; sameSite=lax",
       sameSite: 1,
       rawSameSite: 1,
     },
-    { cookie: "foo=b;max-age=3600, c=d;path=/",
-      sameSite: 1,
-      rawSameSite: 0,
-    },
+    { cookie: "foo=b;max-age=3600, c=d;path=/", sameSite: 1, rawSameSite: 0 },
   ];
 
   for (let i = 0; i < tests.length; ++i) {
     let test = tests[i];
 
     let promise = new Promise(resolve => {
       function observer(subject, topic, data) {
         Services.obs.removeObserver(observer, "cookie-saved-on-disk");
@@ -88,17 +99,19 @@ add_task(async _ => {
 
     cs.setCookieStringFromHttp(uri, null, null, test.cookie, null, channel);
 
     await promise;
 
     conn = storage.openDatabase(dbFile);
     Assert.equal(conn.schemaVersion, 10);
 
-    let stmt = conn.createStatement("SELECT sameSite, rawSameSite FROM moz_cookies");
+    let stmt = conn.createStatement(
+      "SELECT sameSite, rawSameSite FROM moz_cookies"
+    );
 
     let success = stmt.executeStep();
     Assert.ok(success);
 
     let sameSite = stmt.getInt32(0);
     let rawSameSite = stmt.getInt32(1);
     stmt.finalize();
 
--- a/netwerk/dns/mdns/libmdns/DNSServiceDiscovery.jsm
+++ b/netwerk/dns/mdns/libmdns/DNSServiceDiscovery.jsm
@@ -1,30 +1,36 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
-const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { AppConstants } = ChromeUtils.import(
+  "resource://gre/modules/AppConstants.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-const {MulticastDNS} = ChromeUtils.import(
-  (AppConstants.platform == "android" && !Services.prefs.getBoolPref("network.mdns.use_js_fallback"))
-  ? "resource://gre/modules/MulticastDNSAndroid.jsm"
-  : "resource://gre/modules/MulticastDNS.jsm");
+const { MulticastDNS } = ChromeUtils.import(
+  AppConstants.platform == "android" &&
+    !Services.prefs.getBoolPref("network.mdns.use_js_fallback")
+    ? "resource://gre/modules/MulticastDNSAndroid.jsm"
+    : "resource://gre/modules/MulticastDNS.jsm"
+);
 
-const DNSSERVICEINFO_CONTRACT_ID = "@mozilla.org/toolkit/components/mdnsresponder/dns-info;1";
+const DNSSERVICEINFO_CONTRACT_ID =
+  "@mozilla.org/toolkit/components/mdnsresponder/dns-info;1";
 
 function log(aMsg) {
   dump("-*- nsDNSServiceDiscovery.js : " + aMsg + "\n");
 }
 
 function generateUuid() {
-  var uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].
-    getService(Ci.nsIUUIDGenerator);
+  var uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].getService(
+    Ci.nsIUUIDGenerator
+  );
   return uuidGenerator.generateUUID().toString();
 }
 
 // Helper class to transform return objects to correct type.
 function ListenerWrapper(aListener, aMdns) {
   this.listener = aListener;
   this.mdns = aMdns;
 
@@ -35,34 +41,43 @@ function ListenerWrapper(aListener, aMdn
   this.stopRegistration = false;
 
   this.uuid = generateUuid();
 }
 
 ListenerWrapper.prototype = {
   // Helper function for transforming an Object into nsIDNSServiceInfo.
   makeServiceInfo(aServiceInfo) {
-    let serviceInfo = Cc[DNSSERVICEINFO_CONTRACT_ID].createInstance(Ci.nsIDNSServiceInfo);
+    let serviceInfo = Cc[DNSSERVICEINFO_CONTRACT_ID].createInstance(
+      Ci.nsIDNSServiceInfo
+    );
 
-    for (let name of ["host", "address", "port", "serviceName", "serviceType"]) {
+    for (let name of [
+      "host",
+      "address",
+      "port",
+      "serviceName",
+      "serviceType",
+    ]) {
       try {
         serviceInfo[name] = aServiceInfo[name];
       } catch (e) {
         // ignore exceptions
       }
     }
 
     let attributes;
     try {
       attributes = _toPropertyBag2(aServiceInfo.attributes);
     } catch (err) {
-        // Ignore unset attributes in object.
-        log("Caught unset attributes error: " + err + " - " + err.stack);
-        attributes = Cc["@mozilla.org/hash-property-bag;1"]
-                        .createInstance(Ci.nsIWritablePropertyBag2);
+      // Ignore unset attributes in object.
+      log("Caught unset attributes error: " + err + " - " + err.stack);
+      attributes = Cc["@mozilla.org/hash-property-bag;1"].createInstance(
+        Ci.nsIWritablePropertyBag2
+      );
     }
     serviceInfo.attributes = attributes;
 
     return serviceInfo;
   },
 
   /* transparent types */
   onDiscoveryStarted(aServiceType) {
@@ -108,84 +123,97 @@ ListenerWrapper.prototype = {
   onServiceResolved(aServiceInfo) {
     this.listener.onServiceResolved(this.makeServiceInfo(aServiceInfo));
   },
 
   onRegistrationFailed(aServiceInfo, aErrorCode) {
     log("onRegistrationFailed: (" + aErrorCode + ")");
     this.registrationStarting = false;
     this.stopRegistration = true;
-    this.listener.onRegistrationFailed(this.makeServiceInfo(aServiceInfo), aErrorCode);
+    this.listener.onRegistrationFailed(
+      this.makeServiceInfo(aServiceInfo),
+      aErrorCode
+    );
   },
   onUnregistrationFailed(aServiceInfo, aErrorCode) {
     log("onUnregistrationFailed: (" + aErrorCode + ")");
-    this.listener.onUnregistrationFailed(this.makeServiceInfo(aServiceInfo), aErrorCode);
+    this.listener.onUnregistrationFailed(
+      this.makeServiceInfo(aServiceInfo),
+      aErrorCode
+    );
   },
   onResolveFailed(aServiceInfo, aErrorCode) {
     log("onResolveFailed: (" + aErrorCode + ")");
-    this.listener.onResolveFailed(this.makeServiceInfo(aServiceInfo), aErrorCode);
+    this.listener.onResolveFailed(
+      this.makeServiceInfo(aServiceInfo),
+      aErrorCode
+    );
   },
 };
 
 function nsDNSServiceDiscovery() {
   log("nsDNSServiceDiscovery");
   this.mdns = new MulticastDNS();
 }
 
 nsDNSServiceDiscovery.prototype = {
-  QueryInterface: ChromeUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIDNSServiceDiscovery]),
+  QueryInterface: ChromeUtils.generateQI([
+    Ci.nsISupportsWeakReference,
+    Ci.nsIDNSServiceDiscovery,
+  ]),
 
   startDiscovery(aServiceType, aListener) {
     log("startDiscovery");
     let listener = new ListenerWrapper(aListener, this.mdns);
     listener.discoveryStarting = true;
     this.mdns.startDiscovery(aServiceType, listener);
 
     return {
       QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
-      cancel: (function() {
+      cancel: function() {
         if (this.discoveryStarting || this.stopDiscovery) {
           this.stopDiscovery = true;
           return;
         }
         this.mdns.stopDiscovery(aServiceType, listener);
-      }).bind(listener),
+      }.bind(listener),
     };
   },
 
   registerService(aServiceInfo, aListener) {
     log("registerService");
     let listener = new ListenerWrapper(aListener, this.mdns);
     listener.registrationStarting = true;
     this.mdns.registerService(aServiceInfo, listener);
 
     return {
       QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
-      cancel: (function() {
+      cancel: function() {
         if (this.registrationStarting || this.stopRegistration) {
           this.stopRegistration = true;
           return;
         }
         this.mdns.unregisterService(aServiceInfo, listener);
-      }).bind(listener),
+      }.bind(listener),
     };
   },
 
   resolveService(aServiceInfo, aListener) {
     log("resolveService");
     this.mdns.resolveService(aServiceInfo, new ListenerWrapper(aListener));
   },
 };
 
 var EXPORTED_SYMBOLS = ["nsDNSServiceDiscovery"];
 
 function _toPropertyBag2(obj) {
   if (obj.QueryInterface) {
     return obj.QueryInterface(Ci.nsIPropertyBag2);
   }
 
-  let result = Cc["@mozilla.org/hash-property-bag;1"]
-                  .createInstance(Ci.nsIWritablePropertyBag2);
+  let result = Cc["@mozilla.org/hash-property-bag;1"].createInstance(
+    Ci.nsIWritablePropertyBag2
+  );
   for (let name in obj) {
     result.setPropertyAsAString(name, obj[name]);
   }
   return result;
 }
--- a/netwerk/dns/mdns/libmdns/MulticastDNSAndroid.jsm
+++ b/netwerk/dns/mdns/libmdns/MulticastDNSAndroid.jsm
@@ -2,49 +2,55 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["MulticastDNS"];
 
-const {EventDispatcher} = ChromeUtils.import("resource://gre/modules/Messaging.jsm");
+const { EventDispatcher } = ChromeUtils.import(
+  "resource://gre/modules/Messaging.jsm"
+);
 
 const DEBUG = false;
 
 var log = function(s) {};
 if (DEBUG) {
-  log = ChromeUtils.import("resource://gre/modules/AndroidLog.jsm", {})
-          .AndroidLog.d.bind(null, "MulticastDNS");
+  log = ChromeUtils.import(
+    "resource://gre/modules/AndroidLog.jsm",
+    {}
+  ).AndroidLog.d.bind(null, "MulticastDNS");
 }
 
 const FAILURE_INTERNAL_ERROR = -65537;
 
 // Helper function for sending commands to Java.
 function send(type, data, callback) {
   let msg = {
     type,
   };
 
   for (let i in data) {
     try {
       msg[i] = data[i];
-    } catch (e) {
-    }
+    } catch (e) {}
   }
 
-  EventDispatcher.instance.sendRequestForResult(msg)
-    .then(result => callback(result, null),
-          err => callback(null, typeof err === "number" ? err : FAILURE_INTERNAL_ERROR));
+  EventDispatcher.instance
+    .sendRequestForResult(msg)
+    .then(
+      result => callback(result, null),
+      err =>
+        callback(null, typeof err === "number" ? err : FAILURE_INTERNAL_ERROR)
+    );
 }
 
 // Receives service found/lost event from NsdManager
-function ServiceManager() {
-}
+function ServiceManager() {}
 
 ServiceManager.prototype = {
   listeners: {},
   numListeners: 0,
 
   onEvent(event, data, callback) {
     if (event === "NsdManager:ServiceFound") {
       this.onServiceFound();
@@ -140,21 +146,21 @@ ServiceManager.prototype = {
 
 // make an object from nsIPropertyBag2
 function parsePropertyBag2(bag) {
   if (!bag || !(bag instanceof Ci.nsIPropertyBag2)) {
     throw new TypeError("Not a property bag");
   }
 
   let attributes = [];
-  for (let {name} of bag.enumerator) {
+  for (let { name } of bag.enumerator) {
     let value = bag.getPropertyAsACString(name);
     attributes.push({
-      "name": name,
-      "value": value,
+      name,
+      value,
     });
   }
 
   return attributes;
 }
 
 function MulticastDNS() {
   this.serviceManager = new ServiceManager();
--- a/netwerk/dns/mdns/libmdns/fallback/DNSPacket.jsm
+++ b/netwerk/dns/mdns/libmdns/fallback/DNSPacket.jsm
@@ -3,34 +3,42 @@
  * 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/. */
 /* jshint esnext: true, moz: true */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["DNSPacket"];
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-const {DataReader} = ChromeUtils.import("resource://gre/modules/DataReader.jsm");
-const {DataWriter} = ChromeUtils.import("resource://gre/modules/DataWriter.jsm");
-const {DNSRecord} = ChromeUtils.import("resource://gre/modules/DNSRecord.jsm");
-const {DNSResourceRecord} = ChromeUtils.import("resource://gre/modules/DNSResourceRecord.jsm");
+const { DataReader } = ChromeUtils.import(
+  "resource://gre/modules/DataReader.jsm"
+);
+const { DataWriter } = ChromeUtils.import(
+  "resource://gre/modules/DataWriter.jsm"
+);
+const { DNSRecord } = ChromeUtils.import(
+  "resource://gre/modules/DNSRecord.jsm"
+);
+const { DNSResourceRecord } = ChromeUtils.import(
+  "resource://gre/modules/DNSResourceRecord.jsm"
+);
 
 const DEBUG = true;
 
 function debug(msg) {
   Services.console.logStringMessage("DNSPacket: " + msg);
 }
 
 let DNS_PACKET_SECTION_TYPES = [
   "QD", // Question
   "AN", // Answer
   "NS", // Authority
-  "AR",  // Additional
+  "AR", // Additional
 ];
 
 /**
  * DNS Packet Structure
  * *************************************************
  *
  * Header
  * ======
@@ -120,47 +128,51 @@ let DNS_PACKET_SECTION_TYPES = [
  * DATALEN:   2-Bytes
  * DATA:      ??-Bytes (Specified By DATALEN)
  */
 class DNSPacket {
   constructor() {
     this._flags = _valueToFlags(0x0000);
     this._records = {};
 
-    DNS_PACKET_SECTION_TYPES.forEach((sectionType) => {
+    DNS_PACKET_SECTION_TYPES.forEach(sectionType => {
       this._records[sectionType] = [];
     });
   }
 
   static parse(data) {
     let reader = new DataReader(data);
     if (reader.getValue(2) !== 0x0000) {
       throw new Error("Packet must start with 0x0000");
     }
 
     let packet = new DNSPacket();
     packet._flags = _valueToFlags(reader.getValue(2));
 
     let recordCounts = {};
 
     // Parse the record counts.
-    DNS_PACKET_SECTION_TYPES.forEach((sectionType) => {
+    DNS_PACKET_SECTION_TYPES.forEach(sectionType => {
       recordCounts[sectionType] = reader.getValue(2);
     });
 
     // Parse the actual records.
-    DNS_PACKET_SECTION_TYPES.forEach((sectionType) => {
+    DNS_PACKET_SECTION_TYPES.forEach(sectionType => {
       let recordCount = recordCounts[sectionType];
       for (let i = 0; i < recordCount; i++) {
         if (sectionType === "QD") {
-          packet.addRecord(sectionType,
-              DNSRecord.parseFromPacketReader(reader));
+          packet.addRecord(
+            sectionType,
+            DNSRecord.parseFromPacketReader(reader)
+          );
         } else {
-          packet.addRecord(sectionType,
-              DNSResourceRecord.parseFromPacketReader(reader));
+          packet.addRecord(
+            sectionType,
+            DNSResourceRecord.parseFromPacketReader(reader)
+          );
         }
       }
     });
 
     if (!reader.eof) {
       DEBUG && debug("Did not complete parsing packet data");
     }
 
@@ -177,17 +189,17 @@ class DNSPacket {
 
   addRecord(sectionType, record) {
     this._records[sectionType].push(record);
   }
 
   getRecords(sectionTypes, recordType) {
     let records = [];
 
-    sectionTypes.forEach((sectionType) => {
+    sectionTypes.forEach(sectionType => {
       records = records.concat(this._records[sectionType]);
     });
 
     if (!recordType) {
       return records;
     }
 
     return records.filter(r => r.recordType === recordType);
@@ -198,41 +210,41 @@ class DNSPacket {
 
     // Write leading 0x0000 (2 bytes)
     writer.putValue(0x0000, 2);
 
     // Write `flags` (2 bytes)
     writer.putValue(_flagsToValue(this._flags), 2);
 
     // Write lengths of record sections (2 bytes each)
-    DNS_PACKET_SECTION_TYPES.forEach((sectionType) => {
+    DNS_PACKET_SECTION_TYPES.forEach(sectionType => {
       writer.putValue(this._records[sectionType].length, 2);
     });
 
     // Write records
-    DNS_PACKET_SECTION_TYPES.forEach((sectionType) => {
-      this._records[sectionType].forEach((record) => {
+    DNS_PACKET_SECTION_TYPES.forEach(sectionType => {
+      this._records[sectionType].forEach(record => {
         writer.putBytes(record.serialize());
       });
     });
 
     return writer.data;
   }
 
   toJSON() {
     return JSON.stringify(this.toJSONObject());
   }
 
   toJSONObject() {
-    let result = {flags: this._flags};
-    DNS_PACKET_SECTION_TYPES.forEach((sectionType) => {
+    let result = { flags: this._flags };
+    DNS_PACKET_SECTION_TYPES.forEach(sectionType => {
       result[sectionType] = [];
 
       let records = this._records[sectionType];
-      records.forEach((record) => {
+      records.forEach(record => {
         result[sectionType].push(record.toJSONObject());
       });
     });
 
     return result;
   }
 }
 
--- a/netwerk/dns/mdns/libmdns/fallback/DNSRecord.jsm
+++ b/netwerk/dns/mdns/libmdns/fallback/DNSRecord.jsm
@@ -3,32 +3,36 @@
  * 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/. */
 /* jshint esnext: true, moz: true */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["DNSRecord"];
 
-const {DataWriter} = ChromeUtils.import("resource://gre/modules/DataWriter.jsm");
-const {DNS_CLASS_CODES, DNS_RECORD_TYPES} = ChromeUtils.import("resource://gre/modules/DNSTypes.jsm");
+const { DataWriter } = ChromeUtils.import(
+  "resource://gre/modules/DataWriter.jsm"
+);
+const { DNS_CLASS_CODES, DNS_RECORD_TYPES } = ChromeUtils.import(
+  "resource://gre/modules/DNSTypes.jsm"
+);
 
 class DNSRecord {
   constructor(properties = {}) {
-    this.name       = properties.name || "";
+    this.name = properties.name || "";
     this.recordType = properties.recordType || DNS_RECORD_TYPES.ANY;
-    this.classCode  = properties.classCode || DNS_CLASS_CODES.IN;
+    this.classCode = properties.classCode || DNS_CLASS_CODES.IN;
     this.cacheFlush = properties.cacheFlush || false;
   }
 
   static parseFromPacketReader(reader) {
-    let name       = reader.getLabel();
+    let name = reader.getLabel();
     let recordType = reader.getValue(2);
-    let classCode  = reader.getValue(2);
-    let cacheFlush = !!((classCode & 0x8000));
+    let classCode = reader.getValue(2);
+    let cacheFlush = !!(classCode & 0x8000);
     classCode &= 0xff;
 
     return new this({
       name,
       recordType,
       classCode,
       cacheFlush,
     });
--- a/netwerk/dns/mdns/libmdns/fallback/DNSResourceRecord.jsm
+++ b/netwerk/dns/mdns/libmdns/fallback/DNSResourceRecord.jsm
@@ -3,35 +3,43 @@
  * 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/. */
 /* jshint esnext: true, moz: true */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["DNSResourceRecord"];
 
-const {DataReader} = ChromeUtils.import("resource://gre/modules/DataReader.jsm");
-const {DataWriter} = ChromeUtils.import("resource://gre/modules/DataWriter.jsm");
-const {DNSRecord} = ChromeUtils.import("resource://gre/modules/DNSRecord.jsm");
-const {DNS_RECORD_TYPES} = ChromeUtils.import("resource://gre/modules/DNSTypes.jsm");
+const { DataReader } = ChromeUtils.import(
+  "resource://gre/modules/DataReader.jsm"
+);
+const { DataWriter } = ChromeUtils.import(
+  "resource://gre/modules/DataWriter.jsm"
+);
+const { DNSRecord } = ChromeUtils.import(
+  "resource://gre/modules/DNSRecord.jsm"
+);
+const { DNS_RECORD_TYPES } = ChromeUtils.import(
+  "resource://gre/modules/DNSTypes.jsm"
+);
 
 const DNS_RESOURCE_RECORD_DEFAULT_TTL = 120; // 120 seconds
 
 class DNSResourceRecord extends DNSRecord {
   constructor(properties = {}) {
     super(properties);
 
-    this.ttl  = properties.ttl || DNS_RESOURCE_RECORD_DEFAULT_TTL;
+    this.ttl = properties.ttl || DNS_RESOURCE_RECORD_DEFAULT_TTL;
     this.data = properties.data || {};
   }
 
   static parseFromPacketReader(reader) {
     let record = super.parseFromPacketReader(reader);
 
-    let ttl        = reader.getValue(4);
+    let ttl = reader.getValue(4);
     let recordData = reader.getBytes(reader.getValue(2));
     let packetData = reader.data;
 
     let data;
 
     switch (record.recordType) {
       case DNS_RECORD_TYPES.A:
         data = _parseA(recordData, packetData);
@@ -45,17 +53,17 @@ class DNSResourceRecord extends DNSRecor
       case DNS_RECORD_TYPES.SRV:
         data = _parseSRV(recordData, packetData);
         break;
       default:
         data = null;
         break;
     }
 
-    record.ttl  = ttl;
+    record.ttl = ttl;
     record.data = data;
 
     return record;
   }
 
   serialize() {
     let writer = new DataWriter(super.serialize());
 
@@ -132,36 +140,36 @@ function _parsePTR(recordData, packetDat
 function _parseTXT(recordData, packetData) {
   let reader = new DataReader(recordData);
 
   let result = {};
 
   let label = reader.getLabel(packetData);
   if (label.length > 0) {
     let parts = label.split(".");
-    parts.forEach((part) => {
+    parts.forEach(part => {
       let [name] = part.split("=", 1);
       let value = part.substr(name.length + 1);
       result[name] = value;
     });
   }
 
   return result;
 }
 
 /**
  * @private
  */
 function _parseSRV(recordData, packetData) {
   let reader = new DataReader(recordData);
 
   let priority = reader.getValue(2);
-  let weight   = reader.getValue(2);
-  let port     = reader.getValue(2);
-  let target   = reader.getLabel(packetData);
+  let weight = reader.getValue(2);
+  let port = reader.getValue(2);
+  let target = reader.getLabel(packetData);
 
   return { priority, weight, port, target };
 }
 
 /**
  * @private
  */
 function _serializeA(data) {
--- a/netwerk/dns/mdns/libmdns/fallback/DNSTypes.jsm
+++ b/netwerk/dns/mdns/libmdns/fallback/DNSTypes.jsm
@@ -9,92 +9,92 @@
 var EXPORTED_SYMBOLS = [
   "DNS_QUERY_RESPONSE_CODES",
   "DNS_AUTHORITATIVE_ANSWER_CODES",
   "DNS_CLASS_CODES",
   "DNS_RECORD_TYPES",
 ];
 
 let DNS_QUERY_RESPONSE_CODES = {
-  QUERY: 0,      // RFC 1035 - Query
-  RESPONSE: 1,       // RFC 1035 - Reponse
+  QUERY: 0, // RFC 1035 - Query
+  RESPONSE: 1, // RFC 1035 - Reponse
 };
 
 let DNS_AUTHORITATIVE_ANSWER_CODES = {
-  NO: 0,      // RFC 1035 - Not Authoritative
-  YES: 1,       // RFC 1035 - Is Authoritative
+  NO: 0, // RFC 1035 - Not Authoritative
+  YES: 1, // RFC 1035 - Is Authoritative
 };
 
 let DNS_CLASS_CODES = {
-  IN: 0x01,   // RFC 1035 - Internet
-  CS: 0x02,   // RFC 1035 - CSNET
-  CH: 0x03,   // RFC 1035 - CHAOS
-  HS: 0x04,   // RFC 1035 - Hesiod
-  NONE: 0xfe,   // RFC 2136 - None
-  ANY: 0xff,   // RFC 1035 - Any
+  IN: 0x01, // RFC 1035 - Internet
+  CS: 0x02, // RFC 1035 - CSNET
+  CH: 0x03, // RFC 1035 - CHAOS
+  HS: 0x04, // RFC 1035 - Hesiod
+  NONE: 0xfe, // RFC 2136 - None
+  ANY: 0xff, // RFC 1035 - Any
 };
 
 let DNS_RECORD_TYPES = {
-  SIGZERO: 0,      // RFC 2931
-  A: 1,      // RFC 1035
-  NS: 2,      // RFC 1035
-  MD: 3,      // RFC 1035
-  MF: 4,      // RFC 1035
-  CNAME: 5,      // RFC 1035
-  SOA: 6,      // RFC 1035
-  MB: 7,      // RFC 1035
-  MG: 8,      // RFC 1035
-  MR: 9,      // RFC 1035
-  NULL: 10,     // RFC 1035
-  WKS: 11,     // RFC 1035
-  PTR: 12,     // RFC 1035
-  HINFO: 13,     // RFC 1035
-  MINFO: 14,     // RFC 1035
-  MX: 15,     // RFC 1035
-  TXT: 16,     // RFC 1035
-  RP: 17,     // RFC 1183
-  AFSDB: 18,     // RFC 1183
-  X25: 19,     // RFC 1183
-  ISDN: 20,     // RFC 1183
-  RT: 21,     // RFC 1183
-  NSAP: 22,     // RFC 1706
-  NSAP_PTR: 23,     // RFC 1348
-  SIG: 24,     // RFC 2535
-  KEY: 25,     // RFC 2535
-  PX: 26,     // RFC 2163
-  GPOS: 27,     // RFC 1712
-  AAAA: 28,     // RFC 1886
-  LOC: 29,     // RFC 1876
-  NXT: 30,     // RFC 2535
-  EID: 31,     // RFC ????
-  NIMLOC: 32,     // RFC ????
-  SRV: 33,     // RFC 2052
-  ATMA: 34,     // RFC ????
-  NAPTR: 35,     // RFC 2168
-  KX: 36,     // RFC 2230
-  CERT: 37,     // RFC 2538
-  DNAME: 39,     // RFC 2672
-  OPT: 41,     // RFC 2671
-  APL: 42,     // RFC 3123
-  DS: 43,     // RFC 4034
-  SSHFP: 44,     // RFC 4255
-  IPSECKEY: 45,     // RFC 4025
-  RRSIG: 46,     // RFC 4034
-  NSEC: 47,     // RFC 4034
-  DNSKEY: 48,     // RFC 4034
-  DHCID: 49,     // RFC 4701
-  NSEC3: 50,     // RFC ????
-  NSEC3PARAM: 51,     // RFC ????
-  HIP: 55,     // RFC 5205
-  SPF: 99,     // RFC 4408
-  UINFO: 100,    // RFC ????
-  UID: 101,    // RFC ????
-  GID: 102,    // RFC ????
-  UNSPEC: 103,    // RFC ????
-  TKEY: 249,    // RFC 2930
-  TSIG: 250,    // RFC 2931
-  IXFR: 251,    // RFC 1995
-  AXFR: 252,    // RFC 1035
-  MAILB: 253,    // RFC 1035
-  MAILA: 254,    // RFC 1035
-  ANY: 255,    // RFC 1035
-  DLV: 32769,   // RFC 4431
+  SIGZERO: 0, // RFC 2931
+  A: 1, // RFC 1035
+  NS: 2, // RFC 1035
+  MD: 3, // RFC 1035
+  MF: 4, // RFC 1035
+  CNAME: 5, // RFC 1035
+  SOA: 6, // RFC 1035
+  MB: 7, // RFC 1035
+  MG: 8, // RFC 1035
+  MR: 9, // RFC 1035
+  NULL: 10, // RFC 1035
+  WKS: 11, // RFC 1035
+  PTR: 12, // RFC 1035
+  HINFO: 13, // RFC 1035
+  MINFO: 14, // RFC 1035
+  MX: 15, // RFC 1035
+  TXT: 16, // RFC 1035
+  RP: 17, // RFC 1183
+  AFSDB: 18, // RFC 1183
+  X25: 19, // RFC 1183
+  ISDN: 20, // RFC 1183
+  RT: 21, // RFC 1183
+  NSAP: 22, // RFC 1706
+  NSAP_PTR: 23, // RFC 1348
+  SIG: 24, // RFC 2535
+  KEY: 25, // RFC 2535
+  PX: 26, // RFC 2163
+  GPOS: 27, // RFC 1712
+  AAAA: 28, // RFC 1886
+  LOC: 29, // RFC 1876
+  NXT: 30, // RFC 2535
+  EID: 31, // RFC ????
+  NIMLOC: 32, // RFC ????
+  SRV: 33, // RFC 2052
+  ATMA: 34, // RFC ????
+  NAPTR: 35, // RFC 2168
+  KX: 36, // RFC 2230
+  CERT: 37, // RFC 2538
+  DNAME: 39, // RFC 2672
+  OPT: 41, // RFC 2671
+  APL: 42, // RFC 3123
+  DS: 43, // RFC 4034
+  SSHFP: 44, // RFC 4255
+  IPSECKEY: 45, // RFC 4025
+  RRSIG: 46, // RFC 4034
+  NSEC: 47, // RFC 4034
+  DNSKEY: 48, // RFC 4034
+  DHCID: 49, // RFC 4701
+  NSEC3: 50, // RFC ????
+  NSEC3PARAM: 51, // RFC ????
+  HIP: 55, // RFC 5205
+  SPF: 99, // RFC 4408
+  UINFO: 100, // RFC ????
+  UID: 101, // RFC ????
+  GID: 102, // RFC ????
+  UNSPEC: 103, // RFC ????
+  TKEY: 249, // RFC 2930
+  TSIG: 250, // RFC 2931
+  IXFR: 251, // RFC 1995
+  AXFR: 252, // RFC 1035
+  MAILB: 253, // RFC 1035
+  MAILA: 254, // RFC 1035
+  ANY: 255, // RFC 1035
+  DLV: 32769, // RFC 4431
 };
--- a/netwerk/dns/mdns/libmdns/fallback/DataReader.jsm
+++ b/netwerk/dns/mdns/libmdns/fallback/DataReader.jsm
@@ -100,17 +100,19 @@ function _uint8ArrayToValue(uint8Array) 
 function _uint8ArrayToString(uint8Array) {
   let length = uint8Array.length;
   if (length === 0) {
     return "";
   }
 
   let results = [];
   for (let i = 0; i < length; i += 1024) {
-    results.push(String.fromCharCode.apply(null, uint8Array.subarray(i, i + 1024)));
+    results.push(
+      String.fromCharCode.apply(null, uint8Array.subarray(i, i + 1024))
+    );
   }
 
   return results.join("");
 }
 
 /**
  * @private
  */
--- a/netwerk/dns/mdns/libmdns/fallback/DataWriter.jsm
+++ b/netwerk/dns/mdns/libmdns/fallback/DataWriter.jsm
@@ -61,25 +61,25 @@ class DataWriter {
       this.putBytes(_valueToUint8Array(value, length));
     }
   }
 
   putLabel(label) {
     // Eliminate any trailing '.'s in the label (valid in text representation).
     label = label.replace(/\.$/, "");
     let parts = label.split(".");
-    parts.forEach((part) => {
+    parts.forEach(part => {
       this.putLengthString(part);
     });
     this.putValue(0);
   }
 
   putLengthString(string) {
     if (string.length > 0xff) {
-        throw new Error("String too long.");
+      throw new Error("String too long.");
     }
     this.putValue(string.length);
     for (let i = 0; i < string.length; i++) {
       this.putValue(string.charCodeAt(i));
     }
   }
 }
 
--- a/netwerk/dns/mdns/libmdns/fallback/MulticastDNS.jsm
+++ b/netwerk/dns/mdns/libmdns/fallback/MulticastDNS.jsm
@@ -3,43 +3,66 @@
  * 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/. */
 /* jshint esnext: true, moz: true */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["MulticastDNS"];
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-const {clearTimeout, setTimeout} = ChromeUtils.import("resource://gre/modules/Timer.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { clearTimeout, setTimeout } = ChromeUtils.import(
+  "resource://gre/modules/Timer.jsm"
+);
 
-const {DNSPacket} = ChromeUtils.import("resource://gre/modules/DNSPacket.jsm");
-const {DNSRecord} = ChromeUtils.import("resource://gre/modules/DNSRecord.jsm");
-const {DNSResourceRecord} = ChromeUtils.import("resource://gre/modules/DNSResourceRecord.jsm");
-const {DNS_AUTHORITATIVE_ANSWER_CODES, DNS_CLASS_CODES, DNS_QUERY_RESPONSE_CODES, DNS_RECORD_TYPES} = ChromeUtils.import("resource://gre/modules/DNSTypes.jsm");
+const { DNSPacket } = ChromeUtils.import(
+  "resource://gre/modules/DNSPacket.jsm"
+);
+const { DNSRecord } = ChromeUtils.import(
+  "resource://gre/modules/DNSRecord.jsm"
+);
+const { DNSResourceRecord } = ChromeUtils.import(
+  "resource://gre/modules/DNSResourceRecord.jsm"
+);
+const {
+  DNS_AUTHORITATIVE_ANSWER_CODES,
+  DNS_CLASS_CODES,
+  DNS_QUERY_RESPONSE_CODES,
+  DNS_RECORD_TYPES,
+} = ChromeUtils.import("resource://gre/modules/DNSTypes.jsm");
 
 const NS_NETWORK_LINK_TOPIC = "network:link-status-changed";
 
-let networkInfoService  = Cc["@mozilla.org/network-info-service;1"]
-                            .createInstance(Ci.nsINetworkInfoService);
+let networkInfoService = Cc[
+  "@mozilla.org/network-info-service;1"
+].createInstance(Ci.nsINetworkInfoService);
 
 const DEBUG = true;
 
 const MDNS_MULTICAST_GROUP = "224.0.0.251";
-const MDNS_PORT            = 5353;
-const DEFAULT_TTL          = 120;
+const MDNS_PORT = 5353;
+const DEFAULT_TTL = 120;
 
 function debug(msg) {
   dump("MulticastDNS: " + msg + "\n");
 }
 
 function ServiceKey(svc) {
-  return "" + svc.serviceType.length + "/" + svc.serviceType + "|" +
-              svc.serviceName.length + "/" + svc.serviceName + "|" +
-              svc.port;
+  return (
+    "" +
+    svc.serviceType.length +
+    "/" +
+    svc.serviceType +
+    "|" +
+    svc.serviceName.length +
+    "/" +
+    svc.serviceName +
+    "|" +
+    svc.port
+  );
 }
 
 function TryGet(obj, name) {
   try {
     return obj[name];
   } catch (err) {
     return undefined;
   }
@@ -72,77 +95,91 @@ class PublishedService {
     this.serviceAttrs = _propertyBagToObject(TryGet(attrs, "attributes") || {});
     this.host = TryGet(attrs, "host");
     this.key = this.generateKey();
     this.lastAdvertised = undefined;
     this.advertiseTimer = undefined;
   }
 
   equals(svc) {
-    return (this.port == svc.port) &&
-           (this.serviceName == svc.serviceName) &&
-           (this.serviceType == svc.serviceType);
+    return (
+      this.port == svc.port &&
+      this.serviceName == svc.serviceName &&
+      this.serviceType == svc.serviceType
+    );
   }
 
   generateKey() {
     return ServiceKey(this);
   }
 
   ptrMatch(name) {
-    return name == (this.serviceType + "." + this.domainName);
+    return name == this.serviceType + "." + this.domainName;
   }
 
   clearAdvertiseTimer() {
     if (!this.advertiseTimer) {
       return;
     }
     clearTimeout(this.advertiseTimer);
     this.advertiseTimer = undefined;
   }
 }
 
 class MulticastDNS {
   constructor() {
-    this._listeners       = new Map();
-    this._sockets         = new Map();
-    this._services        = new Map();
-    this._discovered      = new Map();
-    this._querySocket     = undefined;
+    this._listeners = new Map();
+    this._sockets = new Map();
+    this._services = new Map();
+    this._discovered = new Map();
+    this._querySocket = undefined;
     this._broadcastReceiverSocket = undefined;
-    this._broadcastTimer  = undefined;
+    this._broadcastTimer = undefined;
 
     this._networkLinkObserver = {
       observe: (subject, topic, data) => {
-        DEBUG && debug(NS_NETWORK_LINK_TOPIC + "(" + data + "); Clearing list of previously discovered services");
+        DEBUG &&
+          debug(
+            NS_NETWORK_LINK_TOPIC +
+              "(" +
+              data +
+              "); Clearing list of previously discovered services"
+          );
         this._discovered.clear();
       },
     };
   }
 
   _attachNetworkLinkObserver() {
     if (this._networkLinkObserverTimeout) {
       clearTimeout(this._networkLinkObserverTimeout);
     }
 
     if (!this._isNetworkLinkObserverAttached) {
       DEBUG && debug("Attaching observer " + NS_NETWORK_LINK_TOPIC);
-      Services.obs.addObserver(this._networkLinkObserver, NS_NETWORK_LINK_TOPIC);
+      Services.obs.addObserver(
+        this._networkLinkObserver,
+        NS_NETWORK_LINK_TOPIC
+      );
       this._isNetworkLinkObserverAttached = true;
     }
   }
 
   _detachNetworkLinkObserver() {
     if (this._isNetworkLinkObserverAttached) {
       if (this._networkLinkObserverTimeout) {
         clearTimeout(this._networkLinkObserverTimeout);
       }
 
       this._networkLinkObserverTimeout = setTimeout(() => {
         DEBUG && debug("Detaching observer " + NS_NETWORK_LINK_TOPIC);
-        Services.obs.removeObserver(this._networkLinkObserver, NS_NETWORK_LINK_TOPIC);
+        Services.obs.removeObserver(
+          this._networkLinkObserver,
+          NS_NETWORK_LINK_TOPIC
+        );
         this._isNetworkLinkObserverAttached = false;
         this._networkLinkObserverTimeout = null;
       }, 5000);
     }
   }
 
   startDiscovery(aServiceType, aListener) {
     DEBUG && debug('startDiscovery("' + aServiceType + '")');
@@ -194,32 +231,42 @@ class MulticastDNS {
         throw new Error('Invalid nsIDNSServiceInfo; Missing "' + name + '"');
       }
     }
 
     let publishedService;
     try {
       publishedService = new PublishedService(aServiceInfo);
     } catch (e) {
-      DEBUG && debug("Error constructing PublishedService: " + e + " - " + e.stack);
-      setTimeout(() => aListener.onRegistrationFailed(aServiceInfo, Cr.NS_ERROR_FAILURE));
+      DEBUG &&
+        debug("Error constructing PublishedService: " + e + " - " + e.stack);
+      setTimeout(() =>
+        aListener.onRegistrationFailed(aServiceInfo, Cr.NS_ERROR_FAILURE)
+      );
       return;
     }
 
     // Ensure such a service does not already exist.
     if (this._services.get(publishedService.key)) {
-      setTimeout(() => aListener.onRegistrationFailed(aServiceInfo, Cr.NS_ERROR_FAILURE));
+      setTimeout(() =>
+        aListener.onRegistrationFailed(aServiceInfo, Cr.NS_ERROR_FAILURE)
+      );
       return;
     }
 
     // Make sure that the service addr is '0.0.0.0', or there is at least one
     // socket open on the address the service is open on.
-    this._getSockets().then((sockets) => {
-      if (publishedService.address != "0.0.0.0" && !sockets.get(publishedService.address)) {
-        setTimeout(() => aListener.onRegistrationFailed(aServiceInfo, Cr.NS_ERROR_FAILURE));
+    this._getSockets().then(sockets => {
+      if (
+        publishedService.address != "0.0.0.0" &&
+        !sockets.get(publishedService.address)
+      ) {
+        setTimeout(() =>
+          aListener.onRegistrationFailed(aServiceInfo, Cr.NS_ERROR_FAILURE)
+        );
         return;
       }
 
       this._services.set(publishedService.key, publishedService);
 
       // Service registered.. call onServiceRegistered on next tick.
       setTimeout(() => aListener.onServiceRegistered(aServiceInfo));
 
@@ -232,65 +279,83 @@ class MulticastDNS {
 
   unregisterService(aServiceInfo, aListener) {
     DEBUG && debug("unregisterService(): " + aServiceInfo.serviceName);
 
     let serviceKey;
     try {
       serviceKey = ServiceKey(aServiceInfo);
     } catch (e) {
-      setTimeout(() => aListener.onUnregistrationFailed(aServiceInfo, Cr.NS_ERROR_FAILURE));
+      setTimeout(() =>
+        aListener.onUnregistrationFailed(aServiceInfo, Cr.NS_ERROR_FAILURE)
+      );
       return;
     }
 
     let publishedService = this._services.get(serviceKey);
     if (!publishedService) {
-      setTimeout(() => aListener.onUnregistrationFailed(aServiceInfo, Cr.NS_ERROR_FAILURE));
+      setTimeout(() =>
+        aListener.onUnregistrationFailed(aServiceInfo, Cr.NS_ERROR_FAILURE)
+      );
       return;
     }
 
     // Clear any advertise timeout for this published service.
     publishedService.clearAdvertiseTimer();
 
     // Delete the service from the service map.
     if (!this._services.delete(serviceKey)) {
-      setTimeout(() => aListener.onUnregistrationFailed(aServiceInfo, Cr.NS_ERROR_FAILURE));
+      setTimeout(() =>
+        aListener.onUnregistrationFailed(aServiceInfo, Cr.NS_ERROR_FAILURE)
+      );
       return;
     }
 
     // Check the broadcast timer again to rejig when it should run next.
     this._checkStartBroadcastTimer();
 
     // Check to see if sockets should be closed, and if so close them.
     this._checkCloseSockets();
 
     aListener.onServiceUnregistered(aServiceInfo);
   }
 
   _respondToQuery(serviceKey, message) {
     let address = message.fromAddr.address;
     let port = message.fromAddr.port;
-    DEBUG && debug("_respondToQuery(): key=" + serviceKey + ", fromAddr="
-                        + address + ":" + port);
+    DEBUG &&
+      debug(
+        "_respondToQuery(): key=" +
+          serviceKey +
+          ", fromAddr=" +
+          address +
+          ":" +
+          port
+      );
 
     let publishedService = this._services.get(serviceKey);
     if (!publishedService) {
       debug("_respondToQuery Could not find service (key=" + serviceKey + ")");
       return;
     }
 
-    DEBUG && debug("_respondToQuery(): key=" + serviceKey + ": SENDING RESPONSE");
-    this._advertiseServiceHelper(publishedService, {address, port});
+    DEBUG &&
+      debug("_respondToQuery(): key=" + serviceKey + ": SENDING RESPONSE");
+    this._advertiseServiceHelper(publishedService, { address, port });
   }
 
   _advertiseService(serviceKey, firstAdv) {
     DEBUG && debug("_advertiseService(): key=" + serviceKey);
     let publishedService = this._services.get(serviceKey);
     if (!publishedService) {
-      debug("_advertiseService Could not find service to advertise (key=" + serviceKey + ")");
+      debug(
+        "_advertiseService Could not find service to advertise (key=" +
+          serviceKey +
+          ")"
+      );
       return;
     }
 
     publishedService.advertiseTimer = undefined;
 
     this._advertiseServiceHelper(publishedService, null).then(() => {
       // If first advertisement, re-advertise in 1 second.
       // Otherwise, set the lastAdvertised time.
@@ -302,29 +367,31 @@ class MulticastDNS {
         publishedService.lastAdvertised = Date.now();
         this._checkStartBroadcastTimer();
       }
     });
   }
 
   _advertiseServiceHelper(svc, target) {
     if (!target) {
-      target = {address: MDNS_MULTICAST_GROUP, port: MDNS_PORT};
+      target = { address: MDNS_MULTICAST_GROUP, port: MDNS_PORT };
     }
 
-    return this._getSockets().then((sockets) => {
+    return this._getSockets().then(sockets => {
       sockets.forEach((socket, address) => {
         if (svc.address == "0.0.0.0" || address == svc.address) {
           let packet = this._makeServicePacket(svc, [address]);
           let data = packet.serialize();
           try {
             socket.send(target.address, target.port, data);
           } catch (err) {
-            DEBUG && debug("Failed to send packet to "
-                            + target.address + ":" + target.port);
+            DEBUG &&
+              debug(
+                "Failed to send packet to " + target.address + ":" + target.port
+              );
           }
         }
       });
     });
   }
 
   _cancelBroadcastTimer() {
     if (!this._broadcastTimer) {
@@ -350,106 +417,122 @@ class MulticastDNS {
       if (publishedService.lastAdvertised === undefined) {
         continue;
       }
 
       // Otherwise, check lastAdvertised against now.
       let msSinceAdv = now - publishedService.lastAdvertised;
 
       // If msSinceAdv is more than 90% of the way to the TTL, advertise now.
-      if (msSinceAdv > (DEFAULT_TTL * 1000 * 0.9)) {
+      if (msSinceAdv > DEFAULT_TTL * 1000 * 0.9) {
         bcastServices.push(publishedService);
         continue;
       }
 
       // Otherwise, calculate the next time to advertise for this service.
       // We set that at 95% of the time to the TTL expiry.
-      let nextAdvWait = (DEFAULT_TTL * 1000 * 0.95) - msSinceAdv;
+      let nextAdvWait = DEFAULT_TTL * 1000 * 0.95 - msSinceAdv;
       if (nextBcastWait === undefined || nextBcastWait > nextAdvWait) {
         nextBcastWait = nextAdvWait;
       }
     }
 
     // Schedule an immediate advertisement of all services to be advertised now.
     for (let svc of bcastServices) {
-        svc.advertiseTimer = setTimeout(() => this._advertiseService(svc.key));
+      svc.advertiseTimer = setTimeout(() => this._advertiseService(svc.key));
     }
 
     // Schedule next broadcast check for the next bcast time.
     if (nextBcastWait !== undefined) {
-      DEBUG && debug("_checkStartBroadcastTimer(): Scheduling next check in " + nextBcastWait + "ms");
-      this._broadcastTimer = setTimeout(() => this._checkStartBroadcastTimer(), nextBcastWait);
+      DEBUG &&
+        debug(
+          "_checkStartBroadcastTimer(): Scheduling next check in " +
+            nextBcastWait +
+            "ms"
+        );
+      this._broadcastTimer = setTimeout(
+        () => this._checkStartBroadcastTimer(),
+        nextBcastWait
+      );
     }
   }
 
   _query(name) {
     DEBUG && debug('query("' + name + '")');
     let packet = new DNSPacket();
     packet.setFlag("QR", DNS_QUERY_RESPONSE_CODES.QUERY);
 
     // PTR Record
-    packet.addRecord("QD", new DNSRecord({
-      name,
-      recordType: DNS_RECORD_TYPES.PTR,
-      classCode: DNS_CLASS_CODES.IN,
-      cacheFlush: true,
-    }));
+    packet.addRecord(
+      "QD",
+      new DNSRecord({
+        name,
+        recordType: DNS_RECORD_TYPES.PTR,
+        classCode: DNS_CLASS_CODES.IN,
+        cacheFlush: true,
+      })
+    );
 
     let data = packet.serialize();
 
     // Initialize the broadcast receiver socket in case it
     // hasn't already been started so we can listen for
     // multicast queries/announcements on all interfaces.
     this._getBroadcastReceiverSocket();
 
-    this._getQuerySocket().then((querySocket) => {
+    this._getQuerySocket().then(querySocket => {
       DEBUG && debug('sending query on query socket ("' + name + '")');
       querySocket.send(MDNS_MULTICAST_GROUP, MDNS_PORT, data);
     });
 
     // Automatically announce previously-discovered
     // services that match and haven't expired yet.
     setTimeout(() => {
-      DEBUG && debug('announcing previously discovered services ("' + name + '")');
+      DEBUG &&
+        debug('announcing previously discovered services ("' + name + '")');
       let { serviceType } = _parseServiceDomainName(name);
 
       this._clearExpiredDiscoveries();
       this._discovered.forEach((discovery, key) => {
         let serviceInfo = discovery.serviceInfo;
         if (serviceInfo.serviceType !== serviceType) {
           return;
         }
 
         let listeners = this._listeners.get(serviceInfo.serviceType) || [];
-        listeners.forEach((listener) => {
+        listeners.forEach(listener => {
           listener.onServiceFound(serviceInfo);
         });
       });
     });
   }
 
   _clearExpiredDiscoveries() {
     this._discovered.forEach((discovery, key) => {
       if (discovery.expireTime < Date.now()) {
         this._discovered.delete(key);
       }
     });
   }
 
   _handleQueryPacket(packet, message) {
-    packet.getRecords(["QD"]).forEach((record) => {
+    packet.getRecords(["QD"]).forEach(record => {
       // Don't respond if the query's class code is not IN or ANY.
-      if (record.classCode !== DNS_CLASS_CODES.IN &&
-          record.classCode !== DNS_CLASS_CODES.ANY) {
+      if (
+        record.classCode !== DNS_CLASS_CODES.IN &&
+        record.classCode !== DNS_CLASS_CODES.ANY
+      ) {
         return;
       }
 
       // Don't respond if the query's record type is not PTR or ANY.
-      if (record.recordType !== DNS_RECORD_TYPES.PTR &&
-          record.recordType !== DNS_RECORD_TYPES.ANY) {
+      if (
+        record.recordType !== DNS_RECORD_TYPES.PTR &&
+        record.recordType !== DNS_RECORD_TYPES.ANY
+      ) {
         return;
       }
 
       for (let [serviceKey, publishedService] of this._services) {
         DEBUG && debug("_handleQueryPacket: " + packet.toJSON());
         if (publishedService.ptrMatch(record.name)) {
           this._respondToQuery(serviceKey, message);
         }
@@ -460,105 +543,120 @@ class MulticastDNS {
   _makeServicePacket(service, addresses) {
     let packet = new DNSPacket();
     packet.setFlag("QR", DNS_QUERY_RESPONSE_CODES.RESPONSE);
     packet.setFlag("AA", DNS_AUTHORITATIVE_ANSWER_CODES.YES);
 
     let host = service.host || _hostname;
 
     // e.g.: foo-bar-service._http._tcp.local
-    let serviceDomainName = service.serviceName + "." + service.serviceType + ".local";
+    let serviceDomainName =
+      service.serviceName + "." + service.serviceType + ".local";
 
     // PTR Record
-    packet.addRecord("AN", new DNSResourceRecord({
-      name: service.serviceType + ".local", // e.g.: _http._tcp.local
-      recordType: DNS_RECORD_TYPES.PTR,
-      data: serviceDomainName,
-    }));
+    packet.addRecord(
+      "AN",
+      new DNSResourceRecord({
+        name: service.serviceType + ".local", // e.g.: _http._tcp.local
+        recordType: DNS_RECORD_TYPES.PTR,
+        data: serviceDomainName,
+      })
+    );
 
     // SRV Record
-    packet.addRecord("AR", new DNSResourceRecord({
-      name: serviceDomainName,
-      recordType: DNS_RECORD_TYPES.SRV,
-      classCode: DNS_CLASS_CODES.IN,
-      cacheFlush: true,
-      data: {
-        priority: 0,
-        weight: 0,
-        port: service.port,
-        target: host, // e.g.: My-Android-Phone.local
-      },
-    }));
+    packet.addRecord(
+      "AR",
+      new DNSResourceRecord({
+        name: serviceDomainName,
+        recordType: DNS_RECORD_TYPES.SRV,
+        classCode: DNS_CLASS_CODES.IN,
+        cacheFlush: true,
+        data: {
+          priority: 0,
+          weight: 0,
+          port: service.port,
+          target: host, // e.g.: My-Android-Phone.local
+        },
+      })
+    );
 
     // A Records
     for (let address of addresses) {
-        packet.addRecord("AR", new DNSResourceRecord({
+      packet.addRecord(
+        "AR",
+        new DNSResourceRecord({
           name: host,
           recordType: DNS_RECORD_TYPES.A,
           data: address,
-        }));
+        })
+      );
     }
 
     // TXT Record
-    packet.addRecord("AR", new DNSResourceRecord({
-      name: serviceDomainName,
-      recordType: DNS_RECORD_TYPES.TXT,
-      classCode: DNS_CLASS_CODES.IN,
-      cacheFlush: true,
-      data: service.serviceAttrs || {},
-    }));
+    packet.addRecord(
+      "AR",
+      new DNSResourceRecord({
+        name: serviceDomainName,
+        recordType: DNS_RECORD_TYPES.TXT,
+        classCode: DNS_CLASS_CODES.IN,
+        cacheFlush: true,
+        data: service.serviceAttrs || {},
+      })
+    );
 
     return packet;
   }
 
   _handleResponsePacket(packet, message) {
     let services = {};
     let hosts = {};
 
     let srvRecords = packet.getRecords(["AN", "AR"], DNS_RECORD_TYPES.SRV);
     let txtRecords = packet.getRecords(["AN", "AR"], DNS_RECORD_TYPES.TXT);
     let ptrRecords = packet.getRecords(["AN", "AR"], DNS_RECORD_TYPES.PTR);
     let aRecords = packet.getRecords(["AN", "AR"], DNS_RECORD_TYPES.A);
 
-    srvRecords.forEach((record) => {
+    srvRecords.forEach(record => {
       let data = record.data || {};
 
       services[record.name] = {
         host: data.target,
         port: data.port,
         ttl: record.ttl,
       };
     });
 
-    txtRecords.forEach((record) => {
+    txtRecords.forEach(record => {
       if (!services[record.name]) {
         return;
       }
 
       services[record.name].attributes = record.data;
     });
 
-    aRecords.forEach((record) => {
+    aRecords.forEach(record => {
       if (IsIpv4Address(record.data)) {
         hosts[record.name] = record.data;
       }
     });
 
-    ptrRecords.forEach((record) => {
+    ptrRecords.forEach(record => {
       let name = record.data;
       if (!services[name]) {
         return;
       }
 
-      let {host, port} = services[name];
+      let { host, port } = services[name];
       if (!host || !port) {
         return;
       }
 
-      let { serviceName, serviceType, domainName } = _parseServiceDomainName(name);
+      let { serviceName, serviceType, domainName } = _parseServiceDomainName(
+        name
+      );
       if (!serviceName || !serviceType || !domainName) {
         return;
       }
 
       let address = hosts[host];
       if (!address) {
         return;
       }
@@ -574,37 +672,42 @@ class MulticastDNS {
         attributes: services[name].attributes || {},
       };
 
       this._onServiceFound(serviceInfo, ttl);
     });
   }
 
   _onServiceFound(serviceInfo, ttl = 0) {
-    let expireTime = Date.now() + (ttl * 1000);
-    let key = serviceInfo.serviceName + "." +
-              serviceInfo.serviceType + "." +
-              serviceInfo.domainName + " @" +
-              serviceInfo.address + ":" +
-              serviceInfo.port;
+    let expireTime = Date.now() + ttl * 1000;
+    let key =
+      serviceInfo.serviceName +
+      "." +
+      serviceInfo.serviceType +
+      "." +
+      serviceInfo.domainName +
+      " @" +
+      serviceInfo.address +
+      ":" +
+      serviceInfo.port;
 
     // If this service was already discovered, just update
     // its expiration time and don't re-emit it.
     if (this._discovered.has(key)) {
       this._discovered.get(key).expireTime = expireTime;
       return;
     }
 
     this._discovered.set(key, {
       serviceInfo,
       expireTime,
     });
 
     let listeners = this._listeners.get(serviceInfo.serviceType) || [];
-    listeners.forEach((listener) => {
+    listeners.forEach(listener => {
       listener.onServiceFound(serviceInfo);
     });
 
     DEBUG && debug("_onServiceFound()" + serviceInfo.serviceName);
   }
 
   /**
    * Gets a non-exclusive socket on 0.0.0.0:{random} to send
@@ -631,66 +734,74 @@ class MulticastDNS {
    * for multicast queries/announcements on all interfaces.
    * Since this socket needs to listen for multicast queries
    * and announcements, this socket joins the multicast
    * group on *all* interfaces (0.0.0.0).
    */
   _getBroadcastReceiverSocket() {
     return new Promise((resolve, reject) => {
       if (!this._broadcastReceiverSocket) {
-        this._broadcastReceiverSocket = _openSocket("0.0.0.0", MDNS_PORT, {
-          onPacketReceived: this._onPacketReceived.bind(this),
-          onStopListening: this._onStopListening.bind(this),
-        }, /* multicastInterface = */ "0.0.0.0");
+        this._broadcastReceiverSocket = _openSocket(
+          "0.0.0.0",
+          MDNS_PORT,
+          {
+            onPacketReceived: this._onPacketReceived.bind(this),
+            onStopListening: this._onStopListening.bind(this),
+          },
+          /* multicastInterface = */ "0.0.0.0"
+        );
       }
       resolve(this._broadcastReceiverSocket);
     });
   }
 
   /**
    * Gets a non-exclusive socket for each interface on
    * {iface-ip}:5353 for sending query responses as
    * well as for listening for unicast queries. These
    * sockets do not need to join a multicast group
    * since they are still able to *send* multicast
    * query responses, but they do not need to *listen*
    * for multicast queries since the `_querySocket` is
    * already handling them.
    */
   _getSockets() {
-    return new Promise((resolve) => {
+    return new Promise(resolve => {
       if (this._sockets.size > 0) {
         resolve(this._sockets);
         return;
       }
 
       Promise.all([getAddresses(), getHostname()]).then(() => {
-        _addresses.forEach((address) => {
+        _addresses.forEach(address => {
           let socket = _openSocket(address, MDNS_PORT, null);
           this._sockets.set(address, socket);
         });
 
         resolve(this._sockets);
       });
     });
   }
 
   _checkCloseSockets() {
     // Nothing to do if no sockets to close.
-    if (this._sockets.size == 0)
+    if (this._sockets.size == 0) {
       return;
+    }
 
     // Don't close sockets if discovery listeners are still present.
-    if (this._listeners.size > 0)
+    if (this._listeners.size > 0) {
       return;
+    }
 
     // Don't close sockets if advertised services are present.
     // Since we need to listen for service queries and respond to them.
-    if (this._services.size > 0)
+    if (this._services.size > 0) {
       return;
+    }
 
     this._closeSockets();
   }
 
   _closeSockets() {
     this._sockets.forEach(socket => socket.close());
     this._sockets.clear();
   }
@@ -752,20 +863,22 @@ function getAddresses() {
   return new Promise((resolve, reject) => {
     if (_addresses) {
       resolve(_addresses);
       return;
     }
 
     networkInfoService.listNetworkAddresses({
       onListedNetworkAddresses(aAddressArray) {
-        _addresses = aAddressArray.filter((address) => {
-          return !address.includes("%p2p") && // No WiFi Direct interfaces
-                 !address.includes(":") && // XXX: No IPv6 for now
-                 address != "127.0.0.1"; // No ipv4 loopback addresses.
+        _addresses = aAddressArray.filter(address => {
+          return (
+            !address.includes("%p2p") && // No WiFi Direct interfaces
+            !address.includes(":") && // XXX: No IPv6 for now
+            address != "127.0.0.1"
+          ); // No ipv4 loopback addresses.
         });
 
         DEBUG && debug("getAddresses(): " + _addresses);
         resolve(_addresses);
       },
 
       onListNetworkAddressesFailed() {
         DEBUG && debug("getAddresses() FAILED!");
@@ -776,17 +889,17 @@ function getAddresses() {
 }
 
 let _hostname;
 
 /**
  * @private
  */
 function getHostname() {
-  return new Promise((resolve) => {
+  return new Promise(resolve => {
     if (_hostname) {
       resolve(_hostname);
       return;
     }
 
     networkInfoService.getHostname({
       onGotHostname(aHostname) {
         _hostname = aHostname.replace(/\s/g, "-") + ".local";
@@ -843,18 +956,25 @@ function _propertyBagToObject(propBag) {
   }
   return result;
 }
 
 /**
  * @private
  */
 function _openSocket(addr, port, handler, multicastInterface) {
-  let socket = Cc["@mozilla.org/network/udp-socket;1"].createInstance(Ci.nsIUDPSocket);
-  socket.init2(addr, port, Services.scriptSecurityManager.getSystemPrincipal(), true);
+  let socket = Cc["@mozilla.org/network/udp-socket;1"].createInstance(
+    Ci.nsIUDPSocket
+  );
+  socket.init2(
+    addr,
+    port,
+    Services.scriptSecurityManager.getSystemPrincipal(),
+    true
+  );
 
   if (handler) {
     socket.asyncListen({
       onPacketReceived: handler.onPacketReceived,
       onStopListening: handler.onStopListening,
     });
   }
 
--- a/netwerk/protocol/http/UAOverridesBootstrapper.jsm
+++ b/netwerk/protocol/http/UAOverridesBootstrapper.jsm
@@ -1,16 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-const {UserAgentOverrides} = ChromeUtils.import("resource://gre/modules/UserAgentOverrides.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { UserAgentOverrides } = ChromeUtils.import(
+  "resource://gre/modules/UserAgentOverrides.jsm"
+);
 
 function UAOverridesBootstrapper() {
   this.init();
 }
 
 UAOverridesBootstrapper.prototype = {
   init: function uaob_init() {
     Services.obs.addObserver(this, "profile-change-net-teardown");
--- a/netwerk/protocol/http/UserAgentOverrides.jsm
+++ b/netwerk/protocol/http/UserAgentOverrides.jsm
@@ -1,64 +1,76 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-var EXPORTED_SYMBOLS = [ "UserAgentOverrides" ];
+var EXPORTED_SYMBOLS = ["UserAgentOverrides"];
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-const {UserAgentUpdates} = ChromeUtils.import("resource://gre/modules/UserAgentUpdates.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { UserAgentUpdates } = ChromeUtils.import(
+  "resource://gre/modules/UserAgentUpdates.jsm"
+);
 
 const PREF_OVERRIDES_ENABLED = "general.useragent.site_specific_overrides";
 const MAX_OVERRIDE_FOR_HOST_CACHE_SIZE = 250;
 
 // lazy load nsHttpHandler to improve startup performance.
 XPCOMUtils.defineLazyGetter(this, "DEFAULT_UA", function() {
-  return Cc["@mozilla.org/network/protocol;1?name=http"]
-           .getService(Ci.nsIHttpProtocolHandler)
-           .userAgent;
+  return Cc["@mozilla.org/network/protocol;1?name=http"].getService(
+    Ci.nsIHttpProtocolHandler
+  ).userAgent;
 });
 
 var gPrefBranch;
-var gOverrides = new Map;
+var gOverrides = new Map();
 var gUpdatedOverrides;
-var gOverrideForHostCache = new Map;
+var gOverrideForHostCache = new Map();
 var gInitialized = false;
 var gOverrideFunctions = [
-  function(aHttpChannel) { return UserAgentOverrides.getOverrideForURI(aHttpChannel.URI); },
+  function(aHttpChannel) {
+    return UserAgentOverrides.getOverrideForURI(aHttpChannel.URI);
+  },
 ];
-var gBuiltUAs = new Map;
+var gBuiltUAs = new Map();
 
 var UserAgentOverrides = {
   init: function uao_init() {
-    if (gInitialized)
+    if (gInitialized) {
       return;
+    }
 
     gPrefBranch = Services.prefs.getBranch("general.useragent.override.");
     gPrefBranch.addObserver("", buildOverrides);
 
     Services.prefs.addObserver(PREF_OVERRIDES_ENABLED, buildOverrides);
 
     try {
-      Services.obs.addObserver(HTTP_on_useragent_request, "http-on-useragent-request");
+      Services.obs.addObserver(
+        HTTP_on_useragent_request,
+        "http-on-useragent-request"
+      );
     } catch (x) {
       // The http-on-useragent-request notification is disallowed in content processes.
     }
 
     try {
       UserAgentUpdates.init(function(overrides) {
         gOverrideForHostCache.clear();
         if (overrides) {
           for (let domain in overrides) {
             overrides[domain] = getUserAgentFromOverride(overrides[domain]);
           }
-          overrides.get = function(key) { return this[key]; };
+          overrides.get = function(key) {
+            return this[key];
+          };
         }
         gUpdatedOverrides = overrides;
       });
 
       buildOverrides();
     } catch (e) {
       // UserAgentOverrides is initialized before profile is ready.
       // UA override might not work correctly.
@@ -70,62 +82,66 @@ var UserAgentOverrides = {
 
   addComplexOverride: function uao_addComplexOverride(callback) {
     // Add to front of array so complex overrides have precedence
     gOverrideFunctions.unshift(callback);
   },
 
   getOverrideForURI: function uao_getOverrideForURI(aURI) {
     let host = aURI.asciiHost;
-    if (!gInitialized ||
-        (!gOverrides.size && !gUpdatedOverrides) ||
-        !(host)) {
+    if (!gInitialized || (!gOverrides.size && !gUpdatedOverrides) || !host) {
       return null;
     }
 
     let override = gOverrideForHostCache.get(host);
-    if (override !== undefined)
+    if (override !== undefined) {
       return override;
+    }
 
     function findOverride(overrides) {
       let searchHost = host;
       let userAgent = overrides.get(searchHost);
 
       while (!userAgent) {
         let dot = searchHost.indexOf(".");
         if (dot === -1) {
           return null;
         }
         searchHost = searchHost.slice(dot + 1);
         userAgent = overrides.get(searchHost);
       }
       return userAgent;
     }
 
-    override = (gOverrides.size && findOverride(gOverrides))
-            || (gUpdatedOverrides && findOverride(gUpdatedOverrides));
+    override =
+      (gOverrides.size && findOverride(gOverrides)) ||
+      (gUpdatedOverrides && findOverride(gUpdatedOverrides));
 
     if (gOverrideForHostCache.size >= MAX_OVERRIDE_FOR_HOST_CACHE_SIZE) {
       gOverrideForHostCache.clear();
     }
     gOverrideForHostCache.set(host, override);
 
     return override;
   },
 
   uninit: function uao_uninit() {
-    if (!gInitialized)
+    if (!gInitialized) {
       return;
+    }
     gInitialized = false;
 
     gPrefBranch.removeObserver("", buildOverrides);
 
     Services.prefs.removeObserver(PREF_OVERRIDES_ENABLED, buildOverrides);
 
-    Services.obs.removeObserver(HTTP_on_useragent_request, "http-on-useragent-request");
+    Services.obs.removeObserver(
+      HTTP_on_useragent_request,
+      "http-on-useragent-request"
+    );
   },
 };
 
 function getUserAgentFromOverride(override) {
   let userAgent = gBuiltUAs.get(override);
   if (userAgent !== undefined) {
     return userAgent;
   }
@@ -138,18 +154,19 @@ function getUserAgentFromOverride(overri
   gBuiltUAs.set(override, userAgent);
   return userAgent;
 }
 
 function buildOverrides() {
   gOverrides.clear();
   gOverrideForHostCache.clear();
 
-  if (!Services.prefs.getBoolPref(PREF_OVERRIDES_ENABLED))
+  if (!Services.prefs.getBoolPref(PREF_OVERRIDES_ENABLED)) {
     return;
+  }
 
   let domains = gPrefBranch.getChildList("");
 
   for (let domain of domains) {
     let override = gPrefBranch.getCharPref(domain);
     let userAgent = getUserAgentFromOverride(override);
 
     if (userAgent != DEFAULT_UA) {
--- a/netwerk/protocol/http/UserAgentUpdates.jsm
+++ b/netwerk/protocol/http/UserAgentUpdates.jsm
@@ -1,45 +1,60 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["UserAgentUpdates"];
 
-const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { AppConstants } = ChromeUtils.import(
+  "resource://gre/modules/AppConstants.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 
 XPCOMUtils.defineLazyGlobalGetters(this, ["XMLHttpRequest"]);
 
 ChromeUtils.defineModuleGetter(
-  this, "FileUtils", "resource://gre/modules/FileUtils.jsm");
+  this,
+  "FileUtils",
+  "resource://gre/modules/FileUtils.jsm"
+);
 
 ChromeUtils.defineModuleGetter(
-  this, "NetUtil", "resource://gre/modules/NetUtil.jsm");
+  this,
+  "NetUtil",
+  "resource://gre/modules/NetUtil.jsm"
+);
 
-ChromeUtils.defineModuleGetter(
-  this, "OS", "resource://gre/modules/osfile.jsm");
-
+ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
 
 ChromeUtils.defineModuleGetter(
-  this, "UpdateUtils", "resource://gre/modules/UpdateUtils.jsm");
+  this,
+  "UpdateUtils",
+  "resource://gre/modules/UpdateUtils.jsm"
+);
 
 XPCOMUtils.defineLazyServiceGetter(
-  this, "gUpdateTimer", "@mozilla.org/updates/timer-manager;1", "nsIUpdateTimerManager");
-
-XPCOMUtils.defineLazyGetter(this, "gDecoder",
-  function() { return new TextDecoder(); }
+  this,
+  "gUpdateTimer",
+  "@mozilla.org/updates/timer-manager;1",
+  "nsIUpdateTimerManager"
 );
 
-XPCOMUtils.defineLazyGetter(this, "gEncoder",
-  function() { return new TextEncoder(); }
-);
+XPCOMUtils.defineLazyGetter(this, "gDecoder", function() {
+  return new TextDecoder();
+});
+
+XPCOMUtils.defineLazyGetter(this, "gEncoder", function() {
+  return new TextEncoder();
+});
 
 const TIMER_ID = "user-agent-updates-timer";
 
 const PREF_UPDATES = "general.useragent.updates.";
 const PREF_UPDATES_ENABLED = PREF_UPDATES + "enabled";
 const PREF_UPDATES_URL = PREF_UPDATES + "url";
 const PREF_UPDATES_INTERVAL = PREF_UPDATES + "interval";
 const PREF_UPDATES_RETRY = PREF_UPDATES + "retry";
@@ -53,33 +68,44 @@ const FILE_UPDATES = "ua-update.json";
 const PREF_APP_DISTRIBUTION = "distribution.id";
 const PREF_APP_DISTRIBUTION_VERSION = "distribution.version";
 
 var gInitialized = false;
 
 function readChannel(url) {
   return new Promise((resolve, reject) => {
     try {
-      let channel = NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true});
+      let channel = NetUtil.newChannel({
+        uri: url,
+        loadUsingSystemPrincipal: true,
+      });
       channel.contentType = "application/json";
 
       NetUtil.asyncFetch(channel, (inputStream, status) => {
         if (!Components.isSuccessCode(status)) {
           reject();
           return;
         }
 
         let data = JSON.parse(
           NetUtil.readInputStreamToString(inputStream, inputStream.available())
         );
         resolve(data);
       });
     } catch (ex) {
-      reject(new Error("UserAgentUpdates: Could not fetch " + url + " " +
-                       ex + "\n" + ex.stack));
+      reject(
+        new Error(
+          "UserAgentUpdates: Could not fetch " +
+            url +
+            " " +
+            ex +
+            "\n" +
+            ex.stack
+        )
+      );
     }
   });
 }
 
 var UserAgentUpdates = {
   init(callback) {
     if (gInitialized) {
       return;
@@ -114,82 +140,109 @@ var UserAgentUpdates = {
     if (!this._getPref(PREF_UPDATES_ENABLED, false)) {
       // remove previous overrides
       this._applyUpdate(null);
       return;
     }
     // try loading from profile dir, then from app dir
     let dirs = [KEY_PREFDIR, KEY_APPDIR];
 
-    dirs.reduce((prevLoad, dir) => {
-      let file = FileUtils.getFile(dir, [FILE_UPDATES], true).path;
-      // tryNext returns promise to read file under dir and parse it
-      let tryNext = () => OS.File.read(file).then(
-        (bytes) => {
-          let update = JSON.parse(gDecoder.decode(bytes));
-          if (!update) {
-            throw new Error("invalid update");
-          }
-          return update;
+    dirs
+      .reduce((prevLoad, dir) => {
+        let file = FileUtils.getFile(dir, [FILE_UPDATES], true).path;
+        // tryNext returns promise to read file under dir and parse it
+        let tryNext = () =>
+          OS.File.read(file).then(bytes => {
+            let update = JSON.parse(gDecoder.decode(bytes));
+            if (!update) {
+              throw new Error("invalid update");
+            }
+            return update;
+          });
+        // try to load next one if the previous load failed
+        return prevLoad ? prevLoad.catch(tryNext) : tryNext();
+      }, null)
+      .catch(ex => {
+        if (AppConstants.platform !== "android") {
+          // All previous (non-Android) load attempts have failed, so we bail.
+          throw new Error(
+            "UserAgentUpdates: Failed to load " +
+              FILE_UPDATES +
+              ex +
+              "\n" +
+              ex.stack
+          );
         }
-      );
-      // try to load next one if the previous load failed
-      return prevLoad ? prevLoad.catch(tryNext) : tryNext();
-    }, null).catch((ex) => {
-      if (AppConstants.platform !== "android") {
-        // All previous (non-Android) load attempts have failed, so we bail.
-        throw new Error("UserAgentUpdates: Failed to load " + FILE_UPDATES +
-                         ex + "\n" + ex.stack);
-      }
-      // Make one last attempt to read from the Fennec APK root.
-      return readChannel("resource://android/" + FILE_UPDATES);
-    }).then((update) => {
-      // Apply update if loading was successful
-      this._applyUpdate(update);
-    }).catch(Cu.reportError);
+        // Make one last attempt to read from the Fennec APK root.
+        return readChannel("resource://android/" + FILE_UPDATES);
+      })
+      .then(update => {
+        // Apply update if loading was successful
+        this._applyUpdate(update);
+      })
+      .catch(Cu.reportError);
     this._scheduleUpdate();
   },
 
   _saveToFile(update) {
     let file = FileUtils.getFile(KEY_PREFDIR, [FILE_UPDATES], true);
     let path = file.path;
     let bytes = gEncoder.encode(JSON.stringify(update));
-    OS.File.writeAtomic(path, bytes, {tmpPath: path + ".tmp"}).then(
-      () => {
-        this._lastUpdated = Date.now();
-        Services.prefs.setCharPref(
-          PREF_UPDATES_LASTUPDATED, this._lastUpdated.toString());
-      },
-      Cu.reportError
-    );
+    OS.File.writeAtomic(path, bytes, { tmpPath: path + ".tmp" }).then(() => {
+      this._lastUpdated = Date.now();
+      Services.prefs.setCharPref(
+        PREF_UPDATES_LASTUPDATED,
+        this._lastUpdated.toString()
+      );
+    }, Cu.reportError);
   },
 
   _getPref(name, def) {
     try {
       switch (typeof def) {
-        case "number": return Services.prefs.getIntPref(name);
-        case "boolean": return Services.prefs.getBoolPref(name);
+        case "number":
+          return Services.prefs.getIntPref(name);
+        case "boolean":
+          return Services.prefs.getBoolPref(name);
       }
       return Services.prefs.getCharPref(name);
     } catch (e) {
       return def;
     }
   },
 
   _getParameters() {
     return {
-      "%DATE%": function() { return Date.now().toString(); },
-      "%PRODUCT%": function() { return Services.appinfo.name; },
-      "%APP_ID%": function() { return Services.appinfo.ID; },
-      "%APP_VERSION%": function() { return Services.appinfo.version; },
-      "%BUILD_ID%": function() { return Services.appinfo.appBuildID; },
-      "%OS%": function() { return Services.appinfo.OS; },
-      "%CHANNEL%": function() { return UpdateUtils.UpdateChannel; },
-      "%DISTRIBUTION%": function() { return this._getPref(PREF_APP_DISTRIBUTION, ""); },
-      "%DISTRIBUTION_VERSION%": function() { return this._getPref(PREF_APP_DISTRIBUTION_VERSION, ""); },
+      "%DATE%": function() {
+        return Date.now().toString();
+      },
+      "%PRODUCT%": function() {
+        return Services.appinfo.name;
+      },
+      "%APP_ID%": function() {
+        return Services.appinfo.ID;
+      },
+      "%APP_VERSION%": function() {
+        return Services.appinfo.version;
+      },
+      "%BUILD_ID%": function() {
+        return Services.appinfo.appBuildID;
+      },
+      "%OS%": function() {
+        return Services.appinfo.OS;
+      },
+      "%CHANNEL%": function() {
+        return UpdateUtils.UpdateChannel;
+      },
+      "%DISTRIBUTION%": function() {
+        return this._getPref(PREF_APP_DISTRIBUTION, "");
+      },
+      "%DISTRIBUTION_VERSION%": function() {
+        return this._getPref(PREF_APP_DISTRIBUTION_VERSION, "");
+      },
     };
   },
 
   _getUpdateURL() {
     let url = this._getPref(PREF_UPDATES_URL, "");
     let params = this._getParameters();
     return url.replace(/%[A-Z_]+%/g, function(match) {
       let param = params[match];
@@ -211,31 +264,38 @@ var UserAgentUpdates = {
       response ? success(response) : error();
     });
     request.addEventListener("error", error);
     request.send();
   },
 
   _update() {
     let url = this._getUpdateURL();
-    url && this._fetchUpdate(url,
-      response => { // success
-        // apply update and save overrides to profile
-        this._applyUpdate(response);
-        this._saveToFile(response);
-        this._scheduleUpdate(); // cancel any retries
-      },
-      response => { // error
-        this._scheduleUpdate(true /* retry */);
-      });
+    url &&
+      this._fetchUpdate(
+        url,
+        response => {
+          // success
+          // apply update and save overrides to profile
+          this._applyUpdate(response);
+          this._saveToFile(response);
+          this._scheduleUpdate(); // cancel any retries
+        },
+        response => {
+          // error
+          this._scheduleUpdate(true /* retry */);
+        }
+      );
   },
 
   _scheduleUpdate(retry) {
     // only schedule updates in the main process
-    if (Services.appinfo.processType !== Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) {
+    if (
+      Services.appinfo.processType !== Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT
+    ) {
       return;
     }
     let interval = this._getPref(PREF_UPDATES_INTERVAL, 604800 /* 1 week */);
     if (retry) {
       interval = this._getPref(PREF_UPDATES_RETRY, interval);
     }
     gUpdateTimer.registerTimer(TIMER_ID, this, Math.max(1, interval));
   },
@@ -252,23 +312,22 @@ var UserAgentUpdates = {
       case "nsPref:changed":
         if (data === PREF_UPDATES_ENABLED) {
           this._applySavedUpdate();
         } else if (data === PREF_UPDATES_INTERVAL) {
           this._scheduleUpdate();
         } else if (data === PREF_UPDATES_LASTUPDATED) {
           // reload from file if there has been an update
           let lastUpdated = parseInt(
-            this._getPref(PREF_UPDATES_LASTUPDATED, "0"), 0);
+            this._getPref(PREF_UPDATES_LASTUPDATED, "0"),
+            0
+          );
           if (lastUpdated > this._lastUpdated) {
             this._applySavedUpdate();
             this._lastUpdated = lastUpdated;
           }
         }
         break;
     }
   },
 
-  QueryInterface: ChromeUtils.generateQI([
-    Ci.nsIObserver,
-    Ci.nsITimerCallback,
-  ]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver, Ci.nsITimerCallback]),
 };
--- a/netwerk/protocol/http/WellKnownOpportunisticUtils.jsm
+++ b/netwerk/protocol/http/WellKnownOpportunisticUtils.jsm
@@ -1,12 +1,12 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* 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/. */
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 function WellKnownOpportunisticUtils() {
   this.valid = false;
   this.mixed = false;
   this.lifetime = 0;
 }
--- a/netwerk/test/browser/browser_NetUtil.js
+++ b/netwerk/test/browser/browser_NetUtil.js
@@ -9,78 +9,103 @@ function test() {
   // We overload this test to include verifying that httpd.js is
   // importable as a testing-only JS module.
   ChromeUtils.import("resource://testing-common/httpd.js", {});
 
   nextTest();
 }
 
 function nextTest() {
-  if (tests.length)
+  if (tests.length) {
     executeSoon(tests.shift());
-  else
+  } else {
     executeSoon(finish);
+  }
 }
 
-var tests = [
-  test_asyncFetchBadCert,
-];
+var tests = [test_asyncFetchBadCert];
 
 function test_asyncFetchBadCert() {
   // Try a load from an untrusted cert, with errors supressed
-  NetUtil.asyncFetch({
-    uri: "https://untrusted.example.com",
-    loadUsingSystemPrincipal: true
-  }, function (aInputStream, aStatusCode, aRequest) {
-    ok(!Components.isSuccessCode(aStatusCode), "request failed");
-    ok(aRequest instanceof Ci.nsIHttpChannel, "request is an nsIHttpChannel");
-
-    // Now try again with a channel whose notificationCallbacks doesn't suprress errors
-    let channel = NetUtil.newChannel({
+  NetUtil.asyncFetch(
+    {
       uri: "https://untrusted.example.com",
-      loadUsingSystemPrincipal: true});
-    channel.notificationCallbacks = {
-      QueryInterface: ChromeUtils.generateQI([Ci.nsIProgressEventSink,
-                                              Ci.nsIInterfaceRequestor]),
-      getInterface (aIID) { return this.QueryInterface(aIID); },
-      onProgress () {},
-      onStatus () {}
-    };
-    NetUtil.asyncFetch(channel, function (aInputStream, aStatusCode, aRequest) {
+      loadUsingSystemPrincipal: true,
+    },
+    function(aInputStream, aStatusCode, aRequest) {
       ok(!Components.isSuccessCode(aStatusCode), "request failed");
       ok(aRequest instanceof Ci.nsIHttpChannel, "request is an nsIHttpChannel");
 
-      // Now try a valid request
-      NetUtil.asyncFetch({
-        uri: "https://example.com",
-        loadUsingSystemPrincipal: true
-      }, function (aInputStream, aStatusCode, aRequest) {
-        info("aStatusCode for valid request: " + aStatusCode);
-        ok(Components.isSuccessCode(aStatusCode), "request succeeded");
-        ok(aRequest instanceof Ci.nsIHttpChannel, "request is an nsIHttpChannel");
-        ok(aRequest.requestSucceeded, "HTTP request succeeded");
+      // Now try again with a channel whose notificationCallbacks doesn't suprress errors
+      let channel = NetUtil.newChannel({
+        uri: "https://untrusted.example.com",
+        loadUsingSystemPrincipal: true,
+      });
+      channel.notificationCallbacks = {
+        QueryInterface: ChromeUtils.generateQI([
+          Ci.nsIProgressEventSink,
+          Ci.nsIInterfaceRequestor,
+        ]),
+        getInterface(aIID) {
+          return this.QueryInterface(aIID);
+        },
+        onProgress() {},
+        onStatus() {},
+      };
+      NetUtil.asyncFetch(channel, function(
+        aInputStream,
+        aStatusCode,
+        aRequest
+      ) {
+        ok(!Components.isSuccessCode(aStatusCode), "request failed");
+        ok(
+          aRequest instanceof Ci.nsIHttpChannel,
+          "request is an nsIHttpChannel"
+        );
 
-        nextTest();
+        // Now try a valid request
+        NetUtil.asyncFetch(
+          {
+            uri: "https://example.com",
+            loadUsingSystemPrincipal: true,
+          },
+          function(aInputStream, aStatusCode, aRequest) {
+            info("aStatusCode for valid request: " + aStatusCode);
+            ok(Components.isSuccessCode(aStatusCode), "request succeeded");
+            ok(
+              aRequest instanceof Ci.nsIHttpChannel,
+              "request is an nsIHttpChannel"
+            );
+            ok(aRequest.requestSucceeded, "HTTP request succeeded");
+
+            nextTest();
+          }
+        );
       });
-    });
-  });
+    }
+  );
 }
 
 function WindowListener(aURL, aCallback) {
   this.callback = aCallback;
   this.url = aURL;
 }
 WindowListener.prototype = {
   onOpenWindow(aXULWindow) {
     var domwindow = aXULWindow.docShell.domWindow;
     var self = this;
-    domwindow.addEventListener("load", function() {
-      if (domwindow.document.location.href != self.url)
-        return;
+    domwindow.addEventListener(
+      "load",
+      function() {
+        if (domwindow.document.location.href != self.url) {
+          return;
+        }
 
-      // Allow other window load listeners to execute before passing to callback
-      executeSoon(function() {
-        self.callback(domwindow);
-      });
-    }, {once: true});
+        // Allow other window load listeners to execute before passing to callback
+        executeSoon(function() {
+          self.callback(domwindow);
+        });
+      },
+      { once: true }
+    );
   },
   onCloseWindow(aXULWindow) {},
-}
+};
--- a/netwerk/test/browser/browser_about_cache.js
+++ b/netwerk/test/browser/browser_about_cache.js
@@ -1,71 +1,120 @@
 "use strict";
 
 /**
  * Open a dummy page, then open about:cache and verify the opened page shows up in the cache.
  */
 add_task(async function() {
-  const kRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/",
-                                                    "https://example.com/");
+  const kRoot = getRootDirectory(gTestPath).replace(
+    "chrome://mochitests/content/",
+    "https://example.com/"
+  );
   const kTestPage = kRoot + "dummy.html";
   // Open the dummy page to get it cached.
-  let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, kTestPage, true);
+  let tab = await BrowserTestUtils.openNewForegroundTab(
+    gBrowser,
+    kTestPage,
+    true
+  );
   BrowserTestUtils.removeTab(tab);
 
-  tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "about:cache", true);
+  tab = await BrowserTestUtils.openNewForegroundTab(
+    gBrowser,
+    "about:cache",
+    true
+  );
   let expectedPageCheck = function(uri) {
     info("Saw load for " + uri);
     // Can't easily use searchParms and new URL() because it's an about: URI...
     return uri.startsWith("about:cache?") && uri.includes("storage=disk");
   };
-  let diskPageLoaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, expectedPageCheck);
+  let diskPageLoaded = BrowserTestUtils.browserLoaded(
+    tab.linkedBrowser,
+    false,
+    expectedPageCheck
+  );
   await ContentTask.spawn(tab.linkedBrowser, null, function() {
-    ok(!content.document.nodePrincipal.isSystemPrincipal,
-       "about:cache should not have system principal");
+    ok(
+      !content.document.nodePrincipal.isSystemPrincipal,
+      "about:cache should not have system principal"
+    );
     let principalURI = content.document.nodePrincipal.URI;
     let channel = content.docShell.currentDocumentChannel;
     ok(!channel.loadInfo.loadingPrincipal, "Loading principal should be null.");
-    is(principalURI && principalURI.spec, content.document.location.href, "Principal matches location");
-    let links = [... content.document.querySelectorAll("a[href*=disk]")];
+    is(
+      principalURI && principalURI.spec,
+      content.document.location.href,
+      "Principal matches location"
+    );
+    let links = [...content.document.querySelectorAll("a[href*=disk]")];
     is(links.length, 1, "Should have 1 link to the disk entries");
     links[0].click();
   });
   await diskPageLoaded;
   info("about:cache disk subpage loaded");
 
   expectedPageCheck = function(uri) {
     info("Saw load for " + uri);
     return uri.startsWith("about:cache-entry") && uri.includes("dummy.html");
   };
   let triggeringURISpec = tab.linkedBrowser.currentURI.spec;
-  let entryLoaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, expectedPageCheck);
+  let entryLoaded = BrowserTestUtils.browserLoaded(
+    tab.linkedBrowser,
+    false,
+    expectedPageCheck
+  );
   await ContentTask.spawn(tab.linkedBrowser, kTestPage, function(kTestPage) {
-    ok(!content.document.nodePrincipal.isSystemPrincipal,
-       "about:cache with query params should still not have system principal");
+    ok(
+      !content.document.nodePrincipal.isSystemPrincipal,
+      "about:cache with query params should still not have system principal"
+    );
     let principalURI = content.document.nodePrincipal.URI;
-    is(principalURI && principalURI.spec, content.document.location.href, "Principal matches location");
+    is(
+      principalURI && principalURI.spec,
+      content.document.location.href,
+      "Principal matches location"
+    );
     let channel = content.docShell.currentDocumentChannel;
     principalURI = channel.loadInfo.triggeringPrincipal.URI;
-    is(principalURI && principalURI.spec, "about:cache", "Triggering principal matches previous location");
+    is(
+      principalURI && principalURI.spec,
+      "about:cache",
+      "Triggering principal matches previous location"
+    );
     ok(!channel.loadInfo.loadingPrincipal, "Loading principal should be null.");
-    let links = [... content.document.querySelectorAll("a[href*='" + kTestPage + "']")];
+    let links = [
+      ...content.document.querySelectorAll("a[href*='" + kTestPage + "']"),
+    ];
     is(links.length, 1, "Should have 1 link to the entry for " + kTestPage);
     links[0].click();
   });
   await entryLoaded;
   info("about:cache entry loaded");
 
-
-  await ContentTask.spawn(tab.linkedBrowser, triggeringURISpec, function(triggeringURISpec) {
-    ok(!content.document.nodePrincipal.isSystemPrincipal,
-       "about:cache-entry should also not have system principal");
+  await ContentTask.spawn(tab.linkedBrowser, triggeringURISpec, function(
+    triggeringURISpec
+  ) {
+    ok(
+      !content.document.nodePrincipal.isSystemPrincipal,
+      "about:cache-entry should also not have system principal"
+    );
     let principalURI = content.document.nodePrincipal.URI;
-    is(principalURI && principalURI.spec, content.document.location.href, "Principal matches location");
+    is(
+      principalURI && principalURI.spec,
+      content.document.location.href,
+      "Principal matches location"
+    );
     let channel = content.docShell.currentDocumentChannel;
     principalURI = channel.loadInfo.triggeringPrincipal.URI;
-    is(principalURI && principalURI.spec, triggeringURISpec, "Triggering principal matches previous location");
+    is(
+      principalURI && principalURI.spec,
+      triggeringURISpec,
+      "Triggering principal matches previous location"
+    );
     ok(!channel.loadInfo.loadingPrincipal, "Loading principal should be null.");
-    ok(content.document.querySelectorAll("th").length,
-       "Should have several table headers with data.");
+    ok(
+      content.document.querySelectorAll("th").length,
+      "Should have several table headers with data."
+    );
   });
   BrowserTestUtils.removeTab(tab);
 });
--- a/netwerk/test/browser/browser_bug1535877.js
+++ b/netwerk/test/browser/browser_bug1535877.js
@@ -1,11 +1,15 @@
 "use strict";
 
 add_task(_ => {
   try {
-    Cc["@mozilla.org/network/effective-tld-service;1"]
-      .createInstance(Ci.nsISupports);
+    Cc["@mozilla.org/network/effective-tld-service;1"].createInstance(
+      Ci.nsISupports
+    );
   } catch (e) {
-    is(e.result, Cr.NS_ERROR_XPC_CI_RETURNED_FAILURE,
-       "Component creation as an instance fails with expected code");
+    is(
+      e.result,
+      Cr.NS_ERROR_XPC_CI_RETURNED_FAILURE,
+      "Component creation as an instance fails with expected code"
+    );
   }
 });
--- a/netwerk/test/browser/browser_child_resource.js
+++ b/netwerk/test/browser/browser_child_resource.js
@@ -3,125 +3,156 @@ Any copyright is dedicated to the Public
 http://creativecommons.org/publicdomain/zero/1.0/
 */
 
 // This must be loaded in the remote process for this test to be useful
 const TEST_URL = "http://example.com/browser/netwerk/test/browser/dummy.html";
 
 const expectedRemote = gMultiProcessBrowser ? "true" : "";
 
-const resProtocol = Cc["@mozilla.org/network/protocol;1?name=resource"]
-                        .getService(Ci.nsIResProtocolHandler);
+const resProtocol = Cc[
+  "@mozilla.org/network/protocol;1?name=resource"
+].getService(Ci.nsIResProtocolHandler);
 
 function frameScript() {
-  const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-  let resProtocol = Cc["@mozilla.org/network/protocol;1?name=resource"]
-                      .getService(Ci.nsIResProtocolHandler);
+  const { Services } = ChromeUtils.import(
+    "resource://gre/modules/Services.jsm"
+  );
+  let resProtocol = Cc[
+    "@mozilla.org/network/protocol;1?name=resource"
+  ].getService(Ci.nsIResProtocolHandler);
 
   addMessageListener("Test:ResolveURI", function({ data: uri }) {
     uri = Services.io.newURI(uri);
     try {
       let resolved = resProtocol.resolveURI(uri);
       sendAsyncMessage("Test:ResolvedURI", resolved);
-    }
-    catch (e) {
+    } catch (e) {
       sendAsyncMessage("Test:ResolvedURI", null);
     }
   });
 }
 
 function waitForEvent(obj, name, capturing, chromeEvent) {
   info("Waiting for " + name);
-  return new Promise((resolve) => {
+  return new Promise(resolve => {
     function listener(event) {
       info("Saw " + name);
       obj.removeEventListener(name, listener, capturing, chromeEvent);
       resolve(event);
     }
 
     obj.addEventListener(name, listener, capturing, chromeEvent);
   });
 }
 
 function resolveURI(uri) {
   uri = Services.io.newURI(uri);
   try {
     return resProtocol.resolveURI(uri);
-  }
-  catch (e) {
+  } catch (e) {
     return null;
   }
 }
 
 function remoteResolveURI(uri) {
-  return new Promise((resolve) => {
+  return new Promise(resolve => {
     let manager = gBrowser.selectedBrowser.messageManager;
 
     function listener({ data: resolved }) {
       manager.removeMessageListener("Test:ResolvedURI", listener);
       resolve(resolved);
     }
 
     manager.addMessageListener("Test:ResolvedURI", listener);
     manager.sendAsyncMessage("Test:ResolveURI", uri);
   });
 }
 
 var loadTestTab = async function() {
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, TEST_URL);
   let browser = gBrowser.selectedBrowser;
   await BrowserTestUtils.browserLoaded(browser);
-  browser.messageManager.loadFrameScript("data:,(" + frameScript.toString() + ")();", true);
+  browser.messageManager.loadFrameScript(
+    "data:,(" + frameScript.toString() + ")();",
+    true
+  );
   return browser;
 };
 
 // Restarts the child process by crashing it then reloading the tab
 var restart = async function() {
   let browser = gBrowser.selectedBrowser;
   // If the tab isn't remote this would crash the main process so skip it
-  if (browser.getAttribute("remote") != "true")
+  if (browser.getAttribute("remote") != "true") {
     return browser;
+  }
 
   await BrowserTestUtils.crashBrowser(browser);
 
   browser.reload();
 
   await BrowserTestUtils.browserLoaded(browser);
-  is(browser.getAttribute("remote"), expectedRemote, "Browser should be in the right process");
-  browser.messageManager.loadFrameScript("data:,(" + frameScript.toString() + ")();", true);
+  is(
+    browser.getAttribute("remote"),
+    expectedRemote,
+    "Browser should be in the right process"
+  );
+  browser.messageManager.loadFrameScript(
+    "data:,(" + frameScript.toString() + ")();",
+    true
+  );
   return browser;
 };
 
 // Sanity check that this test is going to be useful
 add_task(async function() {
   let browser = await loadTestTab();
 
   // This must be loaded in the remote process for this test to be useful
-  is(browser.getAttribute("remote"), expectedRemote, "Browser should be in the right process");
+  is(
+    browser.getAttribute("remote"),
+    expectedRemote,
+    "Browser should be in the right process"
+  );
 
   let local = resolveURI("resource://gre/modules/Services.jsm");
   let remote = await remoteResolveURI("resource://gre/modules/Services.jsm");
   is(local, remote, "Services.jsm should resolve in both processes");
 
   gBrowser.removeCurrentTab();
 });
 
 // Add a mapping, update it then remove it
 add_task(async function() {
   let browser = await loadTestTab();
 
   info("Set");
-  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/content"));
+  resProtocol.setSubstitution(
+    "testing",
+    Services.io.newURI("chrome://global/content")
+  );
   let local = resolveURI("resource://testing/test.js");
   let remote = await remoteResolveURI("resource://testing/test.js");
-  is(local, "chrome://global/content/test.js", "Should resolve in main process");
-  is(remote, "chrome://global/content/test.js", "Should resolve in child process");
+  is(
+    local,
+    "chrome://global/content/test.js",
+    "Should resolve in main process"
+  );
+  is(
+    remote,
+    "chrome://global/content/test.js",
+    "Should resolve in child process"
+  );
 
   info("Change");
-  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/skin"));
+  resProtocol.setSubstitution(
+    "testing",
+    Services.io.newURI("chrome://global/skin")
+  );
   local = resolveURI("resource://testing/test.js");
   remote = await remoteResolveURI("resource://testing/test.js");
   is(local, "chrome://global/skin/test.js", "Should resolve in main process");
   is(remote, "chrome://global/skin/test.js", "Should resolve in child process");
 
   info("Clear");
   resProtocol.setSubstitution("testing", null);
   local = resolveURI("resource://testing/test.js");
@@ -132,31 +163,53 @@ add_task(async function() {
   gBrowser.removeCurrentTab();
 });
 
 // Add a mapping, restart the child process then check it is still there
 add_task(async function() {
   let browser = await loadTestTab();
 
   info("Set");
-  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/content"));
+  resProtocol.setSubstitution(
+    "testing",
+    Services.io.newURI("chrome://global/content")
+  );
   let local = resolveURI("resource://testing/test.js");
   let remote = await remoteResolveURI("resource://testing/test.js");
-  is(local, "chrome://global/content/test.js", "Should resolve in main process");
-  is(remote, "chrome://global/content/test.js", "Should resolve in child process");
+  is(
+    local,
+    "chrome://global/content/test.js",
+    "Should resolve in main process"
+  );
+  is(
+    remote,
+    "chrome://global/content/test.js",
+    "Should resolve in child process"
+  );
 
   await restart();
 
   local = resolveURI("resource://testing/test.js");
   remote = await remoteResolveURI("resource://testing/test.js");
-  is(local, "chrome://global/content/test.js", "Should resolve in main process");
-  is(remote, "chrome://global/content/test.js", "Should resolve in child process");
+  is(
+    local,
+    "chrome://global/content/test.js",
+    "Should resolve in main process"
+  );
+  is(
+    remote,
+    "chrome://global/content/test.js",
+    "Should resolve in child process"
+  );
 
   info("Change");
-  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/skin"));
+  resProtocol.setSubstitution(
+    "testing",
+    Services.io.newURI("chrome://global/skin")
+  );
 
   await restart();
 
   local = resolveURI("resource://testing/test.js");
   remote = await remoteResolveURI("resource://testing/test.js");
   is(local, "chrome://global/skin/test.js", "Should resolve in main process");
   is(remote, "chrome://global/skin/test.js", "Should resolve in child process");
 
@@ -173,29 +226,51 @@ add_task(async function() {
   gBrowser.removeCurrentTab();
 });
 
 // Adding a mapping to a resource URI should work
 add_task(async function() {
   let browser = await loadTestTab();
 
   info("Set");
-  resProtocol.setSubstitution("testing", Services.io.newURI("chrome://global/content"));
-  resProtocol.setSubstitution("testing2", Services.io.newURI("resource://testing"));
+  resProtocol.setSubstitution(
+    "testing",
+    Services.io.newURI("chrome://global/content")
+  );
+  resProtocol.setSubstitution(
+    "testing2",
+    Services.io.newURI("resource://testing")
+  );
   let local = resolveURI("resource://testing2/test.js");
   let remote = await remoteResolveURI("resource://testing2/test.js");
-  is(local, "chrome://global/content/test.js", "Should resolve in main process");
-  is(remote, "chrome://global/content/test.js", "Should resolve in child process");
+  is(
+    local,
+    "chrome://global/content/test.js",
+    "Should resolve in main process"
+  );
+  is(
+    remote,
+    "chrome://global/content/test.js",
+    "Should resolve in child process"
+  );
 
   info("Clear");
   resProtocol.setSubstitution("testing", null);
   local = resolveURI("resource://testing2/test.js");
   remote = await remoteResolveURI("resource://testing2/test.js");
-  is(local, "chrome://global/content/test.js", "Should resolve in main process");
-  is(remote, "chrome://global/content/test.js", "Should resolve in child process");
+  is(
+    local,
+    "chrome://global/content/test.js",
+    "Should resolve in main process"
+  );
+  is(
+    remote,
+    "chrome://global/content/test.js",
+    "Should resolve in child process"
+  );
 
   resProtocol.setSubstitution("testing2", null);
   local = resolveURI("resource://testing2/test.js");
   remote = await remoteResolveURI("resource://testing2/test.js");
   is(local, null, "Shouldn't resolve in main process");
   is(remote, null, "Shouldn't resolve in child process");
 
   gBrowser.removeCurrentTab();
--- a/netwerk/test/browser/browser_cookie_sync_across_tabs.js
+++ b/netwerk/test/browser/browser_cookie_sync_across_tabs.js
@@ -3,24 +3,34 @@
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 "use strict";
 
 add_task(async function() {
   info("Make sure cookie changes in one process are visible in the other");
 
-  const kRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/",
-                                                    "https://example.com/");
+  const kRoot = getRootDirectory(gTestPath).replace(
+    "chrome://mochitests/content/",
+    "https://example.com/"
+  );
   const kTestPage = kRoot + "dummy.html";
 
   Services.cookies.removeAll();
 
-  let tab1 = await BrowserTestUtils.openNewForegroundTab({ gBrowser, url: kTestPage, forceNewProcess: true });
-  let tab2 = await BrowserTestUtils.openNewForegroundTab({ gBrowser, url: kTestPage, forceNewProcess: true });
+  let tab1 = await BrowserTestUtils.openNewForegroundTab({
+    gBrowser,
+    url: kTestPage,
+    forceNewProcess: true,
+  });
+  let tab2 = await BrowserTestUtils.openNewForegroundTab({
+    gBrowser,
+    url: kTestPage,
+    forceNewProcess: true,
+  });
 
   let browser1 = gBrowser.getBrowserForTab(tab1);
   let browser2 = gBrowser.getBrowserForTab(tab2);
 
   let pid1 = browser1.frameLoader.remoteTab.osPid;
   let pid2 = browser2.frameLoader.remoteTab.osPid;
 
   // Note, this might not be true once fission is implemented (Bug 1451850)
@@ -44,17 +54,21 @@ add_task(async function() {
   });
 
   await ContentTask.spawn(browser1, null, async function() {
     is(content.document.cookie, "a1=other_test", "Cookie should be set");
     content.document.cookie = "a2=again";
   });
 
   await ContentTask.spawn(browser2, null, async function() {
-    is(content.document.cookie, "a1=other_test; a2=again", "Cookie should be set");
+    is(
+      content.document.cookie,
+      "a1=other_test; a2=again",
+      "Cookie should be set"
+    );
     content.document.cookie = "a1=; expires=Thu, 01-Jan-1970 00:00:01 GMT;";
     content.document.cookie = "a2=; expires=Thu, 01-Jan-1970 00:00:01 GMT;";
   });
 
   await ContentTask.spawn(browser1, null, async function() {
     is(content.document.cookie, "", "Cookies should be cleared");
   });
 
--- a/netwerk/test/browser/browser_cross_process_redirect.js
+++ b/netwerk/test/browser/browser_cross_process_redirect.js
@@ -5,17 +5,22 @@
 
 "use strict";
 
 const gRegistrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
 
 let gLoadedInProcess2Promise = null;
 
 function _createProcessChooser(remoteTab, from, to, rejectPromise = false) {
-  let processChooser = new ProcessChooser(remoteTab, "example.com", "example.org", rejectPromise);
+  let processChooser = new ProcessChooser(
+    remoteTab,
+    "example.com",
+    "example.org",
+    rejectPromise
+  );
   registerCleanupFunction(function() {
     processChooser.unregister();
   });
 }
 
 function ProcessChooser(remoteTab, from, to, rejectPromise = false) {
   this.remoteTab = remoteTab;
   this.fromDomain = from;
@@ -85,124 +90,193 @@ ProcessChooser.prototype = {
       default:
         ok(false, "Unexpected topic observed!");
         break;
     }
   },
 
   // nsISupports
   QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
-}
+};
 
 add_task(async function() {
-  info("Check that a redirect in process A may be correctly handled in process B");
+  info(
+    "Check that a redirect in process A may be correctly handled in process B"
+  );
 
-  const kRoot1 = getRootDirectory(gTestPath).replace("chrome://mochitests/content/",
-                                                     "https://example.com/");
-  const kRoot2 = getRootDirectory(gTestPath).replace("chrome://mochitests/content/",
-                                                     "https://example.org/");
+  const kRoot1 = getRootDirectory(gTestPath).replace(
+    "chrome://mochitests/content/",
+    "https://example.com/"
+  );
+  const kRoot2 = getRootDirectory(gTestPath).replace(
+    "chrome://mochitests/content/",
+    "https://example.org/"
+  );
   const kRoot3 = getRootDirectory(gTestPath);
 
   // This process will attempt to load the page that redirects to a different origin
-  let tab1 = await BrowserTestUtils.openNewForegroundTab({ gBrowser, url: kRoot1 + "dummy.html", forceNewProcess: true });
+  let tab1 = await BrowserTestUtils.openNewForegroundTab({
+    gBrowser,
+    url: kRoot1 + "dummy.html",
+    forceNewProcess: true,
+  });
   // This process will eventually receive the redirected channel.
-  let tab2 = await BrowserTestUtils.openNewForegroundTab({ gBrowser, url: kRoot2 + "dummy.html", forceNewProcess: true });
+  let tab2 = await BrowserTestUtils.openNewForegroundTab({
+    gBrowser,
+    url: kRoot2 + "dummy.html",
+    forceNewProcess: true,
+  });
 
   let browser1 = gBrowser.getBrowserForTab(tab1);
   let browser2 = gBrowser.getBrowserForTab(tab2);
 
   // This is for testing purposes only.
   // This "process chooser" will direct the channel to be opened in the second
   // tab, and thus in the second parent.
-  let processChooser = _createProcessChooser(browser2.frameLoader.remoteTab, "example.com", "example.org");
+  let processChooser = _createProcessChooser(
+    browser2.frameLoader.remoteTab,
+    "example.com",
+    "example.org"
+  );
 
   info("Loading redirected URL");
   // Open the URL in the first process. We expect it to wind up in the second
   // process.
 
   // Define the child listener in the new channel.
   await ContentTask.spawn(browser2, null, async function(arg) {
-    function ChannelListener(childListener) { this.childListener = childListener; }
+    function ChannelListener(childListener) {
+      this.childListener = childListener;
+    }
     ChannelListener.prototype = {
       onStartRequest(aRequest) {
         info("onStartRequest");
         let channel = aRequest.QueryInterface(Ci.nsIChannel);
-        Assert.equal(channel.URI.spec, this.childListener.URI, "Make sure the channel has the proper URI");
-        Assert.equal(channel.originalURI.spec, this.childListener.originalURI, "Make sure the originalURI is correct");
+        Assert.equal(
+          channel.URI.spec,
+          this.childListener.URI,
+          "Make sure the channel has the proper URI"
+        );
+        Assert.equal(
+          channel.originalURI.spec,
+          this.childListener.originalURI,
+          "Make sure the originalURI is correct"
+        );
       },
       onStopRequest(aRequest, aStatusCode) {
         info("onStopRequest");
         Assert.equal(aStatusCode, Cr.NS_OK, "Check the status code");
-        Assert.equal(this.gotData, true, "Check that the channel received data");
+        Assert.equal(
+          this.gotData,
+          true,
+          "Check that the channel received data"
+        );
         if (this.childListener.onComplete) {
           this.childListener.onComplete();
         }
         this.childListener.resolve();
       },
       onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount) {
         this.gotData = true;
         info("onDataAvailable");
       },
-      QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener,Ci.nsIRequestObserver])
+      QueryInterface: ChromeUtils.generateQI([
+        Ci.nsIStreamListener,
+        Ci.nsIRequestObserver,
+      ]),
     };
 
-    function ChildListener(uri, originalURI, resolve) { this.URI = uri; this.originalURI = originalURI; this.resolve = resolve;}
+    function ChildListener(uri, originalURI, resolve) {
+      this.URI = uri;
+      this.originalURI = originalURI;
+      this.resolve = resolve;
+    }
     ChildListener.prototype = {
       // nsIChildProcessChannelListener
       onChannelReady(aChildChannel, aIdentifier) {
         Assert.equal(aIdentifier, 42, "Check the status code");
         info("onChannelReady");
         aChildChannel.completeRedirectSetup(new ChannelListener(this), null);
       },
       // nsIFactory
       createInstance(aOuter, aIID) {
         if (aOuter) {
           throw Cr.NS_ERROR_NO_AGGREGATION;
         }
         return this.QueryInterface(aIID);
       },
       lockFactory() {},
       // nsISupports
-      QueryInterface: ChromeUtils.generateQI([Ci.nsIChildProcessChannelListener, Ci.nsIFactory]),
-      classID: Components.ID("{a6c142a9-eb38-4a09-a940-b71cdad479e1}")
-    }
+      QueryInterface: ChromeUtils.generateQI([
+        Ci.nsIChildProcessChannelListener,
+        Ci.nsIFactory,
+      ]),
+      classID: Components.ID("{a6c142a9-eb38-4a09-a940-b71cdad479e1}"),
+    };
 
     content.window.ChildListener = ChildListener;
   });
 
   // This promise instantiates a ChildListener and is resolved when the redirected
   // channel is completed.
-  let loadedInProcess2Promise = ContentTask.spawn(browser2, { URI: kRoot2 + "dummy.html", originalURI: kRoot1 + "redirect.sjs?" + kRoot2 + "dummy.html"}, async function(arg) {
-    // We register the listener in process no. 2
-    return new Promise(resolve => {
-      var childListener = new content.window.ChildListener(arg.URI, arg.originalURI, resolve);
-      var registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
-      childListener.onComplete = () => {
-        registrar.unregisterFactory(childListener.classID, childListener);
-      }
-      registrar.registerFactory(childListener.classID, "",
-                              "@mozilla.org/network/childProcessChannelListener;1",
-                              childListener);
-    });
-  });
+  let loadedInProcess2Promise = ContentTask.spawn(
+    browser2,
+    {
+      URI: kRoot2 + "dummy.html",
+      originalURI: kRoot1 + "redirect.sjs?" + kRoot2 + "dummy.html",
+    },
+    async function(arg) {
+      // We register the listener in process no. 2
+      return new Promise(resolve => {
+        var childListener = new content.window.ChildListener(
+          arg.URI,
+          arg.originalURI,
+          resolve
+        );
+        var registrar = Components.manager.QueryInterface(
+          Ci.nsIComponentRegistrar
+        );
+        childListener.onComplete = () => {
+          registrar.unregisterFactory(childListener.classID, childListener);
+        };
+        registrar.registerFactory(
+          childListener.classID,
+          "",
+          "@mozilla.org/network/childProcessChannelListener;1",
+          childListener
+        );
+      });
+    }
+  );
 
   let browser1LoadHasStopped = BrowserTestUtils.browserStopped(browser1);
 
-  await BrowserTestUtils.loadURI(browser1, kRoot1 + "redirect.sjs?" + kRoot2 + "dummy.html");
+  await BrowserTestUtils.loadURI(
+    browser1,
+    kRoot1 + "redirect.sjs?" + kRoot2 + "dummy.html"
+  );
 
   // Check that the channel was delivered to process no. 2
   await loadedInProcess2Promise;
   info("channel has loaded in second process");
   // This is to check that the old channel was cancelled.
   await browser1LoadHasStopped;
 
   // check that a rejected promise also works.
-  processChooser = _createProcessChooser(browser2.frameLoader.remoteTab, "example.com", "example.org", true);
+  processChooser = _createProcessChooser(
+    browser2.frameLoader.remoteTab,
+    "example.com",
+    "example.org",
+    true
+  );
   let browser1LoadHasStoppedAgain = BrowserTestUtils.browserStopped(browser1);
-  await BrowserTestUtils.loadURI(browser1, kRoot1 + "redirect.sjs?" + kRoot2 + "dummy.html");
+  await BrowserTestUtils.loadURI(
+    browser1,
+    kRoot1 + "redirect.sjs?" + kRoot2 + "dummy.html"
+  );
   await browser1LoadHasStoppedAgain;
   info("this is done now");
 
   BrowserTestUtils.removeTab(tab1);
   BrowserTestUtils.removeTab(tab2);
 
   ok(true, "Got to the end of the test!");
 });
--- a/netwerk/test/browser/browser_nsIFormPOSTActionChannel.js
+++ b/netwerk/test/browser/browser_nsIFormPOSTActionChannel.js
@@ -12,29 +12,30 @@ const NORMAL_FORM_URI = FORM_BASE + "nor
 const UPLOAD_FORM_URI = FORM_BASE + "upload.html";
 const POST_FORM_URI = FORM_BASE + "post.html";
 
 const ACTION_BASE = SCHEME + "://dummy/action/";
 const NORMAL_ACTION_URI = ACTION_BASE + "normal.html";
 const UPLOAD_ACTION_URI = ACTION_BASE + "upload.html";
 const POST_ACTION_URI = ACTION_BASE + "post.html";
 
-function CustomProtocolHandler() {
-}
+function CustomProtocolHandler() {}
 CustomProtocolHandler.prototype = {
   /** nsIProtocolHandler */
   get scheme() {
     return SCHEME;
   },
   get defaultPort() {
     return -1;
   },
   get protocolFlags() {
-    return Ci.nsIProtocolHandler.URI_NORELATIVE |
-           Ci.nsIProtocolHandler.URI_IS_LOCAL_RESOURCE;
+    return (
+      Ci.nsIProtocolHandler.URI_NORELATIVE |
+      Ci.nsIProtocolHandler.URI_IS_LOCAL_RESOURCE
+    );
   },
   newChannel(aURI, aLoadInfo) {
     return new CustomChannel(aURI, aLoadInfo);
   },
   allowPort(port, scheme) {
     return port != -1;
   },
 
@@ -43,19 +44,21 @@ CustomProtocolHandler.prototype = {
     if (aOuter) {
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
     return this.QueryInterface(aIID);
   },
   lockFactory() {},
 
   /** nsISupports */
-  QueryInterface: ChromeUtils.generateQI([Ci.nsIProtocolHandler,
-                                          Ci.nsIFactory]),
-  classID: Components.ID("{16d594bc-d9d8-47ae-a139-ea714dc0c35c}")
+  QueryInterface: ChromeUtils.generateQI([
+    Ci.nsIProtocolHandler,
+    Ci.nsIFactory,
+  ]),
+  classID: Components.ID("{16d594bc-d9d8-47ae-a139-ea714dc0c35c}"),
 };
 
 function CustomChannel(aURI, aLoadInfo) {
   this.uri = aURI;
   this.loadInfo = aLoadInfo;
 
   this._uploadStream = null;
 
@@ -89,18 +92,17 @@ CustomChannel.prototype = {
   owner: null,
   notificationCallbacks: null,
   get securityInfo() {
     return null;
   },
   get contentType() {
     return "text/html";
   },
-  set contentType(val) {
-  },
+  set contentType(val) {},
   contentCharset: "UTF-8",
   get contentLength() {
     return -1;
   },
   set contentLength(val) {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
   open() {
@@ -132,18 +134,19 @@ CustomChannel.prototype = {
 document.getElementById('form').submit();
 //-->
 </script>
 `;
     } else if (this.uri.spec.startsWith(ACTION_BASE)) {
       var postData = "";
       var headers = {};
       if (this._uploadStream) {
-        var bstream = Cc["@mozilla.org/binaryinputstream;1"]
-            .createInstance(Ci.nsIBinaryInputStream);
+        var bstream = Cc["@mozilla.org/binaryinputstream;1"].createInstance(
+          Ci.nsIBinaryInputStream
+        );
         bstream.setInputStream(this._uploadStream);
         postData = bstream.readBytes(bstream.available());
 
         if (this._uploadStream instanceof Ci.nsIMIMEInputStream) {
           this._uploadStream.visitHeaders((name, value) => {
             headers[name] = value;
           });
         }
@@ -155,64 +158,72 @@ document.getElementById('form').submit()
 `;
     }
 
     data += `
 </body>
 </html>
 `;
 
-    var stream = Cc["@mozilla.org/io/string-input-stream;1"]
-        .createInstance(Ci.nsIStringInputStream);
+    var stream = Cc["@mozilla.org/io/string-input-stream;1"].createInstance(
+      Ci.nsIStringInputStream
+    );
     stream.setData(data, data.length);
 
     var runnable = {
       run: () => {
         try {
           aListener.onStartRequest(this, null);
-        } catch(e) {}
+        } catch (e) {}
         try {
           aListener.onDataAvailable(this, stream, 0, stream.available());
-        } catch(e) {}
+        } catch (e) {}
         try {
           aListener.onStopRequest(this, null, Cr.NS_OK);
-        } catch(e) {}
-      }
+        } catch (e) {}
+      },
     };
     Services.tm.dispatchToMainThread(runnable);
   },
 
   /** nsIRequest */
   get name() {
     return this.uri.spec;
   },
-  isPending () {
+  isPending() {
     return false;
   },
   get status() {
     return Cr.NS_OK;
   },
   cancel(status) {},
   loadGroup: null,
-  loadFlags: Ci.nsIRequest.LOAD_NORMAL |
-             Ci.nsIRequest.INHIBIT_CACHING |
-             Ci.nsIRequest.LOAD_BYPASS_CACHE,
+  loadFlags:
+    Ci.nsIRequest.LOAD_NORMAL |
+    Ci.nsIRequest.INHIBIT_CACHING |
+    Ci.nsIRequest.LOAD_BYPASS_CACHE,
 };
 
 function frameScript() {
   addMessageListener("Test:WaitForIFrame", function() {
     var check = function() {
       if (content) {
         var frame = content.document.getElementById("frame");
         if (frame) {
-          var upload_stream = frame.contentDocument.getElementById("upload_stream");
+          var upload_stream = frame.contentDocument.getElementById(
+            "upload_stream"
+          );
           var post_data = frame.contentDocument.getElementById("post_data");
           var headers = frame.contentDocument.getElementById("upload_headers");
           if (upload_stream && post_data && headers) {
-            sendAsyncMessage("Test:IFrameLoaded", [upload_stream.value, post_data.value, headers.value]);
+            sendAsyncMessage("Test:IFrameLoaded", [
+              upload_stream.value,
+              post_data.value,
+              headers.value,
+            ]);
             return;
           }
         }
       }
 
       setTimeout(check, 100);
     };
 
@@ -220,35 +231,41 @@ function frameScript() {
   });
 }
 
 function loadTestTab(uri) {
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, uri);
   var browser = gBrowser.selectedBrowser;
 
   let manager = browser.messageManager;
-  browser.messageManager.loadFrameScript("data:,(" + frameScript.toString() + ")();", true);
+  browser.messageManager.loadFrameScript(
+    "data:,(" + frameScript.toString() + ")();",
+    true
+  );
 
   return new Promise(resolve => {
     function listener({ data: [hasUploadStream, postData, headers] }) {
       manager.removeMessageListener("Test:IFrameLoaded", listener);
       resolve([hasUploadStream, atob(postData), JSON.parse(headers)]);
     }
 
     manager.addMessageListener("Test:IFrameLoaded", listener);
     manager.sendAsyncMessage("Test:WaitForIFrame");
   });
 }
 
 add_task(async function() {
   var handler = new CustomProtocolHandler();
   var registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
-  registrar.registerFactory(handler.classID, "",
-                            "@mozilla.org/network/protocol;1?name=" + handler.scheme,
-                            handler);
+  registrar.registerFactory(
+    handler.classID,
+    "",
+    "@mozilla.org/network/protocol;1?name=" + handler.scheme,
+    handler
+  );
   registerCleanupFunction(function() {
     registrar.unregisterFactory(handler.classID, handler);
   });
 });
 
 add_task(async function() {
   var [hasUploadStream, postData] = await loadTestTab(NORMAL_FORM_URI);
   is(hasUploadStream, "no", "normal action should not have uploadStream");
@@ -262,16 +279,15 @@ add_task(async function() {
 
   gBrowser.removeCurrentTab();
 });
 
 add_task(async function() {
   var [hasUploadStream, postData, headers] = await loadTestTab(POST_FORM_URI);
 
   is(hasUploadStream, "yes", "post action should have uploadStream");
-  is(postData, "foo=bar\r\n",
-     "POST data is received correctly");
+  is(postData, "foo=bar\r\n", "POST data is received correctly");
 
   is(headers["Content-Type"], "text/plain", "Content-Type header is correct");
   is(headers["Content-Length"], undefined, "Content-Length header is correct");
 
   gBrowser.removeCurrentTab();
 });
--- a/netwerk/test/browser/browser_post_file.js
+++ b/netwerk/test/browser/browser_post_file.js
@@ -1,13 +1,13 @@
 /*
  * Tests for bug 1241100: Post to local file should not overwrite the file.
  */
 
-const {OS} = ChromeUtils.import("resource://gre/modules/osfile.jsm");
+const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
 
 async function createTestFile(filename, content) {
   let path = OS.Path.join(OS.Constants.Path.tmpDir, filename);
   await OS.File.writeAtomic(path, content);
   return path;
 }
 
 async function readFile(path) {
@@ -73,17 +73,20 @@ add_task(async function() {
 
   var postPath = await createTestFile(postFilename, postFileContent);
   var actionPath = await createTestFile(actionFilename, actionFileContent);
 
   var postURI = OS.Path.toFileURI(postPath);
 
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, postURI);
   let browser = gBrowser.selectedBrowser;
-  browser.messageManager.loadFrameScript("data:,(" + frameScript.toString() + ")();", true);
+  browser.messageManager.loadFrameScript(
+    "data:,(" + frameScript.toString() + ")();",
+    true
+  );
   await new Promise(resolve => {
     let manager = browser.messageManager;
 
     function listener() {
       manager.removeMessageListener("Test:IFrameLoaded", listener);
       resolve();
     }
 
--- a/netwerk/test/browser/browser_resource_navigation.js
+++ b/netwerk/test/browser/browser_resource_navigation.js
@@ -3,51 +3,74 @@
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 "use strict";
 
 add_task(async function() {
   info("Make sure navigation through links in resource:// pages work");
 
-  await BrowserTestUtils.withNewTab({ gBrowser, url: "resource://gre/" }, async function(browser) {
-    // Following a directory link shall properly open the directory (bug 1224046)
-    await ContentTask.spawn(browser, {}, function() {
-      let link = Array.prototype.filter.call(content.document.getElementsByClassName('dir'), function(element) {
-        let name = element.textContent;
-        // Depending whether resource:// is backed by jar: or file://,
-        // directories either have a trailing slash or they don't.
-        if (name.endsWith("/")) {
-          name = name.slice(0, -1);
-        }
-        return name == "components";
-      })[0];
-      // First ensure the link is in the viewport
-      link.scrollIntoView();
-      // Then click on it.
-      link.click();
-    });
+  await BrowserTestUtils.withNewTab(
+    { gBrowser, url: "resource://gre/" },
+    async function(browser) {
+      // Following a directory link shall properly open the directory (bug 1224046)
+      await ContentTask.spawn(browser, {}, function() {
+        let link = Array.prototype.filter.call(
+          content.document.getElementsByClassName("dir"),
+          function(element) {
+            let name = element.textContent;
+            // Depending whether resource:// is backed by jar: or file://,
+            // directories either have a trailing slash or they don't.
+            if (name.endsWith("/")) {
+              name = name.slice(0, -1);
+            }
+            return name == "components";
+          }
+        )[0];
+        // First ensure the link is in the viewport
+        link.scrollIntoView();
+        // Then click on it.
+        link.click();
+      });
 
-    await BrowserTestUtils.browserLoaded(browser, undefined, "resource://gre/components/");
+      await BrowserTestUtils.browserLoaded(
+        browser,
+        undefined,
+        "resource://gre/components/"
+      );
 
-    // Following the parent link shall properly open the parent (bug 1366180)
-    await ContentTask.spawn(browser, {}, function() {
-      let link = content.document.getElementById('UI_goUp').getElementsByTagName('a')[0];
-      // The link should always be high enough in the page to be in the viewport.
-      link.click();
-    });
+      // Following the parent link shall properly open the parent (bug 1366180)
+      await ContentTask.spawn(browser, {}, function() {
+        let link = content.document
+          .getElementById("UI_goUp")
+          .getElementsByTagName("a")[0];
+        // The link should always be high enough in the page to be in the viewport.
+        link.click();
+      });
 
-    await BrowserTestUtils.browserLoaded(browser, undefined, "resource://gre/");
+      await BrowserTestUtils.browserLoaded(
+        browser,
+        undefined,
+        "resource://gre/"
+      );
 
-    // Following a link to a given file shall properly open the file.
-    await ContentTask.spawn(browser, {}, function() {
-      let link = Array.prototype.filter.call(content.document.getElementsByClassName('file'), function(element) {
-        return element.textContent == "greprefs.js";
-      })[0];
-      link.scrollIntoView();
-      link.click();
-    });
+      // Following a link to a given file shall properly open the file.
+      await ContentTask.spawn(browser, {}, function() {
+        let link = Array.prototype.filter.call(
+          content.document.getElementsByClassName("file"),
+          function(element) {
+            return element.textContent == "greprefs.js";
+          }
+        )[0];
+        link.scrollIntoView();
+        link.click();
+      });
 
-    await BrowserTestUtils.browserLoaded(browser, undefined, "resource://gre/greprefs.js");
+      await BrowserTestUtils.browserLoaded(
+        browser,
+        undefined,
+        "resource://gre/greprefs.js"
+      );
 
-    ok(true, "Got to the end of the test!");
-  });
+      ok(true, "Got to the end of the test!");
+    }
+  );
 });
--- a/netwerk/test/browser/browser_test_favicon.js
+++ b/netwerk/test/browser/browser_test_favicon.js
@@ -1,15 +1,19 @@
 // Tests third party cookie blocking using a favicon loaded from a different
 // domain. The cookie should be considered third party.
 
 add_task(async function() {
-  const iconUrl = "http://example.org/browser/netwerk/test/browser/damonbowling.jpg";
-  const pageUrl = "http://example.com/browser/netwerk/test/browser/file_favicon.html";
-	await SpecialPowers.pushPrefEnv({"set": [["network.cookie.cookieBehavior", 1]]});
+  const iconUrl =
+    "http://example.org/browser/netwerk/test/browser/damonbowling.jpg";
+  const pageUrl =
+    "http://example.com/browser/netwerk/test/browser/file_favicon.html";
+  await SpecialPowers.pushPrefEnv({
+    set: [["network.cookie.cookieBehavior", 1]],
+  });
 
   let promise = TestUtils.topicObserved("cookie-rejected", subject => {
     let uri = subject.QueryInterface(Ci.nsIURI);
     return uri.spec == iconUrl;
   });
 
   // Kick off a page load that will load the favicon.
   let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, pageUrl);
--- a/netwerk/test/browser/browser_test_io_activity.js
+++ b/netwerk/test/browser/browser_test_io_activity.js
@@ -1,48 +1,48 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* 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/. */
 
-const ROOT_URL = getRootDirectory(gTestPath).replace("chrome://mochitests/content/",
-                                                     "https://example.com/");
+const ROOT_URL = getRootDirectory(gTestPath).replace(
+  "chrome://mochitests/content/",
+  "https://example.com/"
+);
 const TEST_URL = "about:license";
 const TEST_URL2 = ROOT_URL + "ioactivity.html";
 
 var gotSocket = false;
 var gotFile = false;
 var gotSqlite = false;
 var gotEmptyData = false;
 
 function processResults(results) {
-    for (let data of results) {
-        console.log(data.location);
-        gotEmptyData = data.rx == 0 && data.tx == 0 && !gotEmptyData
-        gotSocket = data.location.startsWith("socket://127.0.0.1:") || gotSocket;
-        gotFile = data.location.endsWith("aboutLicense.css") || gotFile;
-        gotSqlite = data.location.endsWith("places.sqlite") || gotSqlite;
-    }
-};
+  for (let data of results) {
+    console.log(data.location);
+    gotEmptyData = data.rx == 0 && data.tx == 0 && !gotEmptyData;
+    gotSocket = data.location.startsWith("socket://127.0.0.1:") || gotSocket;
+    gotFile = data.location.endsWith("aboutLicense.css") || gotFile;
+    gotSqlite = data.location.endsWith("places.sqlite") || gotSqlite;
+  }
+}
 
 add_task(async function testRequestIOActivity() {
-    await SpecialPowers.pushPrefEnv({
-      "set": [
-        ["io.activity.enabled", true],
-      ]
-    });
-    waitForExplicitFinish();
-    Services.obs.notifyObservers(null, "profile-initial-state");
+  await SpecialPowers.pushPrefEnv({
+    set: [["io.activity.enabled", true]],
+  });
+  waitForExplicitFinish();
+  Services.obs.notifyObservers(null, "profile-initial-state");
 
-    await BrowserTestUtils.withNewTab(TEST_URL, async function(browser) {
-      await BrowserTestUtils.withNewTab(TEST_URL2, async function(browser) {
-        let results = await ChromeUtils.requestIOActivity();
-        processResults(results);
+  await BrowserTestUtils.withNewTab(TEST_URL, async function(browser) {
+    await BrowserTestUtils.withNewTab(TEST_URL2, async function(browser) {
+      let results = await ChromeUtils.requestIOActivity();
+      processResults(results);
 
-        ok(gotSocket, "A socket was used");
-        // test deactivated for now
-        // ok(gotFile, "A file was used");
-        ok(gotSqlite, "A sqlite DB was used");
-        ok(!gotEmptyData, "Every I/O event had data");
-      });
+      ok(gotSocket, "A socket was used");
+      // test deactivated for now
+      // ok(gotFile, "A file was used");
+      ok(gotSqlite, "A sqlite DB was used");
+      ok(!gotEmptyData, "Every I/O event had data");
     });
+  });
 });
--- a/netwerk/test/httpserver/httpd.js
+++ b/netwerk/test/httpserver/httpd.js
@@ -45,44 +45,49 @@ const PR_UINT32_MAX = Math.pow(2, 32) - 
 /** True if debugging output is enabled, false otherwise. */
 var DEBUG = false; // non-const *only* so tweakable in server tests
 
 /** True if debugging output should be timestamped. */
 var DEBUG_TIMESTAMP = false; // non-const so tweakable in server tests
 
 var gGlobalObject = Cu.getGlobalForObject(this);
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * Asserts that the given condition holds.  If it doesn't, the given message is
  * dumped, a stack trace is printed, and an exception is thrown to attempt to
  * stop execution (which unfortunately must rely upon the exception not being
  * accidentally swallowed by the code that uses it).
  */
 function NS_ASSERT(cond, msg) {
   if (DEBUG && !cond) {
     dumpn("###!!!");
     dumpn("###!!! ASSERTION" + (msg ? ": " + msg : "!"));
     dumpn("###!!! Stack follows:");
 
     var stack = new Error().stack.split(/\n/);
-    dumpn(stack.map(function(val) { return "###!!!   " + val; }).join("\n"));
+    dumpn(
+      stack
+        .map(function(val) {
+          return "###!!!   " + val;
+        })
+        .join("\n")
+    );
 
     throw Components.Exception("", Cr.NS_ERROR_ABORT);
   }
 }
 
 /** Constructs an HTTP error object. */
 function HttpError(code, description) {
   this.code = code;
   this.description = description;
 }
-HttpError.prototype =
-{
+HttpError.prototype = {
   toString() {
     return this.code + " " + this.description;
   },
 };
 
 /**
  * Errors thrown to trigger specific HTTP server responses.
  */
@@ -109,33 +114,34 @@ var HTTP_501 = new HttpError(501, "Not I
 var HTTP_502 = new HttpError(502, "Bad Gateway");
 var HTTP_503 = new HttpError(503, "Service Unavailable");
 var HTTP_504 = new HttpError(504, "Gateway Timeout");
 var HTTP_505 = new HttpError(505, "HTTP Version Not Supported");
 
 /** Creates a hash with fields corresponding to the values in arr. */
 function array2obj(arr) {
   var obj = {};
-  for (var i = 0; i < arr.length; i++)
+  for (var i = 0; i < arr.length; i++) {
     obj[arr[i]] = arr[i];
+  }
   return obj;
 }
 
 /** Returns an array of the integers x through y, inclusive. */
 function range(x, y) {
   var arr = [];
-  for (var i = x; i <= y; i++)
+  for (var i = x; i <= y; i++) {
     arr.push(i);
+  }
   return arr;
 }
 
 /** An object (hash) whose fields are the numbers of all HTTP error codes. */
 const HTTP_ERROR_CODES = array2obj(range(400, 417).concat(range(500, 505)));
 
-
 /**
  * The character used to distinguish hidden files from non-hidden files, a la
  * the leading dot in Apache.  Since that mechanism also hides files from
  * easy display in LXR, ls output, etc. however, we choose instead to use a
  * suffix character.  If a requested file ends with it, we append another
  * when getting the file on the server.  If it doesn't, we just look up that
  * file.  Therefore, any file whose name ends with exactly one of the character
  * is "hidden" and available for use by the server.
@@ -154,79 +160,96 @@ const SJS_TYPE = "sjs";
 /** Base for relative timestamps produced by dumpn(). */
 var firstStamp = 0;
 
 /** dump(str) with a trailing "\n" -- only outputs if DEBUG. */
 function dumpn(str) {
   if (DEBUG) {
     var prefix = "HTTPD-INFO | ";
     if (DEBUG_TIMESTAMP) {
-      if (firstStamp === 0)
+      if (firstStamp === 0) {
         firstStamp = Date.now();
+      }
 
       var elapsed = Date.now() - firstStamp; // milliseconds
       var min = Math.floor(elapsed / 60000);
       var sec = (elapsed % 60000) / 1000;
 
-      if (sec < 10)
+      if (sec < 10) {
         prefix += min + ":0" + sec.toFixed(3) + " | ";
-      else
+      } else {
         prefix += min + ":" + sec.toFixed(3) + " | ";
+      }
     }
 
     dump(prefix + str + "\n");
   }
 }
 
 /** Dumps the current JS stack if DEBUG. */
 function dumpStack() {
   // peel off the frames for dumpStack() and Error()
   var stack = new Error().stack.split(/\n/).slice(2);
   stack.forEach(dumpn);
 }
 
-
 /** The XPCOM thread manager. */
 var gThreadManager = null;
 
 /**
  * JavaScript constructors for commonly-used classes; precreating these is a
  * speedup over doing the same from base principles.  See the docs at
  * http://developer.mozilla.org/en/docs/Components.Constructor for details.
  */
-const ServerSocket = CC("@mozilla.org/network/server-socket;1",
-                        "nsIServerSocket",
-                        "init");
-const ServerSocketIPv6 = CC("@mozilla.org/network/server-socket;1",
-                            "nsIServerSocket",
-                            "initIPv6");
-const ScriptableInputStream = CC("@mozilla.org/scriptableinputstream;1",
-                                 "nsIScriptableInputStream",
-                                 "init");
-const Pipe = CC("@mozilla.org/pipe;1",
-                "nsIPipe",
-                "init");
-const FileInputStream = CC("@mozilla.org/network/file-input-stream;1",
-                           "nsIFileInputStream",
-                           "init");
-const ConverterInputStream = CC("@mozilla.org/intl/converter-input-stream;1",
-                                "nsIConverterInputStream",
-                                "init");
-const WritablePropertyBag = CC("@mozilla.org/hash-property-bag;1",
-                               "nsIWritablePropertyBag2");
-const SupportsString = CC("@mozilla.org/supports-string;1",
-                          "nsISupportsString");
+const ServerSocket = CC(
+  "@mozilla.org/network/server-socket;1",
+  "nsIServerSocket",
+  "init"
+);
+const ServerSocketIPv6 = CC(
+  "@mozilla.org/network/server-socket;1",
+  "nsIServerSocket",
+  "initIPv6"
+);
+const ScriptableInputStream = CC(
+  "@mozilla.org/scriptableinputstream;1",
+  "nsIScriptableInputStream",
+  "init"
+);
+const Pipe = CC("@mozilla.org/pipe;1", "nsIPipe", "init");
+const FileInputStream = CC(
+  "@mozilla.org/network/file-input-stream;1",
+  "nsIFileInputStream",
+  "init"
+);
+const ConverterInputStream = CC(
+  "@mozilla.org/intl/converter-input-stream;1",
+  "nsIConverterInputStream",
+  "init"
+);
+const WritablePropertyBag = CC(
+  "@mozilla.org/hash-property-bag;1",
+  "nsIWritablePropertyBag2"
+);
+const SupportsString = CC(
+  "@mozilla.org/supports-string;1",
+  "nsISupportsString"
+);
 
 /* These two are non-const only so a test can overwrite them. */
-var BinaryInputStream = CC("@mozilla.org/binaryinputstream;1",
-                           "nsIBinaryInputStream",
-                           "setInputStream");
-var BinaryOutputStream = CC("@mozilla.org/binaryoutputstream;1",
-                            "nsIBinaryOutputStream",
-                            "setOutputStream");
+var BinaryInputStream = CC(
+  "@mozilla.org/binaryinputstream;1",
+  "nsIBinaryInputStream",
+  "setInputStream"
+);
+var BinaryOutputStream = CC(
+  "@mozilla.org/binaryoutputstream;1",
+  "nsIBinaryOutputStream",
+  "setOutputStream"
+);
 
 /**
  * Returns the RFC 822/1123 representation of a date.
  *
  * @param date : Number
  *   the date, in milliseconds from midnight (00:00:00), January 1, 1970 GMT
  * @returns string
  *   the representation of the given date
@@ -241,39 +264,51 @@ function toDateString(date) {
   // wkday        = "Mon" | "Tue" | "Wed"
   //              | "Thu" | "Fri" | "Sat" | "Sun"
   // month        = "Jan" | "Feb" | "Mar" | "Apr"
   //              | "May" | "Jun" | "Jul" | "Aug"
   //              | "Sep" | "Oct" | "Nov" | "Dec"
   //
 
   const wkdayStrings = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
-  const monthStrings = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
-                        "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
+  const monthStrings = [
+    "Jan",
+    "Feb",
+    "Mar",
+    "Apr",
+    "May",
+    "Jun",
+    "Jul",
+    "Aug",
+    "Sep",
+    "Oct",
+    "Nov",
+    "Dec",
+  ];
 
   /**
    * Processes a date and returns the encoded UTC time as a string according to
    * the format specified in RFC 2616.
    *
    * @param date : Date
    *   the date to process
    * @returns string
    *   a string of the form "HH:MM:SS", ranging from "00:00:00" to "23:59:59"
    */
   function toTime(date) {
     var hrs = date.getUTCHours();
-    var rv  = (hrs < 10) ? "0" + hrs : hrs;
+    var rv = hrs < 10 ? "0" + hrs : hrs;
 
     var mins = date.getUTCMinutes();
     rv += ":";
-    rv += (mins < 10) ? "0" + mins : mins;
+    rv += mins < 10 ? "0" + mins : mins;
 
     var secs = date.getUTCSeconds();
     rv += ":";
-    rv += (secs < 10) ? "0" + secs : secs;
+    rv += secs < 10 ? "0" + secs : secs;
 
     return rv;
   }
 
   /**
    * Processes a date and returns the encoded UTC date as a string according to
    * the date1 format specified in RFC 2616.
    *
@@ -282,17 +317,17 @@ function toDateString(date) {
    * @returns string
    *   a string of the form "HH:MM:SS", ranging from "00:00:00" to "23:59:59"
    */
   function toDate1(date) {
     var day = date.getUTCDate();
     var month = date.getUTCMonth();
     var year = date.getUTCFullYear();
 
-    var rv = (day < 10) ? "0" + day : day;
+    var rv = day < 10 ? "0" + day : day;
     rv += " " + monthStrings[month];
     rv += " " + year;
 
     return rv;
   }
 
   date = new Date(date);
 
@@ -304,33 +339,37 @@ function toDateString(date) {
 
 /**
  * Prints out a human-readable representation of the object o and its fields,
  * omitting those whose names begin with "_" if showMembers != true (to ignore
  * "private" properties exposed via getters/setters).
  */
 function printObj(o, showMembers) {
   var s = "******************************\n";
-  s +=    "o = {\n";
+  s += "o = {\n";
   for (var i in o) {
-    if (typeof(i) != "string" ||
-        (showMembers || (i.length > 0 && i[0] != "_")))
+    if (
+      typeof i != "string" ||
+      (showMembers || (i.length > 0 && i[0] != "_"))
+    ) {
       s += "      " + i + ": " + o[i] + ",\n";
+    }
   }
-  s +=    "    };\n";
-  s +=    "******************************";
+  s += "    };\n";
+  s += "******************************";
   dumpn(s);
 }
 
 /**
  * Instantiates a new HTTP server.
  */
 function nsHttpServer() {
-  if (!gThreadManager)
+  if (!gThreadManager) {
     gThreadManager = Cc["@mozilla.org/thread-manager;1"].getService();
+  }
 
   /** The port on which this server listens. */
   this._port = undefined;
 
   /** The socket associated with this. */
   this._socket = null;
 
   /** The handler used to process requests to this server. */
@@ -358,18 +397,17 @@ function nsHttpServer() {
   this._connectionGen = 0;
 
   /**
    * Hash of all open connections, indexed by connection number at time of
    * creation.
    */
   this._connections = {};
 }
-nsHttpServer.prototype =
-{
+nsHttpServer.prototype = {
   // NSISERVERSOCKETLISTENER
 
   /**
    * Processes an incoming request coming in on the given socket and contained
    * in the given transport.
    *
    * @param socket : nsIServerSocket
    *   the socket through which the request was served
@@ -380,30 +418,38 @@ nsHttpServer.prototype =
   onSocketAccepted(socket, trans) {
     dumpn("*** onSocketAccepted(socket=" + socket + ", trans=" + trans + "