Merge inbound to mozilla-central r=merge a=merge
authorCoroiu Cristina <ccoroiu@mozilla.com>
Sat, 13 Jan 2018 11:55:23 +0200
changeset 399192 d6313a80c23ff009f78000393e0506ab13ac6cc9
parent 399191 c51cdba4c57d0e6b1c22e826d425c3329374fa35 (current diff)
parent 399127 4936907a3a91da2ca0908c31c66d6297bcde472a (diff)
child 399193 0c2c46f76180a7d170faebdc84c21ea619f8d784
child 399205 8c65a1c9b8d33e4affa5347d7dbbe62b9d39cb8c
push id98907
push userccoroiu@mozilla.com
push dateSat, 13 Jan 2018 10:06:46 +0000
treeherdermozilla-inbound@d6313a80c23f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge, merge
milestone59.0a1
first release with
nightly linux32
d6313a80c23f / 59.0a1 / 20180113100255 / files
nightly linux64
d6313a80c23f / 59.0a1 / 20180113100255 / files
nightly mac
d6313a80c23f / 59.0a1 / 20180113100255 / files
nightly win32
d6313a80c23f / 59.0a1 / 20180113100255 / files
nightly win64
d6313a80c23f / 59.0a1 / 20180113100255 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge inbound to mozilla-central r=merge a=merge
browser/base/content/test/general/browser_close_dependent_tabs.js
browser/components/sessionstore/test/browser_grouped_session_store.js
docshell/base/PendingGlobalHistoryEntry.cpp
docshell/base/PendingGlobalHistoryEntry.h
docshell/shistory/nsIGroupedSHistory.idl
docshell/shistory/nsIPartialSHistory.idl
docshell/shistory/nsIPartialSHistoryListener.idl
docshell/test/browser/browser_grouped_shistory_bfcache_cleaning.js
docshell/test/browser/browser_grouped_shistory_crossproc.js
docshell/test/browser/browser_grouped_shistory_dead_navigate.js
dom/base/GroupedSHistory.cpp
dom/base/GroupedSHistory.h
dom/base/PartialSHistory.cpp
dom/base/PartialSHistory.h
dom/base/nsDocument.cpp
dom/base/nsIDocument.h
dom/base/test/chrome/test_groupedSHistory.xul
dom/base/test/chrome/window_groupedSHistory.xul
dom/bindings/Codegen.py
dom/bindings/test/file_focuser.html
dom/bindings/test/file_fullScreenPropertyAccessor.html
dom/bindings/test/test_blacklisted_prerendering_function.xul
dom/bindings/test/test_kill_longrunning_prerendered_content.xul
dom/ipc/TabChild.cpp
dom/ipc/TabParent.cpp
dom/tests/browser/browser_prerendering.js
dom/tests/browser/prerender.html
dom/tests/browser/prerender_target.html
dom/xul/test/1061864.html
dom/xul/test/file_bug1069772.xul
dom/xul/test/file_bug1271240.xul
dom/xul/test/test_bug1061864_1.xul
dom/xul/test/test_bug1061864_2.xul
dom/xul/test/test_bug1069772.xul
dom/xul/test/test_bug1271240.xul
js/src/tests/test262/built-ins/BigInt/parseInt/all-decimal-digits.js
js/src/tests/test262/built-ins/BigInt/parseInt/arg-boolean.js
js/src/tests/test262/built-ins/BigInt/parseInt/arg-number.js
js/src/tests/test262/built-ins/BigInt/parseInt/arg-primitive-coercion.js
js/src/tests/test262/built-ins/BigInt/parseInt/arg-string-obj.js
js/src/tests/test262/built-ins/BigInt/parseInt/arg-undefined-null.js
js/src/tests/test262/built-ins/BigInt/parseInt/binary-negative.js
js/src/tests/test262/built-ins/BigInt/parseInt/binary.js
js/src/tests/test262/built-ins/BigInt/parseInt/decimal-negative.js
js/src/tests/test262/built-ins/BigInt/parseInt/empty-with-radix.js
js/src/tests/test262/built-ins/BigInt/parseInt/empty.js
js/src/tests/test262/built-ins/BigInt/parseInt/hex-prefix-lc.js
js/src/tests/test262/built-ins/BigInt/parseInt/hex-prefix-uc.js
js/src/tests/test262/built-ins/BigInt/parseInt/hex.js
js/src/tests/test262/built-ins/BigInt/parseInt/leading-cr.js
js/src/tests/test262/built-ins/BigInt/parseInt/leading-ff.js
js/src/tests/test262/built-ins/BigInt/parseInt/leading-lf.js
js/src/tests/test262/built-ins/BigInt/parseInt/leading-ls.js
js/src/tests/test262/built-ins/BigInt/parseInt/leading-nbsp.js
js/src/tests/test262/built-ins/BigInt/parseInt/leading-ps.js
js/src/tests/test262/built-ins/BigInt/parseInt/leading-space.js
js/src/tests/test262/built-ins/BigInt/parseInt/leading-tab.js
js/src/tests/test262/built-ins/BigInt/parseInt/leading-u180e.js
js/src/tests/test262/built-ins/BigInt/parseInt/leading-vt.js
js/src/tests/test262/built-ins/BigInt/parseInt/leading-ws.js
js/src/tests/test262/built-ins/BigInt/parseInt/length.js
js/src/tests/test262/built-ins/BigInt/parseInt/mixed-case-signed.js
js/src/tests/test262/built-ins/BigInt/parseInt/mixed-case-unsigned.js
js/src/tests/test262/built-ins/BigInt/parseInt/name.js
js/src/tests/test262/built-ins/BigInt/parseInt/no-prototype.js
js/src/tests/test262/built-ins/BigInt/parseInt/not-constructor.js
js/src/tests/test262/built-ins/BigInt/parseInt/octal-prefix.js
js/src/tests/test262/built-ins/BigInt/parseInt/parseInt.js
js/src/tests/test262/built-ins/BigInt/parseInt/prop-desc.js
js/src/tests/test262/built-ins/BigInt/parseInt/radix-37.js
js/src/tests/test262/built-ins/BigInt/parseInt/radix-boolean.js
js/src/tests/test262/built-ins/BigInt/parseInt/radix-int32.js
js/src/tests/test262/built-ins/BigInt/parseInt/radix-number-obj.js
js/src/tests/test262/built-ins/BigInt/parseInt/radix-one.js
js/src/tests/test262/built-ins/BigInt/parseInt/radix-primitive-coercion.js
js/src/tests/test262/built-ins/BigInt/parseInt/radix-string.js
js/src/tests/test262/built-ins/BigInt/parseInt/radix-undefined-or-null.js
js/src/tests/test262/built-ins/BigInt/parseInt/radix-undefined.js
js/src/tests/test262/built-ins/BigInt/parseInt/radix-zero.js
js/src/tests/test262/built-ins/BigInt/parseInt/trailing-code-point.js
js/src/tests/test262/built-ins/BigInt/parseInt/trailing-invalid-digit-lc.js
js/src/tests/test262/built-ins/BigInt/parseInt/trailing-invalid-digit-uc.js
js/src/tests/test262/built-ins/BigInt/parseInt/trailing-non-digit-and-digit.js
js/src/tests/test262/built-ins/BigInt/parseInt/trailing-non-digit-lc.js
js/src/tests/test262/built-ins/BigInt/parseInt/trailing-non-digit-uc.js
js/src/tests/test262/harness/testbuiltinobject-function-badstring.js
js/src/tests/test262/harness/testbuiltinobject-function-expected-length.js
js/src/tests/test262/harness/testbuiltinobject-function-not-constructor-no-error.js
js/src/tests/test262/harness/testbuiltinobject-function-not-constructor-no-typeerror.js
js/src/tests/test262/harness/testbuiltinobject-non-extensible.js
js/src/tests/test262/harness/testbuiltinobject-not-function-badstring.js
js/src/tests/test262/harness/testbuiltinobject-prop-enumerable.js
js/src/tests/test262/harness/testbuiltinobject-prop-missing.js
js/src/tests/test262/harness/testbuiltinobject-prop-not-configurable.js
js/src/tests/test262/harness/testbuiltinobject-prop-not-writable.js
js/src/tests/test262/harness/testbuiltinobject-undefined.js
js/src/tests/test262/intl402/6.2.2_a.js
js/src/tests/test262/intl402/6.2.2_b.js
js/src/tests/test262/intl402/6.2.2_c.js
js/src/tests/test262/intl402/6.2.3_a.js
js/src/tests/test262/intl402/6.2.4.js
js/src/tests/test262/intl402/9.1_a.js
js/src/tests/test262/intl402/9.1_b.js
js/src/tests/test262/intl402/9.2.1_1.js
js/src/tests/test262/intl402/9.2.1_2.js
js/src/tests/test262/intl402/9.2.1_3.js
js/src/tests/test262/intl402/9.2.1_4.js
js/src/tests/test262/intl402/9.2.1_8_c_ii.js
js/src/tests/test262/intl402/9.2.1_8_c_vi.js
js/src/tests/test262/intl402/9.2.2.js
js/src/tests/test262/intl402/9.2.3_5.js
js/src/tests/test262/intl402/9.2.5_6.js
js/src/tests/test262/intl402/9.2.6_2.js
js/src/tests/test262/intl402/9.2.6_4.js
js/src/tests/test262/intl402/9.2.6_4_b.js
js/src/tests/test262/intl402/9.2.6_4_c.js
js/src/tests/test262/intl402/9.2.8_1_c.js
js/src/tests/test262/intl402/9.2.8_4.js
js/src/tests/test262/intl402/Collator/10.1.1_1.js
js/src/tests/test262/intl402/Collator/10.1.1_10.js
js/src/tests/test262/intl402/Collator/10.1.1_11.js
js/src/tests/test262/intl402/Collator/10.1.1_13.js
js/src/tests/test262/intl402/Collator/10.1.1_19_b.js
js/src/tests/test262/intl402/Collator/10.1.1_19_c.js
js/src/tests/test262/intl402/Collator/10.1.1_20.js
js/src/tests/test262/intl402/Collator/10.1.1_23.js
js/src/tests/test262/intl402/Collator/10.1.1_6.js
js/src/tests/test262/intl402/Collator/10.1.1_a.js
js/src/tests/test262/intl402/Collator/10.1.2_a.js
js/src/tests/test262/intl402/Collator/10.1.3.js
js/src/tests/test262/intl402/Collator/10.1_L15.js
js/src/tests/test262/intl402/Collator/10.2.3_b.js
js/src/tests/test262/intl402/Collator/10.4_a.js
js/src/tests/test262/intl402/Collator/9.2.5_11_g_ii_2.js
js/src/tests/test262/intl402/Collator/prototype/10.2.1.js
js/src/tests/test262/intl402/Collator/prototype/10.3_L15.js
js/src/tests/test262/intl402/Collator/prototype/10.3_a.js
js/src/tests/test262/intl402/Collator/prototype/10.3_b.js
js/src/tests/test262/intl402/Collator/prototype/compare/10.3.2_1_a_L15.js
js/src/tests/test262/intl402/Collator/prototype/compare/10.3.2_1_c.js
js/src/tests/test262/intl402/Collator/prototype/compare/10.3.2_CS_a.js
js/src/tests/test262/intl402/Collator/prototype/compare/10.3.2_CS_b_NN.js
js/src/tests/test262/intl402/Collator/prototype/compare/10.3.2_CS_c_NN.js
js/src/tests/test262/intl402/Collator/prototype/compare/10.3.2_CS_d_NN.js
js/src/tests/test262/intl402/Collator/prototype/compare/10.3.2_L15.js
js/src/tests/test262/intl402/Collator/prototype/constructor/10.3.1.js
js/src/tests/test262/intl402/Collator/prototype/resolvedOptions/10.3.3.js
js/src/tests/test262/intl402/Collator/prototype/resolvedOptions/10.3.3_L15.js
js/src/tests/test262/intl402/Collator/supportedLocalesOf/10.2.2_L15.js
js/src/tests/test262/intl402/Collator/supportedLocalesOf/10.2.2_a.js
js/src/tests/test262/intl402/Collator/supportedLocalesOf/10.2.2_b.js
js/src/tests/test262/intl402/Date/prototype/13.3.0_1.js
js/src/tests/test262/intl402/Date/prototype/13.3.0_2.js
js/src/tests/test262/intl402/Date/prototype/13.3.0_6_1.js
js/src/tests/test262/intl402/Date/prototype/13.3.0_6_2.js
js/src/tests/test262/intl402/Date/prototype/13.3.0_7.js
js/src/tests/test262/intl402/Date/prototype/toLocaleDateString/13.3.2_L15.js
js/src/tests/test262/intl402/Date/prototype/toLocaleString/13.3.1_L15.js
js/src/tests/test262/intl402/Date/prototype/toLocaleTimeString/13.3.3_L15.js
js/src/tests/test262/intl402/DateTimeFormat/12.1.1_1.js
js/src/tests/test262/intl402/DateTimeFormat/12.1.1_18.js
js/src/tests/test262/intl402/DateTimeFormat/12.1.1_22.js
js/src/tests/test262/intl402/DateTimeFormat/12.1.1_23.js
js/src/tests/test262/intl402/DateTimeFormat/12.1.1_25.js
js/src/tests/test262/intl402/DateTimeFormat/12.1.1_5.js
js/src/tests/test262/intl402/DateTimeFormat/12.1.1_6.js
js/src/tests/test262/intl402/DateTimeFormat/12.1.1_TDTO.js
js/src/tests/test262/intl402/DateTimeFormat/12.1.1_a.js
js/src/tests/test262/intl402/DateTimeFormat/12.1.2.js
js/src/tests/test262/intl402/DateTimeFormat/12.1.3.js
js/src/tests/test262/intl402/DateTimeFormat/12.1_L15.js
js/src/tests/test262/intl402/DateTimeFormat/12.2.3_b.js
js/src/tests/test262/intl402/DateTimeFormat/12.2.3_c.js
js/src/tests/test262/intl402/DateTimeFormat/12.4_a.js
js/src/tests/test262/intl402/DateTimeFormat/6.4_a.js
js/src/tests/test262/intl402/DateTimeFormat/6.4_b.js
js/src/tests/test262/intl402/DateTimeFormat/6.4_c.js
js/src/tests/test262/intl402/DateTimeFormat/prototype/12.2.1.js
js/src/tests/test262/intl402/DateTimeFormat/prototype/12.3_L15.js
js/src/tests/test262/intl402/DateTimeFormat/prototype/12.3_a.js
js/src/tests/test262/intl402/DateTimeFormat/prototype/12.3_b.js
js/src/tests/test262/intl402/DateTimeFormat/prototype/constructor/12.3.1.js
js/src/tests/test262/intl402/DateTimeFormat/prototype/format/12.3.2_1_a_L15.js
js/src/tests/test262/intl402/DateTimeFormat/prototype/format/12.3.2_1_c.js
js/src/tests/test262/intl402/DateTimeFormat/prototype/format/12.3.2_FDT_1.js
js/src/tests/test262/intl402/DateTimeFormat/prototype/format/12.3.2_FDT_7_a_iv.js
js/src/tests/test262/intl402/DateTimeFormat/prototype/format/12.3.2_L15.js
js/src/tests/test262/intl402/DateTimeFormat/prototype/format/12.3.2_TLT_2.js
js/src/tests/test262/intl402/DateTimeFormat/prototype/resolvedOptions/12.3.3.js
js/src/tests/test262/intl402/DateTimeFormat/prototype/resolvedOptions/12.3.3_L15.js
js/src/tests/test262/intl402/DateTimeFormat/supportedLocalesOf/12.2.2_L15.js
js/src/tests/test262/intl402/DateTimeFormat/supportedLocalesOf/12.2.2_a.js
js/src/tests/test262/intl402/DateTimeFormat/supportedLocalesOf/12.2.2_b.js
js/src/tests/test262/intl402/Intl/8.0.js
js/src/tests/test262/intl402/Intl/8.0_L15.js
js/src/tests/test262/intl402/Number/prototype/toLocaleString/13.2.1_1.js
js/src/tests/test262/intl402/Number/prototype/toLocaleString/13.2.1_4_1.js
js/src/tests/test262/intl402/Number/prototype/toLocaleString/13.2.1_4_2.js
js/src/tests/test262/intl402/Number/prototype/toLocaleString/13.2.1_5.js
js/src/tests/test262/intl402/Number/prototype/toLocaleString/13.2.1_L15.js
js/src/tests/test262/intl402/NumberFormat/11.1.1_1.js
js/src/tests/test262/intl402/NumberFormat/11.1.1_15.js
js/src/tests/test262/intl402/NumberFormat/11.1.1_17.js
js/src/tests/test262/intl402/NumberFormat/11.1.1_19.js
js/src/tests/test262/intl402/NumberFormat/11.1.1_20_c.js
js/src/tests/test262/intl402/NumberFormat/11.1.1_21.js
js/src/tests/test262/intl402/NumberFormat/11.1.1_32.js
js/src/tests/test262/intl402/NumberFormat/11.1.1_34.js
js/src/tests/test262/intl402/NumberFormat/11.1.1_6.js
js/src/tests/test262/intl402/NumberFormat/11.1.1_7.js
js/src/tests/test262/intl402/NumberFormat/11.1.1_a.js
js/src/tests/test262/intl402/NumberFormat/11.1.2.js
js/src/tests/test262/intl402/NumberFormat/11.1.3.js
js/src/tests/test262/intl402/NumberFormat/11.1_L15.js
js/src/tests/test262/intl402/NumberFormat/11.2.3_b.js
js/src/tests/test262/intl402/NumberFormat/11.4_a.js
js/src/tests/test262/intl402/NumberFormat/6.3.1_a.js
js/src/tests/test262/intl402/NumberFormat/6.3.1_b.js
js/src/tests/test262/intl402/NumberFormat/prototype/11.2.1.js
js/src/tests/test262/intl402/NumberFormat/prototype/11.3_L15.js
js/src/tests/test262/intl402/NumberFormat/prototype/11.3_a.js
js/src/tests/test262/intl402/NumberFormat/prototype/11.3_b.js
js/src/tests/test262/intl402/NumberFormat/prototype/constructor/11.3.1.js
js/src/tests/test262/intl402/NumberFormat/prototype/format/11.3.2_1_a_L15.js
js/src/tests/test262/intl402/NumberFormat/prototype/format/11.3.2_1_a_ii.js
js/src/tests/test262/intl402/NumberFormat/prototype/format/11.3.2_1_c.js
js/src/tests/test262/intl402/NumberFormat/prototype/format/11.3.2_FN_1.js
js/src/tests/test262/intl402/NumberFormat/prototype/format/11.3.2_FN_2.js
js/src/tests/test262/intl402/NumberFormat/prototype/format/11.3.2_FN_3_b.js
js/src/tests/test262/intl402/NumberFormat/prototype/format/11.3.2_FN_3_e.js
js/src/tests/test262/intl402/NumberFormat/prototype/format/11.3.2_L15.js
js/src/tests/test262/intl402/NumberFormat/prototype/format/11.3.2_TRF.js
js/src/tests/test262/intl402/NumberFormat/prototype/format/11.3.2_TRP.js
js/src/tests/test262/intl402/NumberFormat/prototype/resolvedOptions/11.3.3.js
js/src/tests/test262/intl402/NumberFormat/prototype/resolvedOptions/11.3.3_L15.js
js/src/tests/test262/intl402/NumberFormat/supportedLocalesOf/11.2.2_L15.js
js/src/tests/test262/intl402/NumberFormat/supportedLocalesOf/11.2.2_a.js
js/src/tests/test262/intl402/NumberFormat/supportedLocalesOf/11.2.2_b.js
js/src/tests/test262/intl402/String/prototype/localeCompare/13.1.1_1.js
js/src/tests/test262/intl402/String/prototype/localeCompare/13.1.1_2.js
js/src/tests/test262/intl402/String/prototype/localeCompare/13.1.1_3_1.js
js/src/tests/test262/intl402/String/prototype/localeCompare/13.1.1_3_2.js
js/src/tests/test262/intl402/String/prototype/localeCompare/13.1.1_6_1.js
js/src/tests/test262/intl402/String/prototype/localeCompare/13.1.1_6_2.js
js/src/tests/test262/intl402/String/prototype/localeCompare/13.1.1_7.js
js/src/tests/test262/intl402/String/prototype/localeCompare/13.1.1_L15.js
js/src/tests/test262/language/expressions/assignment/11.13.1-4-28-s-strict.js
js/src/tests/test262/language/expressions/assignment/11.13.1-4-29-s-strict.js
js/src/tests/test262/language/expressions/assignment/11.13.1-4-30-s-strict.js
js/src/tests/test262/language/expressions/assignment/11.13.1-4-31-s-strict.js
js/src/tests/test262/language/expressions/assignment/S11.13.1_A1.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-gen-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-gen-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-gen-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-gen-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-method-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-method-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-method-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-method-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-async-gen-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-async-gen-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-async-gen-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-async-gen-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-async-method-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-async-method-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-async-method-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-async-method-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-gen-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-gen-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-gen-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-gen-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-method-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-method-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-method-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-after-same-line-static-method-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-computed-name-static-propname-constructor.js
js/src/tests/test262/language/expressions/class/fields-computed-name-static-propname-prototype.js
js/src/tests/test262/language/expressions/class/fields-computed-variable-name-static-propname-constructor.js
js/src/tests/test262/language/expressions/class/fields-computed-variable-name-static-propname-prototype.js
js/src/tests/test262/language/expressions/class/fields-literal-name-static-propname-constructor.js
js/src/tests/test262/language/expressions/class/fields-literal-name-static-propname-prototype.js
js/src/tests/test262/language/expressions/class/fields-multiple-definitions-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-multiple-definitions-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-multiple-definitions-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-multiple-definitions-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-multiple-stacked-definitions-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-multiple-stacked-definitions-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-multiple-stacked-definitions-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-multiple-stacked-definitions-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-new-no-sc-line-method-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-new-no-sc-line-method-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-new-no-sc-line-method-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-new-no-sc-line-method-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-new-sc-line-gen-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-new-sc-line-gen-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-new-sc-line-gen-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-new-sc-line-gen-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-new-sc-line-method-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-new-sc-line-method-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-new-sc-line-method-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-new-sc-line-method-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-regular-definitions-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-regular-definitions-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-regular-definitions-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-regular-definitions-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-async-gen-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-async-gen-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-async-gen-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-async-gen-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-async-method-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-async-method-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-async-method-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-async-method-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-gen-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-gen-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-gen-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-gen-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-method-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-method-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-method-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-same-line-method-static-private-names.js
js/src/tests/test262/language/expressions/class/fields-static-comp-name-init-err-contains-arguments.js
js/src/tests/test262/language/expressions/class/fields-static-comp-name-init-err-contains-super.js
js/src/tests/test262/language/expressions/class/fields-static-computed-name-toprimitive-symbol.js
js/src/tests/test262/language/expressions/class/fields-static-computed-name-toprimitive.js
js/src/tests/test262/language/expressions/class/fields-static-literal-init-err-contains-arguments.js
js/src/tests/test262/language/expressions/class/fields-static-literal-init-err-contains-super.js
js/src/tests/test262/language/expressions/class/fields-static-private-init-err-contains-arguments.js
js/src/tests/test262/language/expressions/class/fields-static-private-init-err-contains-super.js
js/src/tests/test262/language/expressions/class/fields-static-redeclaration-symbol.js
js/src/tests/test262/language/expressions/class/fields-static-redeclaration.js
js/src/tests/test262/language/expressions/class/fields-static-string-literal-name-init-err-contains-arguments.js
js/src/tests/test262/language/expressions/class/fields-static-string-literal-name-init-err-contains-super.js
js/src/tests/test262/language/expressions/class/fields-string-name-static-propname-constructor.js
js/src/tests/test262/language/expressions/class/fields-string-name-static-propname-prototype.js
js/src/tests/test262/language/expressions/class/fields-wrapped-in-sc-static-computed-names.js
js/src/tests/test262/language/expressions/class/fields-wrapped-in-sc-static-computed-symbol-names.js
js/src/tests/test262/language/expressions/class/fields-wrapped-in-sc-static-literal-names.js
js/src/tests/test262/language/expressions/class/fields-wrapped-in-sc-static-private-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-gen-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-gen-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-gen-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-gen-static-private-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-method-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-method-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-method-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-method-static-private-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-async-gen-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-async-gen-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-async-gen-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-async-gen-static-private-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-async-method-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-async-method-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-async-method-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-async-method-static-private-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-gen-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-gen-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-gen-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-gen-static-private-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-method-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-method-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-method-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-after-same-line-static-method-static-private-names.js
js/src/tests/test262/language/statements/class/fields-comp-name-init-err-contains-arguments.js
js/src/tests/test262/language/statements/class/fields-comp-name-init-err-contains-super.js
js/src/tests/test262/language/statements/class/fields-computed-name-static-propname-constructor.js
js/src/tests/test262/language/statements/class/fields-computed-name-static-propname-prototype.js
js/src/tests/test262/language/statements/class/fields-computed-variable-name-static-propname-constructor.js
js/src/tests/test262/language/statements/class/fields-computed-variable-name-static-propname-prototype.js
js/src/tests/test262/language/statements/class/fields-literal-name-static-propname-constructor.js
js/src/tests/test262/language/statements/class/fields-literal-name-static-propname-prototype.js
js/src/tests/test262/language/statements/class/fields-multiple-definitions-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-multiple-definitions-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-multiple-definitions-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-multiple-definitions-static-private-names.js
js/src/tests/test262/language/statements/class/fields-multiple-stacked-definitions-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-multiple-stacked-definitions-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-multiple-stacked-definitions-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-multiple-stacked-definitions-static-private-names.js
js/src/tests/test262/language/statements/class/fields-new-no-sc-line-method-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-new-no-sc-line-method-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-new-no-sc-line-method-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-new-no-sc-line-method-static-private-names.js
js/src/tests/test262/language/statements/class/fields-new-sc-line-gen-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-new-sc-line-gen-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-new-sc-line-gen-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-new-sc-line-gen-static-private-names.js
js/src/tests/test262/language/statements/class/fields-new-sc-line-method-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-new-sc-line-method-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-new-sc-line-method-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-new-sc-line-method-static-private-names.js
js/src/tests/test262/language/statements/class/fields-regular-definitions-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-regular-definitions-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-regular-definitions-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-regular-definitions-static-private-names.js
js/src/tests/test262/language/statements/class/fields-same-line-async-gen-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-same-line-async-gen-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-same-line-async-gen-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-same-line-async-gen-static-private-names.js
js/src/tests/test262/language/statements/class/fields-same-line-async-method-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-same-line-async-method-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-same-line-async-method-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-same-line-async-method-static-private-names.js
js/src/tests/test262/language/statements/class/fields-same-line-gen-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-same-line-gen-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-same-line-gen-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-same-line-gen-static-private-names.js
js/src/tests/test262/language/statements/class/fields-same-line-method-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-same-line-method-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-same-line-method-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-same-line-method-static-private-names.js
js/src/tests/test262/language/statements/class/fields-static-comp-name-init-err-contains-arguments.js
js/src/tests/test262/language/statements/class/fields-static-comp-name-init-err-contains-super.js
js/src/tests/test262/language/statements/class/fields-static-computed-name-toprimitive-symbol.js
js/src/tests/test262/language/statements/class/fields-static-computed-name-toprimitive.js
js/src/tests/test262/language/statements/class/fields-static-literal-init-err-contains-arguments.js
js/src/tests/test262/language/statements/class/fields-static-literal-init-err-contains-super.js
js/src/tests/test262/language/statements/class/fields-static-private-init-err-contains-arguments.js
js/src/tests/test262/language/statements/class/fields-static-private-init-err-contains-super.js
js/src/tests/test262/language/statements/class/fields-static-redeclaration-symbol.js
js/src/tests/test262/language/statements/class/fields-static-redeclaration.js
js/src/tests/test262/language/statements/class/fields-static-string-literal-name-init-err-contains-arguments.js
js/src/tests/test262/language/statements/class/fields-static-string-literal-name-init-err-contains-super.js
js/src/tests/test262/language/statements/class/fields-string-name-static-propname-constructor.js
js/src/tests/test262/language/statements/class/fields-string-name-static-propname-prototype.js
js/src/tests/test262/language/statements/class/fields-wrapped-in-sc-static-computed-names.js
js/src/tests/test262/language/statements/class/fields-wrapped-in-sc-static-computed-symbol-names.js
js/src/tests/test262/language/statements/class/fields-wrapped-in-sc-static-literal-names.js
js/src/tests/test262/language/statements/class/fields-wrapped-in-sc-static-private-names.js
js/src/tests/test262/language/statements/class/static-classelementname-abrupt-completion.js
js/src/tests/test262/language/statements/class/static-fielddefinition-initializer-abrupt-completion.js
toolkit/components/telemetry/Scalars.yaml
--- a/.taskcluster.yml
+++ b/.taskcluster.yml
@@ -93,17 +93,17 @@ tasks:
               GECKO_HEAD_REPOSITORY: '${repoUrl}'
               GECKO_HEAD_REF: '${push.revision}'
               GECKO_HEAD_REV: '${push.revision}'
               GECKO_COMMIT_MSG: {$if: 'tasks_for != "action"', then: '${push.comment}'}
               HG_STORE_PATH: /builds/worker/checkouts/hg-store
               TASKCLUSTER_CACHES: /builds/worker/checkouts
             - $if: 'tasks_for == "action"'
               then:
-                ACTION_TASK_GROUP_ID: '${action.taskGroupId}'
+                ACTION_TASK_GROUP_ID: '${ownTaskId}'
                 ACTION_TASK_ID: {$json: {$eval: 'taskId'}}
                 ACTION_TASK: {$json: {$eval: 'task'}}
                 ACTION_INPUT: {$json: {$eval: 'input'}}
                 ACTION_CALLBACK: '${action.cb_name}'
                 ACTION_PARAMETERS: {$json: {$eval: 'parameters'}}
 
         cache:
           level-${repository.level}-checkouts-sparse-v1: /builds/worker/checkouts
@@ -180,9 +180,12 @@ tasks:
               parent: '${action.taskGroupId}'
               action:
                 name: '${action.name}'
                 context:
                   taskGroupId: '${action.taskGroupId}'
                   taskId: {$eval: 'taskId'}
                   input: {$eval: 'input'}
                   parameters: {$eval: 'parameters'}
+          - $if: 'tasks_for == "cron"'
+            then:
+              cron: {$json: {$eval: 'cron'}}
           - tasks_for: '${tasks_for}'
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -597,108 +597,16 @@ addEventListener("unload", () => {
 }, false);
 
 addMessageListener("Browser:AppTab", function(message) {
   if (docShell) {
     docShell.isAppTab = message.data.isAppTab;
   }
 });
 
-let PrerenderContentHandler = {
-  init() {
-    this._pending = [];
-    this._idMonotonic = 0;
-    this._initialized = true;
-    addMessageListener("Prerender:Canceled", this);
-    addMessageListener("Prerender:Swapped", this);
-  },
-
-  get initialized() {
-    return !!this._initialized;
-  },
-
-  receiveMessage(aMessage) {
-    switch (aMessage.name) {
-      case "Prerender:Canceled": {
-        for (let i = 0; i < this._pending.length; ++i) {
-          if (this._pending[i].id === aMessage.data.id) {
-            if (this._pending[i].failure) {
-              this._pending[i].failure.run();
-            }
-            // Remove the item from the array
-            this._pending.splice(i, 1);
-            break;
-          }
-        }
-        break;
-      }
-      case "Prerender:Swapped": {
-        for (let i = 0; i < this._pending.length; ++i) {
-          if (this._pending[i].id === aMessage.data.id) {
-            if (this._pending[i].success) {
-              this._pending[i].success.run();
-            }
-            // Remove the item from the array
-            this._pending.splice(i, 1);
-            break;
-          }
-        }
-        break;
-      }
-    }
-  },
-
-  startPrerenderingDocument(aHref, aReferrer, aTriggeringPrincipal) {
-    // XXX: Make this constant a pref
-    if (this._pending.length >= 2) {
-      return;
-    }
-
-    let id = ++this._idMonotonic;
-    sendAsyncMessage("Prerender:Request", {
-      href: aHref.spec,
-      referrer: aReferrer ? aReferrer.spec : null,
-      id,
-      triggeringPrincipal: Utils.serializePrincipal(aTriggeringPrincipal),
-    });
-
-    this._pending.push({
-      href: aHref,
-      referrer: aReferrer,
-      id,
-      success: null,
-      failure: null,
-    });
-  },
-
-  shouldSwitchToPrerenderedDocument(aHref, aReferrer, aSuccess, aFailure) {
-    // Check if we think there is a prerendering document pending for the given
-    // href and referrer. If we think there is one, we will send a message to
-    // the parent process asking it to do a swap, and hook up the success and
-    // failure listeners.
-    for (let i = 0; i < this._pending.length; ++i) {
-      let p = this._pending[i];
-      if (p.href.equals(aHref) && p.referrer.equals(aReferrer)) {
-        p.success = aSuccess;
-        p.failure = aFailure;
-        sendAsyncMessage("Prerender:Swap", {id: p.id});
-        return true;
-      }
-    }
-
-    return false;
-  }
-};
-
-if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) {
-  // We only want to initialize the PrerenderContentHandler in the content
-  // process. Outside of the content process, this should be unused.
-  PrerenderContentHandler.init();
-}
-
 var WebBrowserChrome = {
   onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab) {
     return BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab);
   },
 
   // Check whether this URI should load in the current process
   shouldLoadURI(aDocShell, aURI, aReferrer, aHasPostData, aTriggeringPrincipal) {
     if (!E10SUtils.shouldLoadURI(aDocShell, aURI, aReferrer, aHasPostData)) {
@@ -712,30 +620,16 @@ var WebBrowserChrome = {
   shouldLoadURIInThisProcess(aURI) {
     return E10SUtils.shouldLoadURIInThisProcess(aURI);
   },
 
   // Try to reload the currently active or currently loading page in a new process.
   reloadInFreshProcess(aDocShell, aURI, aReferrer, aTriggeringPrincipal, aLoadFlags) {
     E10SUtils.redirectLoad(aDocShell, aURI, aReferrer, aTriggeringPrincipal, true, aLoadFlags);
     return true;
-  },
-
-  startPrerenderingDocument(aHref, aReferrer, aTriggeringPrincipal) {
-    if (PrerenderContentHandler.initialized) {
-      PrerenderContentHandler.startPrerenderingDocument(aHref, aReferrer, aTriggeringPrincipal);
-    }
-  },
-
-  shouldSwitchToPrerenderedDocument(aHref, aReferrer, aSuccess, aFailure) {
-    if (PrerenderContentHandler.initialized) {
-      return PrerenderContentHandler.shouldSwitchToPrerenderedDocument(
-        aHref, aReferrer, aSuccess, aFailure);
-    }
-    return false;
   }
 };
 
 if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) {
   let tabchild = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                          .getInterface(Ci.nsITabChild);
   tabchild.webBrowserChrome = WebBrowserChrome;
 }
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1727,17 +1727,16 @@
             var aForceNotRemote;
             var aPreferredRemoteType;
             var aNoReferrer;
             var aUserContextId;
             var aSameProcessAsFrameLoader;
             var aOriginPrincipal;
             var aOpener;
             var aOpenerBrowser;
-            var aIsPrerendered;
             var aCreateLazyBrowser;
             var aNextTabParentId;
             var aFocusUrlBar;
             var aName;
             if (arguments.length == 2 &&
                 typeof arguments[1] == "object" &&
                 !(arguments[1] instanceof Ci.nsIURI)) {
               let params = arguments[1];
@@ -1755,17 +1754,16 @@
               aForceNotRemote           = params.forceNotRemote;
               aPreferredRemoteType      = params.preferredRemoteType;
               aNoReferrer               = params.noReferrer;
               aUserContextId            = params.userContextId;
               aSameProcessAsFrameLoader = params.sameProcessAsFrameLoader;
               aOriginPrincipal          = params.originPrincipal;
               aOpener                   = params.opener;
               aOpenerBrowser            = params.openerBrowser;
-              aIsPrerendered            = params.isPrerendered;
               aCreateLazyBrowser        = params.createLazyBrowser;
               aNextTabParentId          = params.nextTabParentId;
               aFocusUrlBar              = params.focusUrlBar;
               aName                     = params.name;
             }
 
             var bgLoad = (aLoadInBackground != null) ? aLoadInBackground :
                          Services.prefs.getBoolPref("browser.tabs.loadInBackground");
@@ -1787,17 +1785,16 @@
                                   createLazyBrowser: aCreateLazyBrowser,
                                   preferredRemoteType: aPreferredRemoteType,
                                   noReferrer: aNoReferrer,
                                   userContextId: aUserContextId,
                                   originPrincipal: aOriginPrincipal,
                                   sameProcessAsFrameLoader: aSameProcessAsFrameLoader,
                                   opener: aOpener,
                                   openerBrowser: aOpenerBrowser,
-                                  isPrerendered: aIsPrerendered,
                                   nextTabParentId: aNextTabParentId,
                                   focusUrlBar: aFocusUrlBar,
                                   name: aName });
             if (!bgLoad)
               this.selectedTab = tab;
 
             return tab;
          ]]>
@@ -2196,32 +2193,28 @@
       </method>
 
       <method name="_createBrowser">
         <parameter name="aParams"/>
         <body>
           <![CDATA[
             // Supported parameters:
             // userContextId, remote, remoteType, isPreloadBrowser,
-            // uriIsAboutBlank, sameProcessAsFrameLoader, isPrerendered
+            // uriIsAboutBlank, sameProcessAsFrameLoader
 
             const NS_XUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 
             let b = document.createElementNS(NS_XUL, "browser");
             b.permanentKey = {};
             b.setAttribute("type", "content");
             b.setAttribute("message", "true");
             b.setAttribute("messagemanagergroup", "browsers");
             b.setAttribute("contextmenu", this.getAttribute("contentcontextmenu"));
             b.setAttribute("tooltip", this.getAttribute("contenttooltip"));
 
-            if (aParams.isPrerendered) {
-              b.setAttribute("prerendered", "true");
-            }
-
             if (aParams.userContextId) {
               b.setAttribute("usercontextid", aParams.userContextId);
             }
 
             // remote parameter used by some addons, use default in this case.
             if (aParams.remote && !aParams.remoteType) {
               aParams.remoteType = E10SUtils.DEFAULT_REMOTE_TYPE;
             }
@@ -2600,17 +2593,16 @@
             var aNoReferrer;
             var aUserContextId;
             var aEventDetail;
             var aSameProcessAsFrameLoader;
             var aOriginPrincipal;
             var aDisallowInheritPrincipal;
             var aOpener;
             var aOpenerBrowser;
-            var aIsPrerendered;
             var aCreateLazyBrowser;
             var aSkipBackgroundNotify;
             var aNextTabParentId;
             var aNoInitialLabel;
             var aFocusUrlBar;
             var aName;
             if (arguments.length == 2 &&
                 typeof arguments[1] == "object" &&
@@ -2632,17 +2624,16 @@
               aNoReferrer               = params.noReferrer;
               aUserContextId            = params.userContextId;
               aEventDetail              = params.eventDetail;
               aSameProcessAsFrameLoader = params.sameProcessAsFrameLoader;
               aOriginPrincipal          = params.originPrincipal;
               aDisallowInheritPrincipal = params.disallowInheritPrincipal;
               aOpener                   = params.opener;
               aOpenerBrowser            = params.openerBrowser;
-              aIsPrerendered            = params.isPrerendered;
               aCreateLazyBrowser        = params.createLazyBrowser;
               aSkipBackgroundNotify     = params.skipBackgroundNotify;
               aNextTabParentId          = params.nextTabParentId;
               aNoInitialLabel           = params.noInitialLabel;
               aFocusUrlBar              = params.focusUrlBar;
               aName                     = params.name;
             }
 
@@ -2690,20 +2681,16 @@
               if (isBlankPageURL(aURI)) {
                 t.setAttribute("label", gTabBrowserBundle.GetStringFromName("tabs.emptyTabTitle"));
               } else {
                 // Set URL as label so that the tab isn't empty initially.
                 this.setInitialTabTitle(t, aURI, { beforeTabOpen: true });
               }
             }
 
-            if (aIsPrerendered) {
-              t.setAttribute("hidden", "true");
-            }
-
             // Related tab inherits current tab's user context unless a different
             // usercontextid is specified
             if (aUserContextId == null && openerTab) {
               aUserContextId = openerTab.getAttribute("usercontextid") || 0;
             }
 
             if (aUserContextId) {
               t.setAttribute("usercontextid", aUserContextId);
@@ -2790,17 +2777,16 @@
 
               if (!b) {
                 // No preloaded browser found, create one.
                 b = this._createBrowser({ remoteType,
                                           uriIsAboutBlank,
                                           userContextId: aUserContextId,
                                           sameProcessAsFrameLoader: aSameProcessAsFrameLoader,
                                           openerWindow: aOpener,
-                                          isPrerendered: aIsPrerendered,
                                           nextTabParentId: aNextTabParentId,
                                           name: aName });
               }
 
               t.linkedBrowser = b;
 
               if (aFocusUrlBar) {
                 b._urlbarFocused = true;
@@ -5819,86 +5805,16 @@
 
                 notificationBox.appendNotification(message, "refresh-blocked",
                                                    "chrome://browser/skin/notification-icons/popup.svg",
                                                    notificationBox.PRIORITY_INFO_MEDIUM,
                                                    buttons);
               }
               break;
             }
-
-            case "Prerender:Request": {
-              let sendCancelPrerendering = () => {
-                browser.frameloader.messageManager.
-                  sendAsyncMessage("Prerender:Canceled", { id: data.id });
-              };
-
-              let tab = this.getTabForBrowser(browser);
-              if (!tab) {
-                // No tab?
-                sendCancelPrerendering();
-                break;
-              }
-
-              if (tab.hidden) {
-                // Skip prerender on hidden tab.
-                sendCancelPrerendering();
-                break;
-              }
-
-              if (browser.canGoForward) {
-                // Skip prerender on history navigation as we don't support it
-                // yet. Remove this check once bug 1323650 is implemented.
-                sendCancelPrerendering();
-                break;
-              }
-
-              if (!data.href) {
-                // If we don't have data.href, loadOneTab will load about:blank
-                // which is meaningless for prerendering.
-                sendCancelPrerendering();
-                break;
-              }
-
-              let groupedSHistory = browser.frameLoader.ensureGroupedSHistory();
-
-              let newTab = this.loadOneTab(data.href, {
-                referrerURI: (data.referrer ? makeURI(data.referrer) : null),
-                referrerPolicy: Ci.nsIHttpChannel.REFERRER_POLICY_UNSET,
-                postData: null,
-                allowThirdPartyFixup: true,
-                relatedToCurrent: true,
-                isPrerendered: true,
-                triggeringPrincipal: Utils.deserializePrincipal(data.triggeringPrincipal),
-              });
-              let partialSHistory = newTab.linkedBrowser.frameLoader.partialSHistory;
-              groupedSHistory.addPrerenderingPartialSHistory(partialSHistory, data.id);
-              break;
-            }
-
-            case "Prerender:Cancel": {
-              let groupedSHistory = browser.frameLoader.groupedSHistory;
-              if (groupedSHistory) {
-                groupedSHistory.cancelPrerendering(data.id);
-              }
-              break;
-            }
-
-            case "Prerender:Swap": {
-              let frameloader = browser.frameLoader;
-              let groupedSHistory = browser.frameLoader.groupedSHistory;
-              if (groupedSHistory) {
-                groupedSHistory.activatePrerendering(data.id).then(
-                  () => frameloader.messageManager.sendAsyncMessage("Prerender:Swapped", data),
-                  () => frameloader.messageManager.sendAsyncMessage("Prerender:Canceled", data),
-                );
-              }
-              break;
-            }
-
           }
           return undefined;
         ]]></body>
       </method>
 
       <method name="observe">
         <parameter name="aSubject"/>
         <parameter name="aTopic"/>
@@ -6055,21 +5971,16 @@
           messageManager.addMessageListener("Browser:WindowCreated", this);
 
           // To correctly handle keypresses for potential FindAsYouType, while
           // the tab's find bar is not yet initialized.
           this._findAsYouType = Services.prefs.getBoolPref("accessibility.typeaheadfind");
           Services.prefs.addObserver("accessibility.typeaheadfind", this);
           messageManager.addMessageListener("Findbar:Keypress", this);
 
-          // Add listeners for prerender messages
-          messageManager.addMessageListener("Prerender:Request", this);
-          messageManager.addMessageListener("Prerender:Cancel", this);
-          messageManager.addMessageListener("Prerender:Swap", this);
-
           XPCOMUtils.defineLazyPreferenceGetter(this, "animationsEnabled",
                                                 "toolkit.cosmeticAnimations.enabled", true);
           XPCOMUtils.defineLazyPreferenceGetter(this, "schedulePressureDefaultCount",
                                                 "browser.schedulePressure.defaultCount", 3);
           XPCOMUtils.defineLazyPreferenceGetter(this, "tabWarmingEnabled",
                                                 "browser.tabs.remote.warmup.enabled", false);
           XPCOMUtils.defineLazyPreferenceGetter(this, "tabWarmingMax",
                                                 "browser.tabs.remote.warmup.maxTabs", 3);
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -583,11 +583,8 @@ tags = fullscreen
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_newWindowDrop.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_newwindow_focus.js]
 skip-if = (os == "linux" && !e10s) # Bug 1263254 - Perma fails on Linux without e10s for some reason.
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_bug1299667.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
-[browser_close_dependent_tabs.js]
-skip-if = !e10s # GroupedSHistory is e10s-only
-# DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
deleted file mode 100644
--- a/browser/base/content/test/general/browser_close_dependent_tabs.js
+++ /dev/null
@@ -1,78 +0,0 @@
-add_task(async function() {
-  await SpecialPowers.pushPrefEnv({
-    set: [["browser.groupedhistory.enabled", true],
-          ["dom.linkPrerender.enabled", true]]
-  });
-
-  // Wait for a process change and then fulfil the promise.
-  function awaitProcessChange(browser) {
-    return new Promise(resolve => {
-      browser.addEventListener("BrowserChangedProcess", function(e) {
-        ok(true, "The browser changed process!");
-        resolve();
-      }, {once: true});
-    });
-  }
-
-  // Wait for given number tabs being closed.
-  function awaitTabClose(number) {
-    return new Promise(resolve => {
-      let seen = 0;
-      gBrowser.tabContainer.addEventListener("TabClose", function f() {
-        if (++seen == number) {
-          gBrowser.tabContainer.removeEventListener("TabClose", f);
-          resolve();
-        }
-      });
-    });
-  }
-
-  // Test 1: Create prerendered browser, and don't switch to it, then close the tab
-  let closed1 = awaitTabClose(2);
-  await BrowserTestUtils.withNewTab({ gBrowser, url: "data:text/html,a" }, async function(browser1) {
-    // Set up the grouped SHEntry setup
-
-    let requestMade = new Promise(resolve => {
-      browser1.messageManager.addMessageListener("Prerender:Request", function f() {
-        browser1.messageManager.removeMessageListener("Prerender:Request", f);
-        ok(true, "Successfully received the prerender request");
-        resolve();
-      });
-    });
-
-    is(gBrowser.tabs.length, 2);
-    await ContentTask.spawn(browser1, null, function() {
-      let link = content.document.createElement("link");
-      link.setAttribute("rel", "prerender");
-      link.setAttribute("href", "data:text/html,b");
-      content.document.body.appendChild(link);
-    });
-    await requestMade;
-
-    is(gBrowser.tabs.length, 3);
-  });
-  await closed1;
-
-  // At this point prerendered tab should be closed
-  is(gBrowser.tabs.length, 1, "The new tab and the prerendered 'tab' should be closed");
-
-  // Test 2: Create prerendered browser, switch to it, then close the tab
-  let closed2 = awaitTabClose(2);
-  await BrowserTestUtils.withNewTab({ gBrowser, url: "data:text/html,a" }, async function(browser1) {
-    // Set up the grouped SHEntry setup
-    let tab2 = gBrowser.loadOneTab("data:text/html,b", {
-      referrerPolicy: Ci.nsIHttpChannel.REFERRER_POLICY_UNSET,
-      allowThirdPartyFixup: true,
-      relatedToCurrent: true,
-      isPrerendered: true,
-      triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
-    });
-    await BrowserTestUtils.browserLoaded(tab2.linkedBrowser);
-    browser1.frameLoader.appendPartialSHistoryAndSwap(tab2.linkedBrowser.frameLoader);
-    await awaitProcessChange(browser1);
-  });
-  await closed2;
-
-  // At this point prerendered tab should be closed
-  is(gBrowser.tabs.length, 1, "The new tab and the prerendered 'tab' should be closed");
-});
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -3893,21 +3893,17 @@ var SessionStoreInternal = {
       uri = loadArguments.uri;
       if (loadArguments.userContextId) {
         browser.setAttribute("usercontextid", loadArguments.userContextId);
       }
     }
 
     this.markTabAsRestoring(aTab);
 
-    // We need a new frameloader if we are reloading into a browser with a
-    // grouped session history (as we don't support restoring into browsers
-    // with grouped session histories directly).
-    let newFrameloader =
-      aOptions.newFrameloader || !!browser.frameLoader.groupedSHistory;
+    let newFrameloader = aOptions.newFrameloader;
 
     let isRemotenessUpdate;
     if (aOptions.remoteType !== undefined) {
       // We already have a selected remote type so we update to that.
       isRemotenessUpdate =
         tabbrowser.updateBrowserRemoteness(browser, !!aOptions.remoteType,
                                            { remoteType: aOptions.remoteType,
                                              newFrameloader });
--- a/browser/components/sessionstore/content/content-sessionStore.js
+++ b/browser/components/sessionstore/content/content-sessionStore.js
@@ -228,26 +228,17 @@ var MessageListener = {
         break;
       case "SessionStore:resetRestore":
         gContentRestore.resetRestore();
         break;
       case "SessionStore:flush":
         this.flush(data);
         break;
       case "SessionStore:becomeActiveProcess":
-        let shistory = docShell.QueryInterface(Ci.nsIWebNavigation).sessionHistory;
-        // Check if we are at the end of the current session history, if we are,
-        // it is safe for us to collect and transmit our session history, so
-        // transmit all of it. Otherwise, we only want to transmit our index changes,
-        // so collect from kLastIndex.
-        if (shistory.globalCount - shistory.globalIndexOffset == shistory.count) {
-          SessionHistoryListener.collect();
-        } else {
-          SessionHistoryListener.collectFrom(kLastIndex);
-        }
+        SessionHistoryListener.collect();
         break;
       default:
         debug("received unknown message '" + name + "'");
         break;
     }
   },
 
   restoreHistory({epoch, tabData, loadArguments, isRemotenessUpdate}) {
--- a/browser/components/sessionstore/test/browser.ini
+++ b/browser/components/sessionstore/test/browser.ini
@@ -253,18 +253,16 @@ skip-if = os == "linux" && !debug
 run-if = e10s
 [browser_background_tab_crash.js]
 run-if = e10s && crashreporter
 
 # Disabled on debug for frequent intermittent failures:
 [browser_undoCloseById.js]
 skip-if = debug
 [browser_docshell_uuid_consistency.js]
-[browser_grouped_session_store.js]
-skip-if = !e10s # GroupedSHistory is e10s-only
 
 [browser_closed_objects_changed_notifications_tabs.js]
 [browser_closed_objects_changed_notifications_windows.js]
 [browser_duplicate_history.js]
 [browser_tabicon_after_bg_tab_crash.js]
 skip-if = !crashreporter || !e10s # Tabs can't crash without e10s
 
 [browser_cookies.js]
deleted file mode 100644
--- a/browser/components/sessionstore/test/browser_grouped_session_store.js
+++ /dev/null
@@ -1,143 +0,0 @@
-add_task(async function() {
-  const URIs = [
-    "data:text/html,1",
-    "data:text/html,2",
-    "data:text/html,3",
-    "data:text/html,4",
-    "data:text/html,5",
-  ];
-
-  const {TabStateCache} = Cu.import("resource:///modules/sessionstore/TabStateCache.jsm", {});
-  const {TabStateFlusher} = Cu.import("resource:///modules/sessionstore/TabStateFlusher.jsm", {});
-
-  await SpecialPowers.pushPrefEnv({
-    set: [["browser.groupedhistory.enabled", true]]
-  });
-
-  // Check that the data stored in the TabStateCache is correct for the current state.
-  async function validate(browser, length, index) {
-    await TabStateFlusher.flush(browser);
-    let {history} = TabStateCache.get(browser);
-    is(history.entries.length, length, "Lengths match");
-    for (let i = 0; i < length; ++i) {
-      is(history.entries[i].url, URIs[i], "URI at index " + i + " matches");
-    }
-    is(history.index, index, "Index matches");
-    await ContentTask.spawn(browser, [index, length], async function([expectedIndex, expectedLength]) {
-      let webNav = content.window.QueryInterface(Ci.nsIInterfaceRequestor)
-            .getInterface(Ci.nsIWebNavigation);
-      is(webNav.sessionHistory.globalIndexOffset + webNav.sessionHistory.index,
-         expectedIndex - 1, "In content index matches");
-      is(webNav.canGoForward, expectedIndex < expectedLength, "canGoForward is correct");
-      is(webNav.canGoBack, expectedIndex > 1, "canGoBack is correct");
-    });
-  }
-
-  // Wait for a process change, followed by a locationchange event, and then
-  // fulfil the promise.
-  function awaitProcessChange(browser) {
-    return new Promise(resolve => {
-      let locChangeListener = {
-        onLocationChange: () => {
-          gBrowser.removeProgressListener(locChangeListener);
-          resolve();
-        },
-      };
-
-      browser.addEventListener("BrowserChangedProcess", function(e) {
-        gBrowser.addProgressListener(locChangeListener);
-      }, {once: true});
-    });
-  }
-
-  // Order of events:
-  // Load [0], load [1], prerender [2], load [2], load [3]
-  // Back [2], Back [1], Forward [2], Back [0], Forward [3]
-  // Prerender [4], Back [0], Forward [2], Load [3'], Back [0].
-  await BrowserTestUtils.withNewTab({ gBrowser, url: URIs[0] }, async function(browser1) {
-    await validate(browser1, 1, 1);
-
-    browser1.loadURI(URIs[1], null, null);
-    await BrowserTestUtils.browserLoaded(browser1);
-    await validate(browser1, 2, 2);
-
-    // Create a new hidden prerendered tab to swap to.
-    let tab2 = gBrowser.loadOneTab(URIs[2], {
-      referrerPolicy: Ci.nsIHttpChannel.REFERRER_POLICY_UNSET,
-      allowThirdPartyFixup: true,
-      relatedToCurrent: true,
-      isPrerendered: true,
-      triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
-    });
-    await BrowserTestUtils.browserLoaded(tab2.linkedBrowser);
-    browser1.frameLoader.appendPartialSHistoryAndSwap(tab2.linkedBrowser.frameLoader);
-    await awaitProcessChange(browser1);
-    await validate(browser1, 3, 3);
-
-    browser1.loadURI(URIs[3], null, null);
-    await BrowserTestUtils.browserLoaded(browser1);
-    await validate(browser1, 4, 4);
-
-    // In process navigate back.
-    let p = BrowserTestUtils.waitForContentEvent(browser1, "pageshow");
-    browser1.goBack();
-    await p;
-    await validate(browser1, 4, 3);
-
-    // Cross process navigate back.
-    browser1.goBack();
-    await awaitProcessChange(browser1);
-    await validate(browser1, 4, 2);
-
-    // Cross process navigate forward.
-    browser1.goForward();
-    await awaitProcessChange(browser1);
-    await validate(browser1, 4, 3);
-
-    // Navigate across process to a page which was not recently loaded.
-    browser1.gotoIndex(0);
-    await awaitProcessChange(browser1);
-    await validate(browser1, 4, 1);
-
-    // Navigate across process to a page which was not recently loaded in the other direction.
-    browser1.gotoIndex(3);
-    await awaitProcessChange(browser1);
-    await validate(browser1, 4, 4);
-
-    // Create a new hidden prerendered tab to swap to
-    let tab3 = gBrowser.loadOneTab(URIs[4], {
-      referrerPolicy: Ci.nsIHttpChannel.REFERRER_POLICY_UNSET,
-      allowThirdPartyFixup: true,
-      relatedToCurrent: true,
-      isPrerendered: true,
-      triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
-    });
-    await BrowserTestUtils.browserLoaded(tab3.linkedBrowser);
-    browser1.frameLoader.appendPartialSHistoryAndSwap(tab3.linkedBrowser.frameLoader);
-    await awaitProcessChange(browser1);
-    await validate(browser1, 5, 5);
-
-    browser1.gotoIndex(0);
-    await awaitProcessChange(browser1);
-    await validate(browser1, 5, 1);
-
-    browser1.gotoIndex(2);
-    await awaitProcessChange(browser1);
-    await validate(browser1, 5, 3);
-
-    // Load a new page and make sure it throws out all of the following entries.
-    URIs[3] = "data:text/html,NEW";
-    browser1.loadURI(URIs[3]);
-    await BrowserTestUtils.browserLoaded(browser1);
-    await validate(browser1, 4, 4);
-
-    browser1.gotoIndex(0);
-    await awaitProcessChange(browser1);
-    await validate(browser1, 4, 1);
-
-    // XXX: This will be removed automatically by the owning tab closing in the
-    // future, but this is not supported yet.
-    gBrowser.removeTab(tab2);
-    gBrowser.removeTab(tab3);
-  });
-});
--- a/browser/extensions/pdfjs/README.mozilla
+++ b/browser/extensions/pdfjs/README.mozilla
@@ -1,5 +1,5 @@
 This is the PDF.js project output, https://github.com/mozilla/pdf.js
 
-Current extension version is: 2.0.250
+Current extension version is: 2.0.258
 
-Taken from upstream commit: 6b2ed504
+Taken from upstream commit: 5a52ee0a
--- a/browser/extensions/pdfjs/content/build/pdf.js
+++ b/browser/extensions/pdfjs/content/build/pdf.js
@@ -1931,17 +1931,17 @@ function getDocument(src) {
     });
   }).catch(task._capability.reject);
   return task;
 }
 function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
   if (worker.destroyed) {
     return Promise.reject(new Error('Worker was destroyed'));
   }
-  let apiVersion = '2.0.250';
+  let apiVersion = '2.0.258';
   source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
   source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
   source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
   if (pdfDataRangeTransport) {
     source.length = pdfDataRangeTransport.length;
     source.initialData = pdfDataRangeTransport.initialData;
   }
   return worker.messageHandler.sendWithPromise('GetDocRequest', {
@@ -2139,21 +2139,18 @@ var PDFPageProxy = function PDFPageProxy
       return this.pageInfo.ref;
     },
     get userUnit() {
       return this.pageInfo.userUnit;
     },
     get view() {
       return this.pageInfo.view;
     },
-    getViewport: function PDFPageProxy_getViewport(scale, rotate) {
-      if (arguments.length < 2) {
-        rotate = this.rotate;
-      }
-      return new _util.PageViewport(this.view, scale, rotate, 0, 0);
+    getViewport(scale, rotate = this.rotate, dontFlip = false) {
+      return new _util.PageViewport(this.view, scale, rotate, 0, 0, dontFlip);
     },
     getAnnotations: function PDFPageProxy_getAnnotations(params) {
       var intent = params && params.intent || null;
       if (!this.annotationsPromise || this.annotationsIntent !== intent) {
         this.annotationsPromise = this.transport.getAnnotations(this.pageIndex, intent);
         this.annotationsIntent = intent;
       }
       return this.annotationsPromise;
@@ -3228,18 +3225,18 @@ var InternalRenderTask = function Intern
         }
       }
     }
   };
   return InternalRenderTask;
 }();
 var version, build;
 {
-  exports.version = version = '2.0.250';
-  exports.build = build = '6b2ed504';
+  exports.version = version = '2.0.258';
+  exports.build = build = '5a52ee0a';
 }
 exports.getDocument = getDocument;
 exports.LoopbackPort = LoopbackPort;
 exports.PDFDataRangeTransport = PDFDataRangeTransport;
 exports.PDFWorker = PDFWorker;
 exports.PDFDocumentProxy = PDFDocumentProxy;
 exports.PDFPageProxy = PDFPageProxy;
 exports.setPDFNetworkStreamClass = setPDFNetworkStreamClass;
@@ -4616,18 +4613,18 @@ exports.SVGGraphics = SVGGraphics;
 
 /***/ }),
 /* 8 */
 /***/ (function(module, exports, __w_pdfjs_require__) {
 
 "use strict";
 
 
-var pdfjsVersion = '2.0.250';
-var pdfjsBuild = '6b2ed504';
+var pdfjsVersion = '2.0.258';
+var pdfjsBuild = '5a52ee0a';
 var pdfjsSharedUtil = __w_pdfjs_require__(0);
 var pdfjsDisplayGlobal = __w_pdfjs_require__(12);
 var pdfjsDisplayAPI = __w_pdfjs_require__(3);
 var pdfjsDisplayTextLayer = __w_pdfjs_require__(6);
 var pdfjsDisplayAnnotationLayer = __w_pdfjs_require__(5);
 var pdfjsDisplayDOMUtils = __w_pdfjs_require__(1);
 var pdfjsDisplaySVG = __w_pdfjs_require__(7);
 ;
@@ -7739,18 +7736,18 @@ var _svg = __w_pdfjs_require__(7);
 
 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
 if (!_global_scope2.default.PDFJS) {
   _global_scope2.default.PDFJS = {};
 }
 var PDFJS = _global_scope2.default.PDFJS;
 {
-  PDFJS.version = '2.0.250';
-  PDFJS.build = '6b2ed504';
+  PDFJS.version = '2.0.258';
+  PDFJS.build = '5a52ee0a';
 }
 PDFJS.pdfBug = false;
 if (PDFJS.verbosity !== undefined) {
   (0, _util.setVerbosityLevel)(PDFJS.verbosity);
 }
 delete PDFJS.verbosity;
 Object.defineProperty(PDFJS, 'verbosity', {
   get() {
--- a/browser/extensions/pdfjs/content/build/pdf.worker.js
+++ b/browser/extensions/pdfjs/content/build/pdf.worker.js
@@ -20779,18 +20779,18 @@ exports.PostScriptCompiler = PostScriptC
 
 /***/ }),
 /* 18 */
 /***/ (function(module, exports, __w_pdfjs_require__) {
 
 "use strict";
 
 
-var pdfjsVersion = '2.0.250';
-var pdfjsBuild = '6b2ed504';
+var pdfjsVersion = '2.0.258';
+var pdfjsBuild = '5a52ee0a';
 var pdfjsCoreWorker = __w_pdfjs_require__(19);
 exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
 
 /***/ }),
 /* 19 */
 /***/ (function(module, exports, __w_pdfjs_require__) {
 
 "use strict";
@@ -20975,17 +20975,17 @@ var WorkerMessageHandler = {
     });
   },
   createDocumentHandler(docParams, port) {
     var pdfManager;
     var terminated = false;
     var cancelXHRs = null;
     var WorkerTasks = [];
     let apiVersion = docParams.apiVersion;
-    let workerVersion = '2.0.250';
+    let workerVersion = '2.0.258';
     if (apiVersion !== null && apiVersion !== workerVersion) {
       throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
     }
     var docId = docParams.docId;
     var docBaseUrl = docParams.docBaseUrl;
     var workerHandlerName = docParams.docId + '_worker';
     var handler = new _util.MessageHandler(workerHandlerName, docId, port);
     handler.postMessageTransfers = docParams.postMessageTransfers;
@@ -32528,16 +32528,20 @@ var Font = function FontClosure() {
   function safeString16(value) {
     value = value > 0x7FFF ? 0x7FFF : value < -0x8000 ? -0x8000 : value;
     return String.fromCharCode(value >> 8 & 0xff, value & 0xff);
   }
   function isTrueTypeFile(file) {
     var header = file.peekBytes(4);
     return (0, _util.readUint32)(header, 0) === 0x00010000;
   }
+  function isTrueTypeCollectionFile(file) {
+    let header = file.peekBytes(4);
+    return (0, _util.bytesToString)(header) === 'ttcf';
+  }
   function isOpenTypeFile(file) {
     var header = file.peekBytes(4);
     return (0, _util.bytesToString)(header) === 'OTTO';
   }
   function isType1File(file) {
     var header = file.peekBytes(2);
     if (header[0] === 0x25 && header[1] === 0x21) {
       return true;
@@ -32936,16 +32940,39 @@ var Font = function FontClosure() {
           this.toFontChar[charCode] = unicodeCharCode;
         });
       }
       this.loadedName = fontName.split('-')[0];
       this.loading = false;
       this.fontType = getFontType(type, subtype);
     },
     checkAndRepair: function Font_checkAndRepair(name, font, properties) {
+      const VALID_TABLES = ['OS/2', 'cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'post', 'loca', 'glyf', 'fpgm', 'prep', 'cvt ', 'CFF '];
+      function readTables(file, numTables) {
+        let tables = Object.create(null);
+        tables['OS/2'] = null;
+        tables['cmap'] = null;
+        tables['head'] = null;
+        tables['hhea'] = null;
+        tables['hmtx'] = null;
+        tables['maxp'] = null;
+        tables['name'] = null;
+        tables['post'] = null;
+        for (let i = 0; i < numTables; i++) {
+          let table = readTableEntry(font);
+          if (VALID_TABLES.indexOf(table.tag) < 0) {
+            continue;
+          }
+          if (table.length === 0) {
+            continue;
+          }
+          tables[table.tag] = table;
+        }
+        return tables;
+      }
       function readTableEntry(file) {
         var tag = (0, _util.bytesToString)(file.getBytes(4));
         var checksum = file.getInt32() >>> 0;
         var offset = file.getInt32() >>> 0;
         var length = file.getInt32() >>> 0;
         var previousPosition = file.pos;
         file.pos = file.start ? file.start : 0;
         file.skip(offset);
@@ -32967,16 +32994,68 @@ var Font = function FontClosure() {
         return {
           version: (0, _util.bytesToString)(ttf.getBytes(4)),
           numTables: ttf.getUint16(),
           searchRange: ttf.getUint16(),
           entrySelector: ttf.getUint16(),
           rangeShift: ttf.getUint16()
         };
       }
+      function readTrueTypeCollectionHeader(ttc) {
+        let ttcTag = (0, _util.bytesToString)(ttc.getBytes(4));
+        (0, _util.assert)(ttcTag === 'ttcf', 'Must be a TrueType Collection font.');
+        let majorVersion = ttc.getUint16();
+        let minorVersion = ttc.getUint16();
+        let numFonts = ttc.getInt32() >>> 0;
+        let offsetTable = [];
+        for (let i = 0; i < numFonts; i++) {
+          offsetTable.push(ttc.getInt32() >>> 0);
+        }
+        let header = {
+          ttcTag,
+          majorVersion,
+          minorVersion,
+          numFonts,
+          offsetTable
+        };
+        switch (majorVersion) {
+          case 1:
+            return header;
+          case 2:
+            header.dsigTag = ttc.getInt32() >>> 0;
+            header.dsigLength = ttc.getInt32() >>> 0;
+            header.dsigOffset = ttc.getInt32() >>> 0;
+            return header;
+        }
+        throw new _util.FormatError(`Invalid TrueType Collection majorVersion: ${majorVersion}.`);
+      }
+      function readTrueTypeCollectionData(ttc, fontName) {
+        let { numFonts, offsetTable } = readTrueTypeCollectionHeader(ttc);
+        for (let i = 0; i < numFonts; i++) {
+          ttc.pos = (ttc.start || 0) + offsetTable[i];
+          let potentialHeader = readOpenTypeHeader(ttc);
+          let potentialTables = readTables(ttc, potentialHeader.numTables);
+          if (!potentialTables['name']) {
+            throw new _util.FormatError('TrueType Collection font must contain a "name" table.');
+          }
+          let nameTable = readNameTable(potentialTables['name']);
+          for (let j = 0, jj = nameTable.length; j < jj; j++) {
+            for (let k = 0, kk = nameTable[j].length; k < kk; k++) {
+              let nameEntry = nameTable[j][k];
+              if (nameEntry && nameEntry.replace(/\s/g, '') === fontName) {
+                return {
+                  header: potentialHeader,
+                  tables: potentialTables
+                };
+              }
+            }
+          }
+        }
+        throw new _util.FormatError(`TrueType Collection does not contain "${fontName}" font.`);
+      }
       function readCmapTable(cmap, font, isSymbolicFont, hasEncoding) {
         if (!cmap) {
           (0, _util.warn)('No cmap table available.');
           return {
             platformId: -1,
             encodingId: -1,
             mappings: [],
             hasShortCmap: false
@@ -33682,40 +33761,26 @@ var Font = function FontClosure() {
         if (cvt && cvt.length & 1) {
           var cvtData = new Uint8Array(cvt.length + 1);
           cvtData.set(cvt.data);
           cvt.data = cvtData;
         }
         return ttContext.hintsValid;
       }
       font = new _stream.Stream(new Uint8Array(font.getBytes()));
-      var VALID_TABLES = ['OS/2', 'cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'post', 'loca', 'glyf', 'fpgm', 'prep', 'cvt ', 'CFF '];
-      var header = readOpenTypeHeader(font);
-      var numTables = header.numTables;
-      var cff, cffFile;
-      var tables = Object.create(null);
-      tables['OS/2'] = null;
-      tables['cmap'] = null;
-      tables['head'] = null;
-      tables['hhea'] = null;
-      tables['hmtx'] = null;
-      tables['maxp'] = null;
-      tables['name'] = null;
-      tables['post'] = null;
-      var table;
-      for (var i = 0; i < numTables; i++) {
-        table = readTableEntry(font);
-        if (VALID_TABLES.indexOf(table.tag) < 0) {
-          continue;
-        }
-        if (table.length === 0) {
-          continue;
-        }
-        tables[table.tag] = table;
-      }
+      let header, tables;
+      if (isTrueTypeCollectionFile(font)) {
+        let ttcData = readTrueTypeCollectionData(font, this.name);
+        header = ttcData.header;
+        tables = ttcData.tables;
+      } else {
+        header = readOpenTypeHeader(font);
+        tables = readTables(font, header.numTables);
+      }
+      let cff, cffFile;
       var isTrueType = !tables['CFF '];
       if (!isTrueType) {
         if (header.version === 'OTTO' && !(properties.composite && properties.cidToGidMap) || !tables['head'] || !tables['hhea'] || !tables['maxp'] || !tables['post']) {
           cffFile = new _stream.Stream(tables['CFF '].data);
           cff = new CFFFont(cffFile, properties);
           adjustWidths(properties);
           return this.convert(name, cff, properties);
         }
@@ -33860,17 +33925,17 @@ var Font = function FontClosure() {
             standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap);
             var unicodeOrCharCode;
             if (cmapPlatformId === 3 && cmapEncodingId === 1) {
               unicodeOrCharCode = glyphsUnicodeMap[standardGlyphName];
             } else if (cmapPlatformId === 1 && cmapEncodingId === 0) {
               unicodeOrCharCode = _encodings.MacRomanEncoding.indexOf(standardGlyphName);
             }
             var found = false;
-            for (i = 0; i < cmapMappingsLength; ++i) {
+            for (let i = 0; i < cmapMappingsLength; ++i) {
               if (cmapMappings[i].charCode !== unicodeOrCharCode) {
                 continue;
               }
               charCodeToGlyphId[charCode] = cmapMappings[i].glyphId;
               found = true;
               break;
             }
             if (!found && properties.glyphNames) {
@@ -33879,21 +33944,21 @@ var Font = function FontClosure() {
                 glyphId = properties.glyphNames.indexOf(standardGlyphName);
               }
               if (glyphId > 0 && hasGlyph(glyphId)) {
                 charCodeToGlyphId[charCode] = glyphId;
               }
             }
           }
         } else if (cmapPlatformId === 0 && cmapEncodingId === 0) {
-          for (i = 0; i < cmapMappingsLength; ++i) {
+          for (let i = 0; i < cmapMappingsLength; ++i) {
             charCodeToGlyphId[cmapMappings[i].charCode] = cmapMappings[i].glyphId;
           }
         } else {
-          for (i = 0; i < cmapMappingsLength; ++i) {
+          for (let i = 0; i < cmapMappingsLength; ++i) {
             charCode = cmapMappings[i].charCode;
             if (cmapPlatformId === 3 && charCode >= 0xF000 && charCode <= 0xF0FF) {
               charCode &= 0xFF;
             }
             charCodeToGlyphId[charCode] = cmapMappings[i].glyphId;
           }
         }
       }
--- a/browser/extensions/pdfjs/content/web/viewer.js
+++ b/browser/extensions/pdfjs/content/web/viewer.js
@@ -2300,16 +2300,17 @@ function webViewerKeyDown(evt) {
           PDFViewerApplication.secondaryToolbar.close();
           handled = true;
         }
         if (!PDFViewerApplication.supportsIntegratedFind && PDFViewerApplication.findBar.opened) {
           PDFViewerApplication.findBar.close();
           handled = true;
         }
         break;
+      case 13:
       case 40:
       case 34:
       case 32:
         if (!isViewerInPresentationMode && pdfViewer.currentScaleValue !== 'page-fit') {
           break;
         }
       case 39:
         if (pdfViewer.isHorizontalScrollbarEnabled) {
@@ -2344,16 +2345,17 @@ function webViewerKeyDown(evt) {
         break;
       case 82:
         PDFViewerApplication.rotatePages(90);
         break;
     }
   }
   if (cmd === 4) {
     switch (evt.keyCode) {
+      case 13:
       case 32:
         if (!isViewerInPresentationMode && pdfViewer.currentScaleValue !== 'page-fit') {
           break;
         }
         if (PDFViewerApplication.page > 1) {
           PDFViewerApplication.page--;
         }
         handled = true;
deleted file mode 100644
--- a/docshell/base/PendingGlobalHistoryEntry.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=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/. */
-
-#include "mozilla/dom/PendingGlobalHistoryEntry.h"
-
-namespace mozilla {
-
-namespace dom {
-
-void
-PendingGlobalHistoryEntry::VisitURI(nsIURI* aURI,
-                             nsIURI* aLastVisitedURI,
-                             nsIURI* aReferrerURI,
-                             uint32_t aFlags)
-{
-  URIVisit visit;
-  visit.mURI = aURI;
-  visit.mLastVisitedURI = aLastVisitedURI;
-  visit.mReferrerURI = aReferrerURI;
-  visit.mFlags = aFlags;
-  mVisits.AppendElement(Move(visit));
-}
-
-void
-PendingGlobalHistoryEntry::SetURITitle(nsIURI* aURI,
-                                const nsAString& aTitle)
-{
-  URITitle title;
-  title.mURI = aURI;
-  title.mTitle.Assign(aTitle);
-  mTitles.AppendElement(title);
-}
-
-nsresult
-PendingGlobalHistoryEntry::ApplyChanges(IHistory* aHistory)
-{
-  nsresult rv;
-  for (const URIVisit& visit : mVisits) {
-    rv = aHistory->VisitURI(visit.mURI, visit.mLastVisitedURI, visit.mFlags);
-    NS_ENSURE_SUCCESS(rv, rv);
-  }
-  mVisits.Clear();
-
-  for (const URITitle& title : mTitles) {
-    rv = aHistory->SetURITitle(title.mURI, title.mTitle);
-    NS_ENSURE_SUCCESS(rv, rv);
-  }
-  mTitles.Clear();
-
-  return NS_OK;
-}
-
-nsresult
-PendingGlobalHistoryEntry::ApplyChanges(nsIGlobalHistory2* aHistory)
-{
-  nsresult rv;
-  for (const URIVisit& visit : mVisits) {
-    bool redirect = (visit.mFlags & IHistory::REDIRECT_TEMPORARY) ||
-      (visit.mFlags & IHistory::REDIRECT_PERMANENT);
-    bool toplevel = (visit.mFlags & IHistory::TOP_LEVEL);
-
-    rv = aHistory->AddURI(visit.mURI, redirect, toplevel, visit.mReferrerURI);
-    NS_ENSURE_SUCCESS(rv, rv);
-  }
-  mVisits.Clear();
-
-  for (const URITitle& title : mTitles) {
-    rv = aHistory->SetPageTitle(title.mURI, title.mTitle);
-    NS_ENSURE_SUCCESS(rv, rv);
-  }
-  mTitles.Clear();
-
-  return NS_OK;
-}
-
-} // namespace dom
-
-} // namespace mozilla
deleted file mode 100644
--- a/docshell/base/PendingGlobalHistoryEntry.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=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/. */
-
-#ifndef mozilla_dom_PendingGlobalHistoryEntry_h_
-#define mozilla_dom_PendingGlobalHistoryEntry_h_
-
-#include "mozilla/IHistory.h"
-#include "nsIGlobalHistory2.h"
-#include "nsIURI.h"
-#include "nsCOMPtr.h"
-#include "nsString.h"
-#include "nsTArray.h"
-
-namespace mozilla {
-
-namespace dom {
-
-// This class acts as a wrapper around a IHistory, in that it can be used to
-// record a series of operations on the IHistory, and then play them back at a
-// later time. This is used in Prerendering in order to record the Global
-// History changes being made by the prerendering docshell and then play them
-// back when the docshell is finished rendering.
-//
-// This class also handles applying the changes to nsIGlobalHistory2.
-class PendingGlobalHistoryEntry
-{
-public:
-  void VisitURI(nsIURI* aURI,
-                nsIURI* aLastVisitedURI,
-                nsIURI* aReferrerURI,
-                uint32_t aFlags);
-
-  void SetURITitle(nsIURI* aURI,
-                   const nsAString& aTitle);
-
-  nsresult ApplyChanges(IHistory* aHistory);
-
-  nsresult ApplyChanges(nsIGlobalHistory2* aHistory);
-
-private:
-  struct URIVisit
-  {
-    nsCOMPtr<nsIURI> mURI;
-    nsCOMPtr<nsIURI> mLastVisitedURI;
-    nsCOMPtr<nsIURI> mReferrerURI;
-    uint32_t mFlags = 0;
-  };
-  struct URITitle
-  {
-    nsCOMPtr<nsIURI> mURI;
-    nsString mTitle;
-  };
-  nsTArray<URIVisit> mVisits;
-  nsTArray<URITitle> mTitles;
-};
-
-} // namespace dom
-
-} // namespace mozilla
-
-#endif // mozilla_dom_PendingGlobalHistoryEntry_h_
-
--- a/docshell/base/moz.build
+++ b/docshell/base/moz.build
@@ -75,35 +75,30 @@ EXPORTS += [
     'SerializedLoadContext.h',
 ]
 
 EXPORTS.mozilla += [
     'IHistory.h',
     'LoadContext.h',
 ]
 
-EXPORTS.mozilla.dom += [
-    'PendingGlobalHistoryEntry.h',
-]
-
 UNIFIED_SOURCES += [
     'LoadContext.cpp',
     'nsAboutRedirector.cpp',
     'nsDefaultURIFixup.cpp',
     'nsDocShell.cpp',
     'nsDocShellEditorData.cpp',
     'nsDocShellEnumerator.cpp',
     'nsDocShellLoadInfo.cpp',
     'nsDocShellTransferableHooks.cpp',
     'nsDocShellTreeOwner.cpp',
     'nsDSURIContentListener.cpp',
     'nsPingListener.cpp',
     'nsRefreshTimer.cpp',
     'nsWebNavigationInfo.cpp',
-    'PendingGlobalHistoryEntry.cpp',
     'SerializedLoadContext.cpp',
 ]
 
 if not CONFIG['MOZ_PLACES']:
     UNIFIED_SOURCES += ['nsDownloadHistory.cpp']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -36,17 +36,16 @@
 #include "mozilla/dom/ClientHandle.h"
 #include "mozilla/dom/ClientInfo.h"
 #include "mozilla/dom/ClientManager.h"
 #include "mozilla/dom/ClientSource.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/DocGroup.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/HTMLAnchorElement.h"
-#include "mozilla/dom/PendingGlobalHistoryEntry.h"
 #include "mozilla/dom/PerformanceNavigation.h"
 #include "mozilla/dom/PermissionMessageUtils.h"
 #include "mozilla/dom/ProfileTimelineMarkerBinding.h"
 #include "mozilla/dom/ScreenOrientation.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/dom/TabChild.h"
 #include "mozilla/dom/TabGroup.h"
 #include "mozilla/dom/ToJSValue.h"
@@ -362,17 +361,16 @@ nsDocShell::nsDocShell()
   , mAllowContentRetargetingOnChildren(true)
   , mUseErrorPages(false)
   , mObserveErrorPages(true)
   , mAllowAuth(true)
   , mAllowKeywordFixup(false)
   , mIsOffScreenBrowser(false)
   , mIsActive(true)
   , mDisableMetaRefreshWhenInactive(false)
-  , mIsPrerendered(false)
   , mIsAppTab(false)
   , mUseGlobalHistory(false)
   , mUseRemoteTabs(false)
   , mUseTrackingProtection(false)
   , mDeviceSizeIsPageSize(false)
   , mWindowDraggingAllowed(false)
   , mInFrameSwap(false)
   , mInheritPrivateBrowsingId(true)
@@ -1021,17 +1019,16 @@ nsDocShell::LoadURI(nsIURI* aURI,
                       -1, // XXXbaku
                       headersStream,
                       loadType,
                       nullptr, // No SHEntry
                       aFirstParty,
                       srcdoc,
                       sourceDocShell,
                       baseURI,
-                      false,
                       nullptr,  // No nsIDocShell
                       nullptr); // No nsIRequest
 }
 
 NS_IMETHODIMP
 nsDocShell::LoadStream(nsIInputStream* aStream, nsIURI* aURI,
                        const nsACString& aContentType,
                        const nsACString& aContentCharset,
@@ -2986,22 +2983,18 @@ nsDocShell::SetDocLoaderParent(nsDocLoad
       SetAllowImages(value);
     }
     SetAllowMedia(parentAsDocShell->GetAllowMedia() && mAllowMedia);
     if (mAllowWindowControl && NS_SUCCEEDED(parentAsDocShell->GetAllowWindowControl(&value))) {
       SetAllowWindowControl(value);
     }
     SetAllowContentRetargeting(mAllowContentRetargeting &&
       parentAsDocShell->GetAllowContentRetargetingOnChildren());
-    if (parentAsDocShell->GetIsPrerendered()) {
-      SetIsPrerendered();
-    }
     if (NS_SUCCEEDED(parentAsDocShell->GetIsActive(&value))) {
-      // a prerendered docshell is not active yet
-      SetIsActive(value && !mIsPrerendered);
+      SetIsActive(value);
     }
     if (NS_SUCCEEDED(parentAsDocShell->GetCustomUserAgent(customUserAgent)) &&
         !customUserAgent.IsEmpty()) {
       SetCustomUserAgent(customUserAgent);
     }
     if (NS_FAILED(parentAsDocShell->GetAllowDNSPrefetch(&value))) {
       value = false;
     }
@@ -5019,17 +5012,17 @@ nsDocShell::LoadErrorPage(nsIURI* aURI, 
   NS_ENSURE_SUCCESS(rv, rv);
 
   return InternalLoad(errorPageURI, nullptr, Nothing(), false, nullptr,
                       mozilla::net::RP_Unset,
                       nsContentUtils::GetSystemPrincipal(), nullptr,
                       INTERNAL_LOAD_FLAGS_NONE, EmptyString(),
                       nullptr, VoidString(), nullptr, -1, nullptr,
                       LOAD_ERROR_PAGE, nullptr, true, VoidString(), this,
-                      nullptr, false, nullptr, nullptr);
+                      nullptr, nullptr, nullptr);
 }
 
 NS_IMETHODIMP
 nsDocShell::Reload(uint32_t aReloadFlags)
 {
   if (!IsNavigationAllowed()) {
     return NS_OK; // JS may not handle returning of an error code
   }
@@ -5128,17 +5121,16 @@ nsDocShell::Reload(uint32_t aReloadFlags
                       -1,              // No post data length
                       nullptr,         // No headers data
                       loadType,        // Load type
                       nullptr,         // No SHEntry
                       true,
                       srcdoc,          // srcdoc argument for iframe
                       this,            // For reloads we are the source
                       baseURI,
-                      false,
                       nullptr,         // No nsIDocShell
                       nullptr);        // No nsIRequest
   }
 
   return rv;
 }
 
 NS_IMETHODIMP
@@ -5841,31 +5833,16 @@ nsDocShell::SetIsActive(bool aIsActive)
   // We disallow setting active on chrome docshells.
   if (mItemType == nsIDocShellTreeItem::typeChrome) {
     return NS_ERROR_INVALID_ARG;
   }
 
   // Keep track ourselves.
   mIsActive = aIsActive;
 
-  // Clear prerender flag if necessary.
-  if (mIsPrerendered && aIsActive) {
-    MOZ_ASSERT(mPrerenderGlobalHistory.get());
-    mIsPrerendered = false;
-    nsCOMPtr<IHistory> history = services::GetHistoryService();
-    nsresult rv = NS_OK;
-    if (history) {
-      rv = mPrerenderGlobalHistory->ApplyChanges(history);
-    } else if (mGlobalHistory) {
-      rv = mPrerenderGlobalHistory->ApplyChanges(mGlobalHistory);
-    }
-    mPrerenderGlobalHistory = nullptr;
-    NS_ENSURE_SUCCESS(rv, rv);
-  }
-
   // Tell the PresShell about it.
   nsCOMPtr<nsIPresShell> pshell = GetPresShell();
   if (pshell) {
     pshell->SetIsActive(aIsActive);
   }
 
   // Tell the window about it
   if (mScriptGlobal) {
@@ -5929,34 +5906,16 @@ nsDocShell::SetIsActive(bool aIsActive)
 NS_IMETHODIMP
 nsDocShell::GetIsActive(bool* aIsActive)
 {
   *aIsActive = mIsActive;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDocShell::SetIsPrerendered()
-{
-  MOZ_ASSERT(!mIsPrerendered,
-             "SetIsPrerendered() called on already prerendered docshell");
-  SetIsActive(false);
-  mIsPrerendered = true;
-  mPrerenderGlobalHistory = mozilla::MakeUnique<PendingGlobalHistoryEntry>();
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsDocShell::GetIsPrerendered(bool* aIsPrerendered)
-{
-  *aIsPrerendered = mIsPrerendered;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsDocShell::SetIsAppTab(bool aIsAppTab)
 {
   mIsAppTab = aIsAppTab;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocShell::GetIsAppTab(bool* aIsAppTab)
@@ -8568,18 +8527,17 @@ nsDocShell::RestoreFromHistory()
     bool allowContentRetargetingOnChildren =
       childShell->GetAllowContentRetargetingOnChildren();
 
     uint32_t defaultLoadFlags;
     childShell->GetDefaultLoadFlags(&defaultLoadFlags);
 
     // this.AddChild(child) calls child.SetDocLoaderParent(this), meaning that
     // the child inherits our state. Among other things, this means that the
-    // child inherits our mIsActive, mIsPrerendered and mPrivateBrowsingId,
-    // which is what we want.
+    // child inherits our mIsActive mPrivateBrowsingId, which is what we want.
     AddChild(childItem);
 
     childShell->SetAllowPlugins(allowPlugins);
     childShell->SetAllowJavascript(allowJavascript);
     childShell->SetAllowMetaRedirects(allowRedirects);
     childShell->SetAllowSubframes(allowSubframes);
     childShell->SetAllowImages(allowImages);
     childShell->SetAllowMedia(allowMedia);
@@ -9259,18 +9217,17 @@ public:
                     nsIInputStream* aPostData,
                     int64_t aPostDataLength,
                     nsIInputStream* aHeadersData,
                     uint32_t aLoadType,
                     nsISHEntry* aSHEntry,
                     bool aFirstParty,
                     const nsAString& aSrcdoc,
                     nsIDocShell* aSourceDocShell,
-                    nsIURI* aBaseURI,
-                    bool aCheckForPrerender)
+                    nsIURI* aBaseURI)
     : mozilla::Runnable("InternalLoadEvent")
     , mSrcdoc(aSrcdoc)
     , mDocShell(aDocShell)
     , mURI(aURI)
     , mOriginalURI(aOriginalURI)
     , mResultPrincipalURI(aResultPrincipalURI)
     , mLoadReplace(aLoadReplace)
     , mReferrer(aReferrer)
@@ -9281,17 +9238,16 @@ public:
     , mPostDataLength(aPostDataLength)
     , mHeadersData(aHeadersData)
     , mSHEntry(aSHEntry)
     , mFlags(aFlags)
     , mLoadType(aLoadType)
     , mFirstParty(aFirstParty)
     , mSourceDocShell(aSourceDocShell)
     , mBaseURI(aBaseURI)
-    , mCheckForPrerender(aCheckForPrerender)
   {
     // Make sure to keep null things null as needed
     if (aTypeHint) {
       mTypeHint = aTypeHint;
     } else {
       mTypeHint.SetIsVoid(true);
     }
   }
@@ -9305,17 +9261,17 @@ public:
                                    mReferrerPolicy,
                                    mTriggeringPrincipal, mPrincipalToInherit,
                                    mFlags, EmptyString(),
                                    mTypeHint.IsVoid() ? nullptr
                                                       : mTypeHint.get(),
                                    VoidString(), mPostData, mPostDataLength,
                                    mHeadersData, mLoadType, mSHEntry,
                                    mFirstParty, mSrcdoc, mSourceDocShell,
-                                   mBaseURI, mCheckForPrerender, nullptr,
+                                   mBaseURI, nullptr,
                                    nullptr);
   }
 
 private:
   nsCString mTypeHint;
   nsString mSrcdoc;
 
   RefPtr<nsDocShell> mDocShell;
@@ -9331,17 +9287,16 @@ private:
   int64_t mPostDataLength;
   nsCOMPtr<nsIInputStream> mHeadersData;
   nsCOMPtr<nsISHEntry> mSHEntry;
   uint32_t mFlags;
   uint32_t mLoadType;
   bool mFirstParty;
   nsCOMPtr<nsIDocShell> mSourceDocShell;
   nsCOMPtr<nsIURI> mBaseURI;
-  bool mCheckForPrerender;
 };
 
 /**
  * Returns true if we started an asynchronous load (i.e., from the network), but
  * the document we're loading there hasn't yet become this docshell's active
  * document.
  *
  * When JustStartedNetworkLoad is true, you should be careful about modifying
@@ -9383,17 +9338,16 @@ nsDocShell::InternalLoad(nsIURI* aURI,
                          int64_t aPostDataLength,
                          nsIInputStream* aHeadersData,
                          uint32_t aLoadType,
                          nsISHEntry* aSHEntry,
                          bool aFirstParty,
                          const nsAString& aSrcdoc,
                          nsIDocShell* aSourceDocShell,
                          nsIURI* aBaseURI,
-                         bool aCheckForPrerender,
                          nsIDocShell** aDocShell,
                          nsIRequest** aRequest)
 {
   MOZ_ASSERT(aTriggeringPrincipal, "need a valid TriggeringPrincipal");
 
   nsresult rv = NS_OK;
   mOriginalUriString.Truncate();
 
@@ -9763,17 +9717,16 @@ nsDocShell::InternalLoad(nsIURI* aURI,
                                         aPostDataLength,
                                         aHeadersData,
                                         aLoadType,
                                         aSHEntry,
                                         aFirstParty,
                                         aSrcdoc,
                                         aSourceDocShell,
                                         aBaseURI,
-                                        aCheckForPrerender,
                                         aDocShell,
                                         aRequest);
       if (rv == NS_ERROR_NO_CONTENT) {
         // XXXbz except we never reach this code!
         if (isNewWindow) {
           //
           // At this point, a new window has been created, but the
           // URI did not have any data associated with it...
@@ -9849,17 +9802,17 @@ nsDocShell::InternalLoad(nsIURI* aURI,
 
       // Do this asynchronously
       nsCOMPtr<nsIRunnable> ev =
         new InternalLoadEvent(this, aURI, aOriginalURI, aResultPrincipalURI,
                               aLoadReplace, aReferrer, aReferrerPolicy,
                               aTriggeringPrincipal, principalToInherit,
                               aFlags, aTypeHint, aPostData, aPostDataLength,
                               aHeadersData, aLoadType, aSHEntry, aFirstParty,
-                              aSrcdoc, aSourceDocShell, aBaseURI, false);
+                              aSrcdoc, aSourceDocShell, aBaseURI);
       return DispatchToTabGroup(TaskCategory::Other, ev.forget());
     }
 
     // Just ignore this load attempt
     return NS_OK;
   }
 
   // If a source docshell has been passed, check to see if we are sandboxed
@@ -10228,35 +10181,16 @@ nsDocShell::InternalLoad(nsIURI* aURI,
     bool shouldLoad;
     rv = browserChrome3->ShouldLoadURI(this, aURI, aReferrer, !!aPostData,
                                        aTriggeringPrincipal, &shouldLoad);
     if (NS_SUCCEEDED(rv) && !shouldLoad) {
       return NS_OK;
     }
   }
 
-  if (browserChrome3 && aCheckForPrerender) {
-    nsCOMPtr<nsIRunnable> ev =
-      new InternalLoadEvent(this, aURI, aOriginalURI, aResultPrincipalURI,
-                            aLoadReplace, aReferrer, aReferrerPolicy,
-                            aTriggeringPrincipal, principalToInherit,
-                            aFlags, aTypeHint, aPostData, aPostDataLength,
-                            aHeadersData, aLoadType, aSHEntry, aFirstParty,
-                            aSrcdoc, aSourceDocShell, aBaseURI, false);
-    // We don't need any success handler since in that case
-    // OnPartialSHistoryDeactive would be called, and it would ensure
-    // docshell loads about:blank.
-    bool shouldSwitch = false;
-    rv = browserChrome3->ShouldSwitchToPrerenderedDocument(
-      aURI, mCurrentURI, nullptr, ev, &shouldSwitch);
-    if (NS_SUCCEEDED(rv) && shouldSwitch) {
-      return NS_OK;
-    }
-  }
-
   // Whenever a top-level browsing context is navigated, the user agent MUST
   // lock the orientation of the document to the document's default
   // orientation. We don't explicitly check for a top-level browsing context
   // here because orientation is only set on top-level browsing contexts.
   if (OrientationLock() != eScreenOrientation_None) {
 #ifdef DEBUG
     nsCOMPtr<nsIDocShellTreeItem> parent;
     GetSameTypeParent(getter_AddRefs(parent));
@@ -12473,17 +12407,16 @@ nsDocShell::LoadHistoryEntry(nsISHEntry*
                     -1,                 // Post data stream length
                     nullptr,            // No headers stream
                     aLoadType,          // Load type
                     aEntry,             // SHEntry
                     true,
                     srcdoc,
                     nullptr,            // Source docshell, see comment above
                     baseURI,
-                    false,
                     nullptr,            // No nsIDocShell
                     nullptr);           // No nsIRequest
   return rv;
 }
 
 NS_IMETHODIMP
 nsDocShell::GetShouldSaveLayoutState(bool* aShould)
 {
@@ -12775,17 +12708,17 @@ nsDocShell::AddURIVisit(nsIURI* aURI,
   // Only content-type docshells save URI visits.  Also don't do
   // anything here if we're not supposed to use global history.
   if (mItemType != typeContent || !mUseGlobalHistory || UsePrivateBrowsing()) {
     return;
   }
 
   nsCOMPtr<IHistory> history = services::GetHistoryService();
 
-  if (mPrerenderGlobalHistory || history) {
+  if (history) {
     uint32_t visitURIFlags = 0;
 
     if (!IsFrame()) {
       visitURIFlags |= IHistory::TOP_LEVEL;
     }
 
     if (aChannelRedirectFlags & nsIChannelEventSink::REDIRECT_TEMPORARY) {
       visitURIFlags |= IHistory::REDIRECT_TEMPORARY;
@@ -12805,24 +12738,17 @@ nsDocShell::AddURIVisit(nsIURI* aURI,
     // 408 is special cased, since may actually indicate a temporary
     // connection problem.
     else if (aResponseStatus != 408 &&
              ((aResponseStatus >= 400 && aResponseStatus <= 501) ||
               aResponseStatus == 505)) {
       visitURIFlags |= IHistory::UNRECOVERABLE_ERROR;
     }
 
-    if (mPrerenderGlobalHistory) {
-      mPrerenderGlobalHistory->VisitURI(aURI,
-                                        aPreviousURI,
-                                        aReferrerURI,
-                                        visitURIFlags);
-    } else {
-      (void)history->VisitURI(aURI, aPreviousURI, visitURIFlags);
-    }
+    (void)history->VisitURI(aURI, aPreviousURI, visitURIFlags);
   } else if (mGlobalHistory) {
     // Falls back to sync global history interface.
     (void)mGlobalHistory->AddURI(aURI,
                                  !!aChannelRedirectFlags,
                                  !IsFrame(),
                                  aReferrerURI);
   }
 }
@@ -13780,17 +13706,16 @@ nsDocShell::OnLinkClickSync(nsIContent* 
                              aPostDataStreamLength,     // Post data stream length
                              aHeadersDataStream,        // Headers stream
                              loadType,                  // Load type
                              nullptr,                   // No SHEntry
                              true,                      // first party site
                              VoidString(),              // No srcdoc
                              this,                      // We are the source
                              nullptr,                   // baseURI not needed
-                             true,                      // Check for prerendered doc
                              aDocShell,                 // DocShell out-param
                              aRequest);                 // Request out-param
   if (NS_SUCCEEDED(rv)) {
     nsPingListener::DispatchPings(this, aContent, aURI, referer, refererPolicy);
   }
   return rv;
 }
 
@@ -14210,19 +14135,17 @@ nsDocShell::HasUnloadedParent()
   return false;
 }
 
 void
 nsDocShell::UpdateGlobalHistoryTitle(nsIURI* aURI)
 {
   if (mUseGlobalHistory && !UsePrivateBrowsing()) {
     nsCOMPtr<IHistory> history = services::GetHistoryService();
-    if (mPrerenderGlobalHistory) {
-      mPrerenderGlobalHistory->SetURITitle(aURI, mTitle);
-    } else if (history) {
+    if (history) {
       history->SetURITitle(aURI, mTitle);
     } else if (mGlobalHistory) {
       mGlobalHistory->SetPageTitle(aURI, nsString(mTitle));
     }
   }
 }
 
 bool
--- a/docshell/base/nsDocShell.h
+++ b/docshell/base/nsDocShell.h
@@ -66,17 +66,16 @@
 namespace mozilla {
 class Encoding;
 class HTMLEditor;
 enum class TaskCategory;
 namespace dom {
 class ClientInfo;
 class ClientSource;
 class EventTarget;
-class PendingGlobalHistoryEntry;
 typedef uint32_t ScreenOrientationInternal;
 } // namespace dom
 } // namespace mozilla
 
 class nsIClipboardDragDropHookList;
 class nsICommandManager;
 class nsIContentViewer;
 class nsIController;
@@ -906,17 +905,16 @@ private: // data members
   nsString mCustomUserAgent;
   nsCString mOriginalUriString;
   nsWeakPtr mOnePermittedSandboxedNavigator;
   nsWeakPtr mOpener;
   nsTObserverArray<nsWeakPtr> mPrivacyObservers;
   nsTObserverArray<nsWeakPtr> mReflowObservers;
   nsTObserverArray<nsWeakPtr> mScrollObservers;
   mozilla::OriginAttributes mOriginAttributes;
-  mozilla::UniquePtr<mozilla::dom::PendingGlobalHistoryEntry> mPrerenderGlobalHistory;
   mozilla::UniquePtr<mozilla::dom::ClientSource> mInitialClientSource;
   RefPtr<nsDOMNavigationTiming> mTiming;
   RefPtr<nsDSURIContentListener> mContentListener;
   RefPtr<nsGlobalWindowOuter> mScriptGlobal;
   nsCOMPtr<nsIPrincipal> mParentCharsetPrincipal;
   nsCOMPtr<nsILoadURIDelegate> mLoadURIDelegate;
   nsCOMPtr<nsIMutableArray> mRefreshURIList;
   nsCOMPtr<nsIMutableArray> mSavedRefreshURIList;
@@ -1108,17 +1106,16 @@ private: // data members
   bool mAllowContentRetargetingOnChildren : 1;
   bool mUseErrorPages : 1;
   bool mObserveErrorPages : 1;
   bool mAllowAuth : 1;
   bool mAllowKeywordFixup : 1;
   bool mIsOffScreenBrowser : 1;
   bool mIsActive : 1;
   bool mDisableMetaRefreshWhenInactive : 1;
-  bool mIsPrerendered : 1;
   bool mIsAppTab : 1;
   bool mUseGlobalHistory : 1;
   bool mUseRemoteTabs : 1;
   bool mUseTrackingProtection : 1;
   bool mDeviceSizeIsPageSize : 1;
   bool mWindowDraggingAllowed : 1;
   bool mInFrameSwap : 1;
   bool mInheritPrivateBrowsingId : 1;
--- a/docshell/base/nsIDocShell.idl
+++ b/docshell/base/nsIDocShell.idl
@@ -214,17 +214,16 @@ interface nsIDocShell : nsIDocShellTreeI
                               in long long aPostDataStreamLength,
                               in nsIInputStream aHeadersStream,
                               in unsigned long aLoadFlags,
                               in nsISHEntry aSHEntry,
                               in boolean aFirstParty,
                               in AString aSrcdoc,
                               in nsIDocShell aSourceDocShell,
                               in nsIURI aBaseURI,
-                              in boolean aCheckForPrerender,
                               out nsIDocShell aDocShell,
                               out nsIRequest aRequest);
 
   /**
    * Do either a history.pushState() or history.replaceState() operation,
    * depending on the value of aReplace.
    */
   [implicit_jscontext]
@@ -673,27 +672,16 @@ interface nsIDocShell : nsIDocShellTreeI
   /**
    * Sets whether a docshell is active. An active docshell is one that is
    * visible, and thus is not a good candidate for certain optimizations
    * like image frame discarding. Docshells are active unless told otherwise.
    */
   attribute boolean isActive;
 
   /**
-   * Puts the docshell in prerendering mode. noscript because we want only
-   * native code to be able to put a docshell in prerendering.
-   */
-  [noscript] void SetIsPrerendered();
-
-  /**
-   * Whether this docshell is in prerender mode.
-   */
-  [infallible] readonly attribute boolean isPrerendered;
-
-  /**
    * The ID of the docshell in the session history.
    */
   readonly attribute nsIDPtr historyID;
 
   /**
    * Helper method for accessing this value from C++
    */
   [noscript, notxpcom] nsID HistoryID();
--- a/docshell/shistory/moz.build
+++ b/docshell/shistory/moz.build
@@ -1,19 +1,16 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
 XPIDL_SOURCES += [
     'nsIBFCacheEntry.idl',
-    'nsIGroupedSHistory.idl',
-    'nsIPartialSHistory.idl',
-    'nsIPartialSHistoryListener.idl',
     'nsISHContainer.idl',
     'nsISHEntry.idl',
     'nsISHistory.idl',
     'nsISHistoryInternal.idl',
     'nsISHistoryListener.idl',
     'nsISHTransaction.idl',
 ]
 
deleted file mode 100644
--- a/docshell/shistory/nsIGroupedSHistory.idl
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-interface nsIFrameLoader;
-interface nsIPartialSHistory;
-
-/**
- * nsIGroupedSHistory represent a combined session history across multiple
- * root docshells (usually browser tabs). The participating nsISHistory can
- * either be in chrome process or in content process, but nsIGroupedSHistory
- * itself lives in chrome process. The communication is proxyed through
- * nsIPartialSHistory.
- */
-[scriptable, builtinclass, uuid(813e498d-73a8-449a-be09-6187e62c5352)]
-interface nsIGroupedSHistory : nsISupports
-{
-  // The total number of entries of all its partial session histories.
-  [infallible] readonly attribute unsigned long count;
-
-  /**
-   * The currently active frameloader controlled by this nsIGroupedSHistory.
-   */
-  readonly attribute nsIFrameLoader activeFrameLoader;
-
-  /**
-   * Remove all partial histories after currently active one (if any) and then
-   * append the given partial session history to the end of the list.
-   */
-  void appendPartialSHistory(in nsIPartialSHistory aPartialHistory);
-
-  /**
-   * Notify the grouped session history that the active partial session history
-   * has been modified.
-   *
-   * @param aPartialHistory The partial history which was updated
-   * @param aTruncate If this parameter is true, all partial session histories
-   *                  after this one will be removed.
-   */
-  void handleSHistoryUpdate(in nsIPartialSHistory aPartialHistory, in boolean aTruncate);
-
-  /**
-   * Find the proper partial session history and navigate to the entry
-   * corresponding to the given global index. Note it doesn't swap frameloaders,
-   * but rather return the target loader for the caller to swap.
-   *
-   * This function may throw NS_ERROR_NOT_AVAILABLE if the frameloader to swap
-   * to is dead.
-   *
-   * @param  aGlobalIndex
-   *         The global index to navigate to.
-   * @return The frameloader which needs to be swapped in, or null if no
-   *         frameloader needs to be swapped.
-   */
-  nsIFrameLoader gotoIndex(in unsigned long aGlobalIndex);
-
-  /**
-   * Close the FrameLoaderOwners of the inactive PartialSHistories in this GlobalSHistory.
-   * This does not remove the PartialSHistories from the GroupedSHistory.
-   */
-  void closeInactiveFrameLoaderOwners();
-
-  /**
-   * Add a partialSHistory as a "prerendering" partialSHistory. This
-   * partialSHistory's tab will have its lifetime managed by the
-   * GroupedSHistory, and will be closed when closeInactiveFrameLoaderOwners is
-   * called, or whenever a SHistory update is received.
-   */
-  void addPrerenderingPartialSHistory(in nsIPartialSHistory aPrerendering, in long aId);
-
-  /**
-   * Switch to the prerendering partialSHistory identified by aId, appending it after the current partialSHistory.
-   */
-  [implicit_jscontext] nsISupports activatePrerendering(in long aId);
-
-  /**
-   * Cancel the prerendering with the given ID.
-   */
-  void cancelPrerendering(in long aId);
-};
deleted file mode 100644
--- a/docshell/shistory/nsIPartialSHistory.idl
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-interface nsIGroupedSHistory;
-interface nsIFrameLoader;
-
-/**
- * nsIPartialSHistory represents a part of nsIGroupedSHistory. It associates to
- * a "partial" nsISHistory in either local or remote process.
- */
-[scriptable, builtinclass, uuid(5cd75e28-838c-4a0a-972e-6005f736ef7a)]
-interface nsIPartialSHistory : nsISupports
-{
-  // The number of entries of its corresponding nsISHistory.
-  [infallible] readonly attribute unsigned long count;
-
-  // The current global index of the active shentry in this partialSHistory.
-  [infallible] readonly attribute long globalIndex;
-
-  // If it's part of a grouped session history, globalIndexOffset denotes the
-  // number of entries ahead.
-  [infallible] readonly attribute unsigned long globalIndexOffset;
-
-  // The frameloader which owns this partial session history.
-  readonly attribute nsIFrameLoader ownerFrameLoader;
-
-  // The groupedSHistory which this partialSHistory is a part of, or null.
-  readonly attribute nsIGroupedSHistory groupedSHistory;
-
-  // The current state of the nsIPartialSHistory, whether it is active,
-  // inactive, or currently prerendering.
-  const long STATE_INACTIVE = 0;
-  const long STATE_ACTIVE = 1;
-  const long STATE_PRERENDER = 2;
-
-  [infallible] attribute long activeState;
-
-  /**
-   * Notify that it's been added to a grouped session history. It also implies
-   * it's becoming the active partial history of the group.
-   *
-   * @param aGroup                 The GroupedSHistory which this partialSHistory
-   *                               is joining.
-   *
-   * @param aOffset                The number of entries in preceding partial
-   *                               session histories.
-   */
-  void onAttachGroupedSHistory(in nsIGroupedSHistory aGroup, in unsigned long aOffset);
-
-  /**
-   * This method is used by the TabParent to notify the PartialSHistory
-   * that the state of its corresponding nsISHistory in the content process
-   * has been updated. It is unused in the in-process case.
-   *
-   * @param aCount      The number of entries in the associated session history.
-   * @param aLocalIndex The local index of the currently active entry in the
-   *                    associated session history
-   */
-  void handleSHistoryUpdate(in unsigned long aCount, in unsigned long aLocalIndex, in boolean aTruncate);
-
-  /**
-   * Notify that the partial session history has been swapped in as the active
-   * session history. Only an active session history can possibly add / remove /
-   * replace its history entries.
-   *
-   * @param aGlobalLength      The up-to-date global length.
-   * @param aTargetLocalIndex  The local index to navigate to.
-   */
-  void onActive(in unsigned long aGlobalLength, in unsigned long aTargetLocalIndex);
-
-  /**
-   * Notify that the partial session history has been swapped out and is no
-   * longer active.
-   */
-  void onDeactive();
-};
deleted file mode 100644
--- a/docshell/shistory/nsIPartialSHistoryListener.idl
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/.
- */
-
-#include "nsISupports.idl"
-
-/**
- * Listener to handle cross partial nsISHistory navigation requests.
- */
-[scriptable, uuid(be0cd2b6-6f03-4366-9fe2-184c914ff3df)]
-interface nsIPartialSHistoryListener : nsISupports
-{
-  /**
-   * Called when the navigation target belongs to another nsISHistory within
-   * the same nsIGroupedSHistory, and it needs to initiate cross nsISHistory
-   * navigation.
-   *
-   * @param aIndex The index of complete history to navigate to.
-   */
-   void onRequestCrossBrowserNavigation(in unsigned long aIndex);
-};
--- a/docshell/shistory/nsISHistory.idl
+++ b/docshell/shistory/nsISHistory.idl
@@ -3,17 +3,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 interface nsISHEntry;
 interface nsISHistoryListener;
 interface nsISimpleEnumerator;
-interface nsIPartialSHistoryListener;
 
 /**
  * An interface to the primary properties of the Session History
  * component. In an embedded browser environment, the nsIWebBrowser
  * object creates an instance of session history for each open window.
  * A handle to the session history object can be obtained from
  * nsIWebNavigation. In a non-embedded situation, the  owner of the
  * session history component must create a instance of it and set
@@ -37,61 +36,29 @@ interface nsISHistory: nsISupports
    * bfcache around the currently active SHEntry.
    *
    * We try to keep viewers for SHEntries between index - VIEWER_WINDOW and
    * index + VIEWER_WINDOW alive.
    */
   const long VIEWER_WINDOW = 3;
 
   /**
-   * An attribute denoting whether the nsISHistory is associated to a grouped
-   * session history.
-   *
-   * The abstraction of grouped session history is implemented at
-   * nsIWebNavigation level, so those canGoBack / canGoForward / gotoIndex
-   * functions work transparently;
-   *
-   * On the other hand, nsISHistory works on partial session history directly.
-   * Unless otherwise specified, count / index attributes and parameters all
-   * indicate local count / index, so we won't mess up docshell.
-   */
-   readonly attribute bool isPartial;
-
-  /**
    * A readonly property of the interface that returns 
    * the number of toplevel documents currently available
    * in session history.
    */
    readonly attribute long count;
 
   /**
-   * If isPartial, globalCount denotes the total number of entries in the
-   * grouped session history; Otherwise it has the same value as count.
-   */
-   readonly attribute long globalCount;
-
-  /**
-   * A readonly property which represents the difference between global indices
-   * of grouped session history and local indices of this particular session
-   * history object.
-   */
-   readonly attribute long globalIndexOffset;
-
-  /**
    * A readonly property of the interface that returns
    * the index of the current document in session history.
    */
    readonly attribute long index;
 
   /**
-   * A readonly property which equals index + globalIndexOffset.
-   */
-   readonly attribute long globalIndex;
-
-  /**
    * A readonly property of the interface that returns
    * the index of the last document that started to load and
    * didn't finished yet. When document finishes the loading
    * value -1 is returned.
    */
    readonly attribute long requestedIndex;
 
   /**
@@ -169,22 +136,16 @@ interface nsISHistory: nsISupports
    * @note                    A listener object must implement 
    *                          nsISHistoryListener and nsSupportsWeakReference
    * @see nsISHistoryListener
    * @see nsSupportsWeakReference
    */ 
    void removeSHistoryListener(in nsISHistoryListener aListener);
 
   /**
-   * Set the listener to handle cross nsISHistory navigation when it works
-   * in "partial" mode.
-   */
-   void setPartialSHistoryListener(in nsIPartialSHistoryListener aListener);
-
-  /**
    * Called to obtain a enumerator for all the  documents stored in
    * session history. The enumerator object thus returned by this method
    * can be traversed using nsISimpleEnumerator. 
    *
    * @note  To access individual history entries of the enumerator, perform the
    *        following steps:
    *        1) Call nsISHistory->GetSHistoryEnumerator() to obtain handle 
    *           the nsISimpleEnumerator object.
@@ -210,33 +171,9 @@ interface nsISHistory: nsISupports
    * @param aEntry            The entry to obtain the index of.
    *
    * @return                  <code>NS_OK</code> index for the history entry
    *                          is obtained successfully.
    *                          <code>NS_ERROR_FAILURE</code> Error in obtaining
    *                          index for the given history entry.
    */
    long getIndexOfEntry(in nsISHEntry aEntry);
-
-  /**
-   * Called when this nsISHistory has became the active history of a grouped
-   * session history.
-   *
-   * @param globalLength      The up to date number of entries in the grouped
-   *                          session history.
-   * @param targetIndex       The local index to navigate to.
-   */
-   void onPartialSHistoryActive(in long globalLength, in long targetIndex);
-
-  /**
-   * Called when this nsISHistory has became inactive history of a grouped
-   * session history.
-   */
-   void onPartialSHistoryDeactive();
-
-  /**
-   * Called when it's attached to a nsIGroupedSHistory instance.
-   *
-   * @param offset            The number of entries in the grouped session
-   *                          history before this session history object.
-   */
-   void onAttachGroupedSHistory(in long offset);
 };
--- a/docshell/shistory/nsSHistory.cpp
+++ b/docshell/shistory/nsSHistory.cpp
@@ -230,20 +230,17 @@ nsSHistory::EvictContentViewerForTransac
     RemoveDynEntries(index, container);
   }
 }
 
 nsSHistory::nsSHistory()
   : mIndex(-1)
   , mLength(0)
   , mRequestedIndex(-1)
-  , mGlobalIndexOffset(0)
-  , mEntriesInFollowingPartialHistories(0)
   , mRootDocShell(nullptr)
-  , mIsPartial(false)
 {
   // Add this new SHistory object to the list
   gSHistoryList.insertBack(this);
 }
 
 nsSHistory::~nsSHistory()
 {
 }
@@ -661,121 +658,47 @@ nsSHistory::AddEntry(nsISHEntry* aSHEntr
 
   // A little tricky math here...  Basically when adding an object regardless of
   // what the length was before, it should always be set back to the current and
   // lop off the forward.
   mLength = (++mIndex + 1);
   NOTIFY_LISTENERS(OnLengthChanged, (mLength));
   NOTIFY_LISTENERS(OnIndexChanged, (mIndex));
 
-  // Much like how mLength works above, when changing our entries, all following
-  // partial histories should be purged, so we just reset the number to zero.
-  mEntriesInFollowingPartialHistories = 0;
-
   // If this is the very first transaction, initialize the list
   if (!mListRoot) {
     mListRoot = txn;
   }
 
   // Purge History list if it is too long
   if (gHistoryMaxSize >= 0 && mLength > gHistoryMaxSize) {
     PurgeHistory(mLength - gHistoryMaxSize);
   }
 
   return NS_OK;
 }
 
-NS_IMETHODIMP
-nsSHistory::GetIsPartial(bool* aResult)
-{
-  NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = mIsPartial;
-  return NS_OK;
-}
-
 /* Get size of the history list */
 NS_IMETHODIMP
 nsSHistory::GetCount(int32_t* aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
   *aResult = mLength;
   return NS_OK;
 }
 
-NS_IMETHODIMP
-nsSHistory::GetGlobalCount(int32_t* aResult)
-{
-  NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = mGlobalIndexOffset + mLength + mEntriesInFollowingPartialHistories;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsSHistory::GetGlobalIndexOffset(int32_t* aResult)
-{
-  NS_ENSURE_ARG_POINTER(aResult);
-  *aResult = mGlobalIndexOffset;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsSHistory::OnPartialSHistoryActive(int32_t aGlobalLength, int32_t aTargetIndex)
-{
-  NS_ENSURE_TRUE(mRootDocShell && mIsPartial, NS_ERROR_UNEXPECTED);
-
-  int32_t extraLength = aGlobalLength - mLength - mGlobalIndexOffset;
-  NS_ENSURE_TRUE(extraLength >= 0, NS_ERROR_UNEXPECTED);
-
-  if (extraLength != mEntriesInFollowingPartialHistories) {
-    mEntriesInFollowingPartialHistories = extraLength;
-  }
-
-  return RestoreToEntryAtIndex(aTargetIndex);
-}
-
-NS_IMETHODIMP
-nsSHistory::OnPartialSHistoryDeactive()
-{
-  NS_ENSURE_TRUE(mRootDocShell && mIsPartial, NS_ERROR_UNEXPECTED);
-
-  // Ensure the deactive docshell loads about:blank.
-  nsCOMPtr<nsIWebNavigation> webNav = do_QueryInterface(mRootDocShell);
-  nsCOMPtr<nsIURI> currentURI;
-  webNav->GetCurrentURI(getter_AddRefs(currentURI));
-  if (NS_IsAboutBlank(currentURI)) {
-    return NS_OK;
-  }
-
-  // At this point we've swapped out to an invisble tab, and can not prompt here.
-  // The check should have been done in nsDocShell::InternalLoad, so we'd
-  // just force docshell to load about:blank.
-  if (NS_FAILED(mRootDocShell->ForceCreateAboutBlankContentViewer(nullptr))) {
-    return NS_ERROR_FAILURE;
-  }
-
-  return NS_OK;
-}
-
 /* Get index of the history list */
 NS_IMETHODIMP
 nsSHistory::GetIndex(int32_t* aResult)
 {
   NS_PRECONDITION(aResult, "null out param?");
   *aResult = mIndex;
   return NS_OK;
 }
 
-NS_IMETHODIMP
-nsSHistory::GetGlobalIndex(int32_t* aResult)
-{
-  NS_PRECONDITION(aResult, "null out param?");
-  *aResult = mIndex + mGlobalIndexOffset;
-  return NS_OK;
-}
-
 /* Get the requestedIndex */
 NS_IMETHODIMP
 nsSHistory::GetRequestedIndex(int32_t* aResult)
 {
   NS_PRECONDITION(aResult, "null out param?");
   *aResult = mRequestedIndex;
   return NS_OK;
 }
@@ -1017,19 +940,16 @@ nsSHistory::PurgeHistory(int32_t aEntrie
     if (mListRoot) {
       mListRoot->SetPrev(nullptr);
     }
     cnt++;
   }
   mLength -= cnt;
   mIndex -= cnt;
 
-  // All following partial histories will be deleted in this case.
-  mEntriesInFollowingPartialHistories = 0;
-
   // Now if we were not at the end of the history, mIndex could have
   // become far too negative.  If so, just set it to -1.
   if (mIndex < -1) {
     mIndex = -1;
   }
 
   NOTIFY_LISTENERS(OnLengthChanged, (mLength));
   NOTIFY_LISTENERS(OnIndexChanged, (mIndex))
@@ -1063,23 +983,16 @@ nsSHistory::RemoveSHistoryListener(nsISH
 {
   // Make sure the listener that wants to be removed is the
   // one we have in store.
   nsWeakPtr listener = do_GetWeakReference(aListener);
   mListeners.RemoveElement(listener);
   return NS_OK;
 }
 
-NS_IMETHODIMP
-nsSHistory::SetPartialSHistoryListener(nsIPartialSHistoryListener* aListener)
-{
-  mPartialHistoryListener = do_GetWeakReference(aListener);
-  return NS_OK;
-}
-
 /* Replace an entry in the History list at a particular index.
  * Do not update index or count.
  */
 NS_IMETHODIMP
 nsSHistory::ReplaceEntry(int32_t aIndex, nsISHEntry* aReplaceEntry)
 {
   NS_ENSURE_ARG(aReplaceEntry);
   nsresult rv;
@@ -1148,42 +1061,32 @@ nsSHistory::EvictAllContentViewers()
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSHistory::GetCanGoBack(bool* aCanGoBack)
 {
   NS_ENSURE_ARG_POINTER(aCanGoBack);
 
-  if (mGlobalIndexOffset) {
-    *aCanGoBack = true;
-    return NS_OK;
-  }
-
   int32_t index = -1;
   NS_ENSURE_SUCCESS(GetIndex(&index), NS_ERROR_FAILURE);
   if (index > 0) {
     *aCanGoBack = true;
     return NS_OK;
   }
 
   *aCanGoBack = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSHistory::GetCanGoForward(bool* aCanGoForward)
 {
   NS_ENSURE_ARG_POINTER(aCanGoForward);
 
-  if (mEntriesInFollowingPartialHistories) {
-    *aCanGoForward = true;
-    return NS_OK;
-  }
-
   int32_t index = -1;
   int32_t count = -1;
   NS_ENSURE_SUCCESS(GetIndex(&index), NS_ERROR_FAILURE);
   NS_ENSURE_SUCCESS(GetCount(&count), NS_ERROR_FAILURE);
   if (index >= 0 && index < (count - 1)) {
     *aCanGoForward = true;
     return NS_OK;
   }
@@ -1766,17 +1669,16 @@ nsSHistory::RemoveDuplicate(int32_t aInd
     // NB: We don't need to guard on mRequestedIndex being nonzero here,
     // because either they're strictly greater than aIndex which is at least
     // zero, or they are equal to aIndex in which case aKeepNext must be true
     // if aIndex is zero.
     if (mRequestedIndex > aIndex || (mRequestedIndex == aIndex && !aKeepNext)) {
       mRequestedIndex = mRequestedIndex - 1;
     }
     --mLength;
-    mEntriesInFollowingPartialHistories = 0;
     NOTIFY_LISTENERS(OnLengthChanged, (mLength));
     return true;
   }
   return false;
 }
 
 NS_IMETHODIMP_(void)
 nsSHistory::RemoveEntries(nsTArray<nsID>& aIDs, int32_t aStartIndex)
@@ -1926,22 +1828,19 @@ nsSHistory::LoadURI(const char16_t* aURI
                     nsIInputStream* aPostStream,
                     nsIInputStream* aExtraHeaderStream,
                     nsIPrincipal* aTriggeringPrincipal)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsSHistory::GotoIndex(int32_t aGlobalIndex)
+nsSHistory::GotoIndex(int32_t aIndex)
 {
-  // We provide abstraction of grouped session history for nsIWebNavigation
-  // functions, so the index passed in here is global index.
-  return LoadEntry(aGlobalIndex - mGlobalIndexOffset, nsIDocShellLoadInfo::loadHistory,
-                   HIST_CMD_GOTOINDEX);
+  return LoadEntry(aIndex, nsIDocShellLoadInfo::loadHistory, HIST_CMD_GOTOINDEX);
 }
 
 nsresult
 nsSHistory::LoadNextPossibleEntry(int32_t aNewIndex, long aLoadType,
                                   uint32_t aHistCmd)
 {
   mRequestedIndex = -1;
   if (aNewIndex < mIndex) {
@@ -1958,60 +1857,45 @@ nsSHistory::LoadEntry(int32_t aIndex, lo
 {
   if (!mRootDocShell) {
     return NS_ERROR_FAILURE;
   }
 
   nsCOMPtr<nsIURI> nextURI;
   nsCOMPtr<nsISHEntry> prevEntry;
   nsCOMPtr<nsISHEntry> nextEntry;
-  bool isCrossBrowserNavigation = false;
   if (aIndex < 0 || aIndex >= mLength) {
-    if (aIndex + mGlobalIndexOffset < 0) {
-      // The global index is negative.
-      return NS_ERROR_FAILURE;
-    }
-
-    if (aIndex - mLength >= mEntriesInFollowingPartialHistories) {
-      // The global index exceeds max possible value.
-      return NS_ERROR_FAILURE;
-    }
-
-    // The global index is valid. Mark that we're going to navigate to another
-    // partial history, but wait until we've notified all listeners before
-    // actually do so.
-    isCrossBrowserNavigation = true;
-  } else {
-    // This is a normal local history navigation.
-    // Keep note of requested history index in mRequestedIndex.
-    mRequestedIndex = aIndex;
-
-    GetEntryAtIndex(mIndex, false, getter_AddRefs(prevEntry));
-    GetEntryAtIndex(mRequestedIndex, false, getter_AddRefs(nextEntry));
-    if (!nextEntry || !prevEntry) {
-      mRequestedIndex = -1;
-      return NS_ERROR_FAILURE;
-    }
-
-    // Remember that this entry is getting loaded at this point in the sequence
-    nsCOMPtr<nsISHEntryInternal> entryInternal = do_QueryInterface(nextEntry);
-
-    if (entryInternal) {
-      entryInternal->SetLastTouched(++gTouchCounter);
-    }
-
-    // Get the uri for the entry we are about to visit
-    nextEntry->GetURI(getter_AddRefs(nextURI));
+    // The index is out of range
+    return NS_ERROR_FAILURE;
   }
 
-  MOZ_ASSERT(isCrossBrowserNavigation || (prevEntry && nextEntry && nextURI),
-    "prevEntry, nextEntry and nextURI can be null only if isCrossBrowserNavigation is set");
+  // This is a normal local history navigation.
+  // Keep note of requested history index in mRequestedIndex.
+  mRequestedIndex = aIndex;
+
+  GetEntryAtIndex(mIndex, false, getter_AddRefs(prevEntry));
+  GetEntryAtIndex(mRequestedIndex, false, getter_AddRefs(nextEntry));
+  if (!nextEntry || !prevEntry) {
+    mRequestedIndex = -1;
+    return NS_ERROR_FAILURE;
+  }
 
-  // Send appropriate listener notifications. Note nextURI could be null in case
-  // of grouped session history navigation.
+  // Remember that this entry is getting loaded at this point in the sequence
+  nsCOMPtr<nsISHEntryInternal> entryInternal = do_QueryInterface(nextEntry);
+
+  if (entryInternal) {
+    entryInternal->SetLastTouched(++gTouchCounter);
+  }
+
+  // Get the uri for the entry we are about to visit
+  nextEntry->GetURI(getter_AddRefs(nextURI));
+
+  MOZ_ASSERT((prevEntry && nextEntry && nextURI), "prevEntry, nextEntry and nextURI can't be null");
+
+  // Send appropriate listener notifications.
   bool canNavigate = true;
   if (aHistCmd == HIST_CMD_BACK) {
     // We are going back one entry. Send GoBack notifications
     NOTIFY_LISTENERS_CANCELABLE(OnHistoryGoBack, canNavigate,
                                 (nextURI, &canNavigate));
   } else if (aHistCmd == HIST_CMD_FORWARD) {
     // We are going forward. Send GoForward notification
     NOTIFY_LISTENERS_CANCELABLE(OnHistoryGoForward, canNavigate,
@@ -2024,33 +1908,16 @@ nsSHistory::LoadEntry(int32_t aIndex, lo
 
   if (!canNavigate) {
     // If the listener asked us not to proceed with
     // the operation, simply return.
     mRequestedIndex = -1;
     return NS_OK;  // XXX Maybe I can return some other error code?
   }
 
-  if (isCrossBrowserNavigation) {
-    nsCOMPtr<nsIPartialSHistoryListener> listener =
-      do_QueryReferent(mPartialHistoryListener);
-    if (!listener) {
-      return NS_ERROR_FAILURE;
-    }
-
-    // CreateAboutBlankContentViewer would check for permit unload, fire proper
-    // pagehide / unload events and transfer content viewer ownership to SHEntry.
-    if (NS_FAILED(mRootDocShell->CreateAboutBlankContentViewer(nullptr))) {
-      return NS_ERROR_FAILURE;
-    }
-
-    return listener->OnRequestCrossBrowserNavigation(aIndex +
-                                                     mGlobalIndexOffset);
-  }
-
   if (mRequestedIndex == mIndex) {
     // Possibly a reload case
     return InitiateLoad(nextEntry, mRootDocShell, aLoadType);
   }
 
   // Going back or forward.
   bool differenceFound = false;
   nsresult rv = LoadDifferingEntries(prevEntry, nextEntry, mRootDocShell,
@@ -2231,35 +2098,16 @@ NS_IMETHODIMP
 nsSHistory::GetSHistoryEnumerator(nsISimpleEnumerator** aEnumerator)
 {
   NS_ENSURE_ARG_POINTER(aEnumerator);
   RefPtr<nsSHEnumerator> iterator = new nsSHEnumerator(this);
   iterator.forget(aEnumerator);
   return NS_OK;
 }
 
-NS_IMETHODIMP
-nsSHistory::OnAttachGroupedSHistory(int32_t aOffset)
-{
-  NS_ENSURE_TRUE(!mIsPartial && mRootDocShell, NS_ERROR_UNEXPECTED);
-  NS_ENSURE_TRUE(aOffset >= 0, NS_ERROR_ILLEGAL_VALUE);
-
-  mIsPartial = true;
-  mGlobalIndexOffset = aOffset;
-
-  // The last attached history is always at the end of the group.
-  mEntriesInFollowingPartialHistories = 0;
-
-  // Setting grouped history info may change canGoBack / canGoForward.
-  // Send a location change to update these values.
-  mRootDocShell->DispatchLocationChangeEvent();
-  return NS_OK;
-
-}
-
 nsSHEnumerator::nsSHEnumerator(nsSHistory* aSHistory) : mIndex(-1)
 {
   mSHistory = aSHistory;
 }
 
 nsSHEnumerator::~nsSHEnumerator()
 {
   mSHistory = nullptr;
--- a/docshell/shistory/nsSHistory.h
+++ b/docshell/shistory/nsSHistory.h
@@ -4,17 +4,16 @@
  * 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/. */
 
 #ifndef nsSHistory_h
 #define nsSHistory_h
 
 #include "nsCOMPtr.h"
 #include "nsExpirationTracker.h"
-#include "nsIPartialSHistoryListener.h"
 #include "nsISHistory.h"
 #include "nsISHistoryInternal.h"
 #include "nsISimpleEnumerator.h"
 #include "nsIWebNavigation.h"
 #include "nsSHEntryShared.h"
 #include "nsTObserverArray.h"
 #include "nsWeakReference.h"
 
@@ -177,34 +176,22 @@ private:
   // Track all bfcache entries and evict on expiration.
   mozilla::UniquePtr<HistoryTracker> mHistoryTracker;
 
   nsCOMPtr<nsISHTransaction> mListRoot;
   int32_t mIndex;
   int32_t mLength;
   int32_t mRequestedIndex;
 
-  // The number of entries before this session history object.
-  int32_t mGlobalIndexOffset;
-
-  // The number of entries after this session history object.
-  int32_t mEntriesInFollowingPartialHistories;
-
   // Session History listeners
   nsAutoTObserverArray<nsWeakPtr, 2> mListeners;
 
-  // Partial session history listener
-  nsWeakPtr mPartialHistoryListener;
-
   // Weak reference. Do not refcount this.
   nsIDocShell* mRootDocShell;
 
-  // Set to true if attached to a grouped session history.
-  bool mIsPartial;
-
   // Max viewers allowed total, across all SHistory objects
   static int32_t sHistoryMaxTotalViewers;
 };
 
 class nsSHEnumerator : public nsISimpleEnumerator
 {
 public:
   NS_DECL_ISUPPORTS
--- a/docshell/test/browser/browser.ini
+++ b/docshell/test/browser/browser.ini
@@ -101,16 +101,10 @@ skip-if = os == 'win' && !debug # bug 13
 [browser_tab_touch_events.js]
 [browser_timelineMarkers-01.js]
 [browser_timelineMarkers-02.js]
 skip-if = true # Bug 1220415
 [browser_timelineMarkers-03.js]
 [browser_timelineMarkers-04.js]
 [browser_timelineMarkers-05.js]
 [browser_ua_emulation.js]
-[browser_grouped_shistory_dead_navigate.js]
-skip-if = !e10s
-[browser_grouped_shistory_crossproc.js]
-skip-if = !e10s
-[browser_grouped_shistory_bfcache_cleaning.js]
-skip-if = !e10s
 [browser_history_triggeringprincipal_viewsource.js]
 [browser_click_link_within_view_source.js]
deleted file mode 100644
--- a/docshell/test/browser/browser_grouped_shistory_bfcache_cleaning.js
+++ /dev/null
@@ -1,59 +0,0 @@
-add_task(async function() {
-  await SpecialPowers.pushPrefEnv({
-    set: [["browser.groupedhistory.enabled", true]]
-  });
-
-  // Wait for a process change and then fulfil the promise.
-  function awaitProcessChange(browser) {
-    return new Promise(resolve => {
-      browser.addEventListener("BrowserChangedProcess", function(e) {
-        ok(true, "The browser changed process!");
-        resolve();
-      }, {once: true});
-    });
-  }
-
-  function isAlive(tab) {
-    return tab.linkedBrowser &&
-      tab.linkedBrowser.frameLoader &&
-      !tab.linkedBrowser.frameLoader.isDead;
-  }
-
-  await BrowserTestUtils.withNewTab({ gBrowser, url: "data:text/html,a" }, async function(browser1) {
-    // Set up the grouped SHEntry setup
-    let tab2 = gBrowser.loadOneTab("data:text/html,b", {
-      referrerPolicy: Ci.nsIHttpChannel.REFERRER_POLICY_UNSET,
-      allowThirdPartyFixup: true,
-      relatedToCurrent: true,
-      isPrerendered: true,
-      triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
-    });
-    await BrowserTestUtils.browserLoaded(tab2.linkedBrowser);
-    browser1.frameLoader.appendPartialSHistoryAndSwap(tab2.linkedBrowser.frameLoader);
-    await awaitProcessChange(browser1);
-    ok(isAlive(tab2));
-
-    // Load some URIs and make sure that we lose the old process once we are 3 history entries away.
-    browser1.loadURI("data:text/html,c", null, null);
-    await BrowserTestUtils.browserLoaded(browser1);
-    ok(isAlive(tab2), "frameloader should still be alive");
-    browser1.loadURI("data:text/html,d", null, null);
-    await BrowserTestUtils.browserLoaded(browser1);
-    ok(isAlive(tab2), "frameloader should still be alive");
-    browser1.loadURI("data:text/html,e", null, null);
-    await BrowserTestUtils.browserLoaded(browser1);
-    ok(isAlive(tab2), "frameloader should still be alive");
-
-    // The 4th navigation should kill the frameloader
-    browser1.loadURI("data:text/html,f", null, null);
-    await new Promise(resolve => {
-      tab2.addEventListener("TabClose", function() {
-        ok(true, "The tab is being closed!\n");
-        resolve();
-      }, {once: true});
-    });
-    // We don't check for !isAlive() as TabClose is called during
-    // _beginRemoveTab, which means that the frameloader may not be dead yet. We
-    // avoid races by not checking.
-  });
-});
deleted file mode 100644
--- a/docshell/test/browser/browser_grouped_shistory_crossproc.js
+++ /dev/null
@@ -1,52 +0,0 @@
-add_task(async function() {
-  await SpecialPowers.pushPrefEnv({
-    set: [["browser.groupedhistory.enabled", true]]
-  });
-
-  // Wait for a process change and then fulfil the promise.
-  function awaitProcessChange(browser) {
-    return new Promise(resolve => {
-      browser.addEventListener("BrowserChangedProcess", function(e) {
-        ok(true, "The browser changed process!");
-        resolve();
-      }, {once: true});
-    });
-  }
-
-  // Wait for the given tab being closed.
-  function awaitTabClose(tab) {
-    return new Promise(resolve => {
-      tab.addEventListener("TabClose", function() {
-        ok(true, "The tab is being closed!\n");
-        resolve();
-      }, {once: true});
-    });
-  }
-
-  await BrowserTestUtils.withNewTab({ gBrowser, url: "data:text/html,a" }, async function(browser1) {
-    // Set up the grouped SHEntry setup
-    let tab2 = gBrowser.loadOneTab("data:text/html,b", {
-      referrerPolicy: Ci.nsIHttpChannel.REFERRER_POLICY_UNSET,
-      allowThirdPartyFixup: true,
-      relatedToCurrent: true,
-      isPrerendered: true,
-      triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
-    });
-    await BrowserTestUtils.browserLoaded(tab2.linkedBrowser);
-    browser1.frameLoader.appendPartialSHistoryAndSwap(tab2.linkedBrowser.frameLoader);
-    await awaitProcessChange(browser1);
-
-    // Load a URI which will involve loading in the parent process
-    let tabClose = awaitTabClose(tab2);
-    browser1.loadURI("about:config", Ci.nsIWebNavigation.LOAD_FLAGS_NONE, null, null, null);
-    await BrowserTestUtils.browserLoaded(browser1);
-    let docshell = browser1.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
-    ok(docshell, "The browser should be loaded in the chrome process");
-    is(docshell.canGoForward, false, "canGoForward is correct");
-    is(docshell.canGoBack, true, "canGoBack is correct");
-    is(docshell.sessionHistory.count, 3, "Count is correct");
-    is(browser1.frameLoader.groupedSHistory, null,
-       "browser1's session history is now complete");
-    await tabClose;
-  });
-});
deleted file mode 100644
--- a/docshell/test/browser/browser_grouped_shistory_dead_navigate.js
+++ /dev/null
@@ -1,45 +0,0 @@
-add_task(async function() {
-  await SpecialPowers.pushPrefEnv({
-    set: [["browser.groupedhistory.enabled", true],
-          ["dom.ipc.processCount", 1]]
-  });
-
-  // Wait for a process change and then fulfil the promise.
-  function awaitProcessChange(browser) {
-    return new Promise(resolve => {
-      browser.addEventListener("BrowserChangedProcess", function(e) {
-        ok(true, "The browser changed process!");
-        resolve();
-      }, {once: true});
-    });
-  }
-
-  await BrowserTestUtils.withNewTab({ gBrowser, url: "data:text/html,a" }, async function(browser1) {
-    // Set up the grouped SHEntry setup
-    let tab2 = gBrowser.loadOneTab("data:text/html,b", {
-      referrerPolicy: Ci.nsIHttpChannel.REFERRER_POLICY_UNSET,
-      allowThirdPartyFixup: true,
-      relatedToCurrent: true,
-      isPrerendered: true,
-      triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
-    });
-    await BrowserTestUtils.browserLoaded(tab2.linkedBrowser);
-    browser1.frameLoader.appendPartialSHistoryAndSwap(tab2.linkedBrowser.frameLoader);
-    await awaitProcessChange(browser1);
-
-    // Close tab2 such that the back frameloader is dead
-    await BrowserTestUtils.removeTab(tab2);
-    await BrowserTestUtils.waitForCondition(() => browser1.canGoBack);
-    browser1.goBack();
-    await BrowserTestUtils.browserLoaded(browser1);
-    await ContentTask.spawn(browser1, null, function() {
-      is(content.window.location + "", "data:text/html,a");
-      let webNav = content.window.QueryInterface(Ci.nsIInterfaceRequestor)
-            .getInterface(Ci.nsIWebNavigation);
-      is(webNav.canGoForward, true, "canGoForward is correct");
-      is(webNav.canGoBack, false, "canGoBack is correct");
-    });
-    is(browser1.frameLoader.groupedSHistory, null,
-       "browser1's session history is now complete");
-  });
-});
deleted file mode 100644
--- a/dom/base/GroupedSHistory.cpp
+++ /dev/null
@@ -1,354 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=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/. */
-
-#include "GroupedSHistory.h"
-
-#include "mozilla/dom/Promise.h"
-#include "TabParent.h"
-#include "PartialSHistory.h"
-
-namespace mozilla {
-namespace dom {
-
-NS_IMPL_CYCLE_COLLECTION_CLASS(GroupedSHistory)
-
-NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(GroupedSHistory)
-  NS_IMPL_CYCLE_COLLECTION_UNLINK(mPartialHistories)
-  tmp->mPrerenderingHistories.Clear();
-NS_IMPL_CYCLE_COLLECTION_UNLINK_END
-
-NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(GroupedSHistory)
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPartialHistories)
-  for (GroupedSHistory::PrerenderingHistory& h : tmp->mPrerenderingHistories) {
-    ImplCycleCollectionTraverse(cb, h.mPartialHistory, "mPrerenderingHistories[i]->mPartialHistory", 0);
-  }
-NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-
-NS_IMPL_CYCLE_COLLECTING_ADDREF(GroupedSHistory)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(GroupedSHistory)
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(GroupedSHistory)
-  NS_INTERFACE_MAP_ENTRY(nsIGroupedSHistory)
-  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIGroupedSHistory)
-NS_INTERFACE_MAP_END
-
-GroupedSHistory::GroupedSHistory()
-  : mCount(0),
-    mIndexOfActivePartialHistory(-1)
-{
-}
-
-NS_IMETHODIMP
-GroupedSHistory::GetCount(uint32_t* aResult)
-{
-  MOZ_ASSERT(aResult);
-  *aResult = mCount;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-GroupedSHistory::AppendPartialSHistory(nsIPartialSHistory* aPartialHistory)
-{
-  if (!aPartialHistory) {
-    return NS_ERROR_INVALID_POINTER;
-  }
-
-  nsCOMPtr<nsIPartialSHistory> partialHistory(aPartialHistory);
-  if (!partialHistory || mPartialHistories.Contains(partialHistory)) {
-    return NS_ERROR_FAILURE;
-  }
-
-  // Remove all items after active one and deactive it, unless it's the first
-  // call and no active partial history has been set yet.
-  if (mIndexOfActivePartialHistory >= 0) {
-    PurgePartialHistories(mIndexOfActivePartialHistory);
-    nsCOMPtr<nsIPartialSHistory> prevPartialHistory =
-      mPartialHistories[mIndexOfActivePartialHistory];
-    if (NS_WARN_IF(!prevPartialHistory)) {
-      // Cycle collected?
-      return NS_ERROR_UNEXPECTED;
-    }
-    prevPartialHistory->OnDeactive();
-  }
-
-  // Attach the partial history.
-  uint32_t offset = mCount;
-  mCount += partialHistory->GetCount();
-  mPartialHistories.AppendElement(partialHistory);
-  partialHistory->OnAttachGroupedSHistory(this, offset);
-  mIndexOfActivePartialHistory = mPartialHistories.Count() - 1;
-
-  // Remove the prerendered documents, as there was a history navigation
-  PurgePrerendering();
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-GroupedSHistory::HandleSHistoryUpdate(nsIPartialSHistory* aPartial, bool aTruncate)
-{
-  if (!aPartial) {
-    return NS_ERROR_INVALID_POINTER;
-  }
-  nsCOMPtr<nsIPartialSHistory> partialHistory = aPartial;
-
-  int32_t index = partialHistory->GetGlobalIndex();
-  // Get the lower and upper bounds for the viewer window
-  int32_t lower = index - nsISHistory::VIEWER_WINDOW;
-  int32_t upper = index + nsISHistory::VIEWER_WINDOW;
-  for (uint32_t i = 0; i < mPartialHistories.Length(); ++i) {
-    nsIPartialSHistory* pHistory = mPartialHistories[i];
-    // Skip the active partial history.
-    if (pHistory == partialHistory) {
-      continue;
-    }
-
-    // Check if the given partialshistory entry is too far away in history, and
-    // if it is, close it.
-    int32_t thisCount = pHistory->GetCount();
-    int32_t thisOffset = pHistory->GetGlobalIndexOffset();
-    if ((thisOffset > upper) || ((thisCount + thisOffset) < lower)) {
-      nsCOMPtr<nsIFrameLoader> loader;
-      pHistory->GetOwnerFrameLoader(getter_AddRefs(loader));
-      if (loader && !loader->GetIsDead()) {
-        loader->RequestFrameLoaderClose();
-      }
-    }
-  }
-
-  // Remove the prerendered documents, as there was a history navigation
-  PurgePrerendering();
-
-  // If we should be truncating, make sure to purge any partialSHistories which
-  // follow the one being updated.
-  if (aTruncate) {
-    int32_t index = mPartialHistories.IndexOf(partialHistory);
-    if (NS_WARN_IF(index != mIndexOfActivePartialHistory) ||
-        NS_WARN_IF(index < 0)) {
-      // Non-active or not attached partialHistory
-      return NS_ERROR_UNEXPECTED;
-    }
-
-    PurgePartialHistories(index);
-
-    // Update global count.
-    uint32_t count = partialHistory->GetCount();
-    uint32_t offset = partialHistory->GetGlobalIndexOffset();
-    mCount = count + offset;
-  }
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-GroupedSHistory::GotoIndex(uint32_t aGlobalIndex,
-                           nsIFrameLoader** aTargetLoaderToSwap)
-{
-  MOZ_ASSERT(aTargetLoaderToSwap);
-  *aTargetLoaderToSwap = nullptr;
-
-  nsCOMPtr<nsIPartialSHistory> currentPartialHistory =
-    mPartialHistories[mIndexOfActivePartialHistory];
-  if (!currentPartialHistory) {
-    // Cycle collected?
-    return NS_ERROR_UNEXPECTED;
-  }
-
-  for (uint32_t i = 0; i < mPartialHistories.Length(); i++) {
-    nsCOMPtr<nsIPartialSHistory> partialHistory = mPartialHistories[i];
-    if (NS_WARN_IF(!partialHistory)) {
-      // Cycle collected?
-      return NS_ERROR_UNEXPECTED;
-    }
-
-    // Examine index range.
-    uint32_t offset = partialHistory->GetGlobalIndexOffset();
-    uint32_t count = partialHistory->GetCount();
-    if (offset <= aGlobalIndex && (offset + count) > aGlobalIndex) {
-      uint32_t targetIndex = aGlobalIndex - offset;
-
-      // Check if we are trying to swap to a dead frameloader, and return
-      // NS_ERROR_NOT_AVAILABLE if we are.
-      nsCOMPtr<nsIFrameLoader> frameLoader;
-      partialHistory->GetOwnerFrameLoader(getter_AddRefs(frameLoader));
-      if (!frameLoader || frameLoader->GetIsDead()) {
-        return NS_ERROR_NOT_AVAILABLE;
-      }
-
-      if ((size_t)mIndexOfActivePartialHistory == i) {
-        return NS_OK;
-      }
-      mIndexOfActivePartialHistory = i;
-      if (NS_FAILED(currentPartialHistory->OnDeactive()) ||
-          NS_FAILED(partialHistory->OnActive(mCount, targetIndex))) {
-        return NS_ERROR_FAILURE;
-      }
-
-      // Return the target frameloader to the caller.
-      frameLoader.forget(aTargetLoaderToSwap);
-      return NS_OK;
-    }
-  }
-
-  // Index not found.
-  NS_WARNING("Out of index request!");
-  return NS_ERROR_FAILURE;
-}
-
-void
-GroupedSHistory::PurgePartialHistories(uint32_t aLastPartialIndexToKeep)
-{
-  uint32_t lastIndex = mPartialHistories.Length() - 1;
-  if (aLastPartialIndexToKeep >= lastIndex) {
-    // Nothing to remove.
-    return;
-  }
-
-  // Close tabs.
-  for (uint32_t i = lastIndex; i > aLastPartialIndexToKeep; i--) {
-    nsCOMPtr<nsIPartialSHistory> partialHistory = mPartialHistories[i];
-    if (!partialHistory) {
-      // Cycle collected?
-      return;
-    }
-
-    nsCOMPtr<nsIFrameLoader> loader;
-    partialHistory->GetOwnerFrameLoader(getter_AddRefs(loader));
-    loader->RequestFrameLoaderClose();
-  }
-
-  // Remove references.
-  mPartialHistories.RemoveElementsAt(aLastPartialIndexToKeep + 1,
-                                     lastIndex - aLastPartialIndexToKeep);
-}
-
-/* static */ bool
-GroupedSHistory::GroupedHistoryEnabled() {
-  static bool sGroupedSHistoryEnabled = false;
-  static bool sGroupedSHistoryPrefCached = false;
-  if (!sGroupedSHistoryPrefCached) {
-    sGroupedSHistoryPrefCached = true;
-    Preferences::AddBoolVarCache(&sGroupedSHistoryEnabled,
-                                 "browser.groupedhistory.enabled",
-                                 false);
-  }
-
-  return sGroupedSHistoryEnabled;
-}
-
-void
-GroupedSHistory::PurgePrerendering()
-{
-  nsTArray<PrerenderingHistory> histories = Move(mPrerenderingHistories);
-  // Remove the frameloaders which are owned by the prerendering history, and
-  // remove them from mPrerenderingHistories.
-  for (uint32_t i = 0; i < histories.Length(); ++i) {
-    nsCOMPtr<nsIFrameLoader> loader;
-    histories[i].mPartialHistory->GetOwnerFrameLoader(getter_AddRefs(loader));
-    if (loader) {
-      loader->RequestFrameLoaderClose();
-    }
-  }
-  MOZ_ASSERT(mPrerenderingHistories.IsEmpty());
-}
-
-NS_IMETHODIMP
-GroupedSHistory::CloseInactiveFrameLoaderOwners()
-{
-  MOZ_ASSERT(mIndexOfActivePartialHistory >= 0);
-  // Remove inactive frameloaders which are participating in the grouped shistory
-  for (uint32_t i = 0; i < mPartialHistories.Length(); ++i) {
-    if (i != static_cast<uint32_t>(mIndexOfActivePartialHistory)) {
-      nsCOMPtr<nsIFrameLoader> loader;
-      mPartialHistories[i]->GetOwnerFrameLoader(getter_AddRefs(loader));
-      loader->RequestFrameLoaderClose();
-    }
-  }
-
-  PurgePrerendering();
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-GroupedSHistory::AddPrerenderingPartialSHistory(nsIPartialSHistory* aPrerendering, int32_t aId)
-{
-  NS_ENSURE_TRUE(aPrerendering && aId, NS_ERROR_UNEXPECTED);
-  aPrerendering->SetActiveState(nsIPartialSHistory::STATE_PRERENDER);
-  PrerenderingHistory history = { aPrerendering, aId };
-  mPrerenderingHistories.AppendElement(history);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-GroupedSHistory::GetActiveFrameLoader(nsIFrameLoader** aFrameLoader)
-{
-  if (mIndexOfActivePartialHistory >= 0) {
-    return mPartialHistories[mIndexOfActivePartialHistory]->GetOwnerFrameLoader(aFrameLoader);
-  }
-  return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-GroupedSHistory::ActivatePrerendering(int32_t aId, JSContext* aCx, nsISupports** aPromise)
-{
-  NS_ENSURE_TRUE(aId && aCx && aPromise, NS_ERROR_UNEXPECTED);
-
-  // Look for an entry with the given aId in mPrerenderingHistories.
-  for (uint32_t i = 0; i < mPrerenderingHistories.Length(); ++i) {
-    if (mPrerenderingHistories[i].mId == aId) {
-      nsCOMPtr<nsIPartialSHistory> partialHistory = mPrerenderingHistories[i].mPartialHistory;
-      mPrerenderingHistories.RemoveElementAt(i);
-
-      nsCOMPtr<nsIFrameLoader> fl;
-      partialHistory->GetOwnerFrameLoader(getter_AddRefs(fl));
-      NS_ENSURE_TRUE(fl, NS_ERROR_FAILURE);
-
-      nsCOMPtr<nsIFrameLoader> activeFl;
-      GetActiveFrameLoader(getter_AddRefs(activeFl));
-      NS_ENSURE_TRUE(activeFl, NS_ERROR_FAILURE);
-
-      nsresult rv = fl->MakePrerenderedLoaderActive();
-      NS_ENSURE_SUCCESS(rv, rv);
-
-      return activeFl->AppendPartialSHistoryAndSwap(fl, aPromise);
-    }
-  }
-
-  // Generate a rejected promise as the entry was not found.
-  nsCOMPtr<nsIGlobalObject> go = xpc::NativeGlobal(JS::CurrentGlobalOrNull(aCx));
-  if (NS_WARN_IF(!go)) {
-    return NS_ERROR_FAILURE;
-  }
-  ErrorResult rv;
-  RefPtr<Promise> promise = Promise::Reject(go, aCx, JS::UndefinedHandleValue, rv);
-  if (NS_WARN_IF(rv.Failed())) {
-    return NS_ERROR_FAILURE;
-  }
-  promise.forget(aPromise);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-GroupedSHistory::CancelPrerendering(int32_t aId)
-{
-  for (uint32_t i = 0; i < mPrerenderingHistories.Length(); ++i) {
-    if (mPrerenderingHistories[i].mId == aId) {
-      nsCOMPtr<nsIPartialSHistory> partialHistory = mPrerenderingHistories[i].mPartialHistory;
-      nsCOMPtr<nsIFrameLoader> fl;
-      partialHistory->GetOwnerFrameLoader(getter_AddRefs(fl));
-      if (fl) {
-        fl->RequestFrameLoaderClose();
-      }
-      mPrerenderingHistories.RemoveElementAt(i);
-    }
-  }
-
-  return NS_OK;
-}
-
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/base/GroupedSHistory.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=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/. */
-
-#ifndef GroupedSHistory_h
-#define GroupedSHistory_h
-
-#include "nsIFrameLoader.h"
-#include "nsIGroupedSHistory.h"
-#include "nsIPartialSHistory.h"
-#include "nsTArray.h"
-#include "nsCOMArray.h"
-#include "nsCOMPtr.h"
-#include "nsCycleCollectionParticipant.h"
-#include "nsWeakReference.h"
-
-namespace mozilla {
-namespace dom {
-
-
-/**
- * GroupedSHistory connects session histories across multiple frameloaders.
- * Each frameloader has a PartialSHistory, and GroupedSHistory has an array
- * refering to all participating PartialSHistory(s).
- *
- * The following figure illustrates the idea. In this case, the GroupedSHistory
- * is composed of 3 frameloaders, and the active one is frameloader 1.
- * GroupedSHistory is always attached to the active frameloader.
- *
- *            +----------------------------------------------------+
- *            |                                                    |
- *            |                                                    v
- *  +------------------+      +-------------------+       +-----------------+
- *  |  FrameLoader 1   |      | PartialSHistory 1 |       | GroupedSHistory |
- *  |     (active)     |----->|     (active)      |<--+---|                 |
- *  +------------------+      +-------------------+   |   +-----------------+
- *                                                    |
- *  +------------------+      +-------------------+   |
- *  |  FrameLoader 2   |      | PartialSHistory 2 |   |
- *  |    (inactive)    |----->|    (inactive)     |<--+
- *  +------------------+      +-------------------+   |
- *                                                    |
- *  +------------------+      +-------------------+   |
- *  |  FrameLoader 3   |      | PartialSHistory 3 |   |
- *  |    (inactive)    |----->|    (inactive)     |<--+
- *  +------------------+      +-------------------+
- *
- * If a history navigation leads to frameloader 3, it becomes the active one,
- * and GroupedSHistory is re-attached to frameloader 3.
- *
- *  +------------------+      +-------------------+
- *  |  FrameLoader 1   |      | PartialSHistory 1 |
- *  |    (inactive)    |----->|    (inactive)     |<--+
- *  +------------------+      +-------------------+   |
- *                                                    |
- *  +------------------+      +-------------------+   |
- *  |  FrameLoader 2   |      | PartialSHistory 2 |   |
- *  |    (inactive)    |----->|    (inactive)     |<--+
- *  +------------------+      +-------------------+   |
- *                                                    |
- *  +------------------+      +-------------------+   |   +-----------------+
- *  |  FrameLoader 3   |      | PartialSHistory 3 |   |   | GroupedSHistory |
- *  |     (active)     |----->|     (active)      |<--+---|                 |
- *  +------------------+      +-------------------+       +-----------------+
- *            |                                                    ^
- *            |                                                    |
- *            +----------------------------------------------------+
- */
-class GroupedSHistory final : public nsIGroupedSHistory
-{
-public:
-  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_CYCLE_COLLECTION_CLASS(GroupedSHistory)
-  NS_DECL_NSIGROUPEDSHISTORY
-  GroupedSHistory();
-
-  /**
-   * Get the value of preference "browser.groupedhistory.enabled" to determine
-   * if grouped session history should be enabled.
-   */
-  static bool GroupedHistoryEnabled();
-
-private:
-  ~GroupedSHistory() {}
-
-  /**
-   * Remove all partial histories and close tabs after the given index (of
-   * mPartialHistories, not the index of session history entries).
-   */
-  void PurgePartialHistories(uint32_t aLastPartialIndexToKeep);
-
-  /**
-   * Remove the frameloaders which are owned by the prerendering history, and
-   * remove them from mPrerenderingHistories.
-   */
-  void PurgePrerendering();
-
-  // The total number of entries in all partial histories.
-  uint32_t mCount;
-
-  // The index of currently active partial history in mPartialHistories.
-  // Use int32_t as we have invalid index and nsCOMArray also uses int32_t.
-  int32_t mIndexOfActivePartialHistory;
-
-  // All participating nsIPartialSHistory objects.
-  nsCOMArray<nsIPartialSHistory> mPartialHistories;
-
-  // All nsIPartialSHistories which are being prerendered.
-  struct PrerenderingHistory
-  {
-    nsCOMPtr<nsIPartialSHistory> mPartialHistory;
-    int32_t mId;
-  };
-  nsTArray<PrerenderingHistory> mPrerenderingHistories;
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif /* GroupedSHistory_h */
--- a/dom/base/Link.cpp
+++ b/dom/base/Link.cpp
@@ -183,24 +183,16 @@ Link::TryDNSPrefetchOrPreconnectOrPrefet
     nsCOMPtr<nsIURI> uri(GetURI());
     if (uri && mElement->OwnerDoc()) {
       mElement->OwnerDoc()->MaybePreconnect(uri,
         mElement->AttrValueToCORSMode(mElement->GetParsedAttr(nsGkAtoms::crossorigin)));
       return;
     }
   }
 
-  if (linkTypes & nsStyleLinkElement::ePRERENDER) {
-    nsCOMPtr<nsIURI> uri(GetURI());
-    if (uri && mElement->OwnerDoc()) {
-      mElement->OwnerDoc()->PrerenderHref(uri);
-      return;
-    }
-  }
-
   if (linkTypes & nsStyleLinkElement::eDNS_PREFETCH) {
     if (nsHTMLDNSPrefetch::IsAllowed(mElement->OwnerDoc())) {
       nsHTMLDNSPrefetch::PrefetchLow(this);
     }
   }
 }
 
 void
deleted file mode 100644
--- a/dom/base/PartialSHistory.cpp
+++ /dev/null
@@ -1,359 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=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/. */
-
-#include "PartialSHistory.h"
-
-#include "nsIWebNavigation.h"
-
-namespace mozilla {
-namespace dom {
-
-NS_IMPL_CYCLE_COLLECTION(PartialSHistory, mOwnerFrameLoader, mGroupedSHistory)
-NS_IMPL_CYCLE_COLLECTING_ADDREF(PartialSHistory)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(PartialSHistory)
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PartialSHistory)
-  NS_INTERFACE_MAP_ENTRY(nsIPartialSHistory)
-  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIPartialSHistory)
-  NS_INTERFACE_MAP_ENTRY(nsISHistoryListener)
-  NS_INTERFACE_MAP_ENTRY(nsIPartialSHistoryListener)
-  NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
-NS_INTERFACE_MAP_END
-
-PartialSHistory::PartialSHistory(nsIFrameLoader* aOwnerFrameLoader)
-  : mCount(0),
-    mGlobalIndexOffset(0),
-    mActive(nsIPartialSHistory::STATE_ACTIVE),
-    mOwnerFrameLoader(aOwnerFrameLoader)
-{
-  MOZ_ASSERT(aOwnerFrameLoader);
-}
-
-already_AddRefed<nsISHistory>
-PartialSHistory::GetSessionHistory()
-{
-  if (!mOwnerFrameLoader) {
-    // Cycle collected?
-    return nullptr;
-  }
-
-  nsCOMPtr<nsIDocShell> docShell;
-  mOwnerFrameLoader->GetDocShell(getter_AddRefs(docShell));
-  if (!docShell) {
-    return nullptr;
-  }
-
-  nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(docShell));
-  nsCOMPtr<nsISHistory> shistory;
-  webNav->GetSessionHistory(getter_AddRefs(shistory));
-  return shistory.forget();
-}
-
-already_AddRefed<TabParent>
-PartialSHistory::GetTabParent()
-{
-  if (!mOwnerFrameLoader) {
-    // Cycle collected?
-    return nullptr;
-  }
-
-  nsCOMPtr<nsITabParent> tabParent;
-  mOwnerFrameLoader->GetTabParent(getter_AddRefs(tabParent));
-  return RefPtr<TabParent>(static_cast<TabParent*>(tabParent.get())).forget();
-}
-
-NS_IMETHODIMP
-PartialSHistory::GetCount(uint32_t* aResult)
-{
-  if (!aResult) {
-    return NS_ERROR_INVALID_POINTER;
-  }
-
-  // If we have direct reference to nsISHistory, simply pass through.
-  nsCOMPtr<nsISHistory> shistory(GetSessionHistory());
-  if (shistory) {
-    int32_t count;
-    nsresult rv = shistory->GetCount(&count);
-    if (NS_FAILED(rv) || count < 0) {
-      *aResult = 0;
-      return NS_ERROR_FAILURE;
-    }
-    *aResult = count;
-    return NS_OK;
-  }
-
-  // Otherwise use the cached value.
-  *aResult = mCount;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-PartialSHistory::GetGlobalIndex(int32_t* aResult)
-{
-  if (!aResult) {
-    return NS_ERROR_INVALID_POINTER;
-  }
-
-  nsCOMPtr<nsISHistory> shistory = GetSessionHistory();
-  if (shistory) {
-    int32_t idx;
-    nsresult rv = shistory->GetIndex(&idx);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    *aResult = idx + GetGlobalIndexOffset();
-    return NS_OK;
-  }
-
-  *aResult = mIndex + GetGlobalIndexOffset();
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-PartialSHistory::GetGlobalIndexOffset(uint32_t* aResult)
-{
-  if (!aResult) {
-    return NS_ERROR_INVALID_POINTER;
-  }
-
-  // If we have direct reference to nsISHistory, simply pass through.
-  nsCOMPtr<nsISHistory> shistory(GetSessionHistory());
-  if (shistory) {
-    int32_t offset;
-    nsresult rv = shistory->GetGlobalIndexOffset(&offset);
-    if (NS_FAILED(rv) || offset < 0) {
-      *aResult = 0;
-      return NS_ERROR_FAILURE;
-    }
-    *aResult = offset;
-    return NS_OK;
-  }
-
-  // Otherwise use the cached value.
-  *aResult = mGlobalIndexOffset;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-PartialSHistory::GetOwnerFrameLoader(nsIFrameLoader** aResult)
-{
-  nsCOMPtr<nsIFrameLoader> loader(mOwnerFrameLoader);
-  loader.forget(aResult);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-PartialSHistory::OnAttachGroupedSHistory(nsIGroupedSHistory* aGroup, uint32_t aOffset)
-{
-  MOZ_ASSERT(!mGroupedSHistory, "Only may join a single GroupedSHistory");
-
-  mActive = nsIPartialSHistory::STATE_ACTIVE;
-  mGlobalIndexOffset = aOffset;
-  mGroupedSHistory = aGroup;
-
-  // If we have direct reference to nsISHistory, simply pass through.
-  nsCOMPtr<nsISHistory> shistory(GetSessionHistory());
-  if (shistory) {
-    // nsISHistory uses int32_t
-    if (aOffset > INT32_MAX) {
-      return NS_ERROR_FAILURE;
-    }
-    return shistory->OnAttachGroupedSHistory(aOffset);
-  }
-
-  // Otherwise notify through TabParent.
-  RefPtr<TabParent> tabParent(GetTabParent());
-  if (!tabParent) {
-    // We have neither shistory nor tabParent?
-    NS_WARNING("Unable to get shitory nor tabParent!");
-    return NS_ERROR_UNEXPECTED;
-  }
-  Unused << tabParent->SendNotifyAttachGroupedSHistory(aOffset);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-PartialSHistory::HandleSHistoryUpdate(uint32_t aCount, uint32_t aIndex, bool aTruncate)
-{
-  // Update our local cache of mCount and mIndex
-  mCount = aCount;
-  mIndex = aIndex;
-  return SHistoryDidUpdate(aTruncate);
-}
-
-nsresult
-PartialSHistory::SHistoryDidUpdate(bool aTruncate /* = false */)
-{
-  if (!mOwnerFrameLoader) {
-    // Cycle collected?
-    return NS_ERROR_UNEXPECTED;
-  }
-
-  if (!mGroupedSHistory) {
-    // It's OK if we don't have a grouped history, that just means that we
-    // aren't in a grouped shistory, so we don't need to do anything.
-    return NS_OK;
-  }
-
-  mGroupedSHistory->HandleSHistoryUpdate(this, aTruncate);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-PartialSHistory::OnActive(uint32_t aGlobalLength, uint32_t aTargetLocalIndex)
-{
-  MOZ_ASSERT(mGroupedSHistory);
-
-  mActive = nsIPartialSHistory::STATE_ACTIVE;
-
-  // In-process case.
-  nsCOMPtr<nsISHistory> shistory(GetSessionHistory());
-  if (shistory) {
-    // nsISHistory uses int32_t
-    if (aGlobalLength > INT32_MAX || aTargetLocalIndex > INT32_MAX) {
-      return NS_ERROR_FAILURE;
-    }
-    return shistory->OnPartialSHistoryActive(aGlobalLength, aTargetLocalIndex);
-  }
-
-  // Cross-process case.
-  RefPtr<TabParent> tabParent(GetTabParent());
-  if (!tabParent) {
-    // We have neither shistory nor tabParent?
-    NS_WARNING("Unable to get shitory nor tabParent!");
-    return NS_ERROR_UNEXPECTED;
-  }
-  Unused << tabParent->SendNotifyPartialSHistoryActive(aGlobalLength,
-                                                       aTargetLocalIndex);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-PartialSHistory::OnDeactive()
-{
-  MOZ_ASSERT(mGroupedSHistory);
-
-  mActive = nsIPartialSHistory::STATE_INACTIVE;
-
-  // In-process case.
-  nsCOMPtr<nsISHistory> shistory(GetSessionHistory());
-  if (shistory) {
-    if (NS_FAILED(shistory->OnPartialSHistoryDeactive())) {
-      return NS_ERROR_FAILURE;
-    }
-    return NS_OK;
-  }
-
-  // Cross-process case.
-  RefPtr<TabParent> tabParent(GetTabParent());
-  if (!tabParent) {
-    // We have neither shistory nor tabParent?
-    NS_WARNING("Unable to get shitory nor tabParent!");
-    return NS_ERROR_UNEXPECTED;
-  }
-  Unused << tabParent->SendNotifyPartialSHistoryDeactive();
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-PartialSHistory::GetActiveState(int32_t* aActive)
-{
-  *aActive = mActive;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-PartialSHistory::SetActiveState(int32_t aActive)
-{
-  mActive = aActive;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-PartialSHistory::GetGroupedSHistory(nsIGroupedSHistory** aGrouped)
-{
-  nsCOMPtr<nsIGroupedSHistory> shistory = mGroupedSHistory;
-  shistory.forget(aGrouped);
-  return NS_OK;
-}
-
-/*******************************************************************************
- * nsIPartialSHistoryListener
- ******************************************************************************/
-
-NS_IMETHODIMP
-PartialSHistory::OnRequestCrossBrowserNavigation(uint32_t aIndex)
-{
-  if (!mOwnerFrameLoader) {
-    // Cycle collected?
-    return NS_ERROR_UNEXPECTED;
-  }
-
-  nsCOMPtr<nsISupports> promise;
-  return mOwnerFrameLoader->RequestGroupedHistoryNavigation(aIndex, getter_AddRefs(promise));
-}
-
-/*******************************************************************************
- * nsISHistoryListener
- ******************************************************************************/
-
-NS_IMETHODIMP
-PartialSHistory::OnLengthChanged(int32_t aCount)
-{
-  return SHistoryDidUpdate(/* aTruncate = */ true);
-}
-
-NS_IMETHODIMP
-PartialSHistory::OnIndexChanged(int32_t aIndex)
-{
-  return SHistoryDidUpdate(/* aTruncate = */ false);
-}
-
-NS_IMETHODIMP
-PartialSHistory::OnHistoryNewEntry(nsIURI *aNewURI, int32_t aOldIndex)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-PartialSHistory::OnHistoryGoBack(nsIURI *aBackURI, bool *_retval)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-PartialSHistory::OnHistoryGoForward(nsIURI *aForwardURI, bool *_retval)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-PartialSHistory::OnHistoryReload(nsIURI *aReloadURI, uint32_t aReloadFlags, bool *_retval)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-PartialSHistory::OnHistoryGotoIndex(int32_t aIndex, nsIURI *aGotoURI, bool *_retval)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-PartialSHistory::OnHistoryPurge(int32_t aNumEntries, bool *_retval)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-PartialSHistory::OnHistoryReplaceEntry(int32_t aIndex)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/base/PartialSHistory.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=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/. */
-
-#ifndef PartialSHistory_h
-#define PartialSHistory_h
-
-#include "nsCycleCollectionParticipant.h"
-#include "nsFrameLoader.h"
-#include "nsIGroupedSHistory.h"
-#include "nsIPartialSHistoryListener.h"
-#include "nsIPartialSHistory.h"
-#include "nsISHistory.h"
-#include "nsISHistoryListener.h"
-#include "TabParent.h"
-
-namespace mozilla {
-namespace dom {
-
-class PartialSHistory final : public nsIPartialSHistory,
-                              public nsISHistoryListener,
-                              public nsIPartialSHistoryListener,
-                              public nsSupportsWeakReference
-{
-public:
-  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(PartialSHistory, nsIPartialSHistory)
-  NS_DECL_NSIPARTIALSHISTORY
-  NS_DECL_NSIPARTIALSHISTORYLISTENER
-  NS_DECL_NSISHISTORYLISTENER
-
-  /**
-   * Note that PartialSHistory must be constructed after frameloader has
-   * created a valid docshell or tabparent.
-   */
-  explicit PartialSHistory(nsIFrameLoader* aOwnerFrameLoader);
-
-private:
-  ~PartialSHistory() {}
-  already_AddRefed<nsISHistory> GetSessionHistory();
-  already_AddRefed<TabParent> GetTabParent();
-
-  nsresult SHistoryDidUpdate(bool aTruncate = false);
-
-  // The cache of number of entries in corresponding nsISHistory. It's only
-  // used for remote process case. If nsISHistory is in-process, mCount will not
-  // be used at all.
-  uint32_t mCount;
-
-  // The current local index of the active document in this partial SHistory.
-  uint32_t mIndex;
-
-  // The cache of globalIndexOffset in corresponding nsISHistory. It's only
-  // used for remote process case.
-  uint32_t mGlobalIndexOffset;
-
-  // One of the possible active states from nsIPartialSHistory
-  int32_t mActive;
-
-  // The frameloader which owns this PartialSHistory.
-  nsCOMPtr<nsIFrameLoader> mOwnerFrameLoader;
-
-  // The GroupedSHistory which this PartialSHistory is part of, or null.
-  nsCOMPtr<nsIGroupedSHistory> mGroupedSHistory;
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif /* PartialSHistory_h */
--- a/dom/base/WebKitCSSMatrix.cpp
+++ b/dom/base/WebKitCSSMatrix.cpp
@@ -6,16 +6,17 @@
 
 #include "mozilla/dom/WebKitCSSMatrix.h"
 
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/WebKitCSSMatrixBinding.h"
 #include "mozilla/Preferences.h"
 #include "nsPresContext.h"
 #include "RuleNodeCacheConditions.h"
+#include "nsGlobalWindowInner.h"
 
 namespace mozilla {
 namespace dom {
 
 static const double sRadPerDegree = 2.0 * M_PI / 360.0;
 
 static bool
 IsStyledByServo(JSContext* aContext)
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -180,31 +180,29 @@ EXPORTS.mozilla.dom += [
     'DOMStringList.h',
     'DOMTokenListSupportedTokens.h',
     'Element.h',
     'ElementInlines.h',
     'EventSource.h',
     'FormData.h',
     'FragmentOrElement.h',
     'FromParser.h',
-    'GroupedSHistory.h',
     'IdleDeadline.h',
     'IdleRequest.h',
     'IDTracker.h',
     'ImageEncoder.h',
     'ImageTracker.h',
     'IntlUtils.h',
     'Link.h',
     'Location.h',
     'NameSpaceConstants.h',
     'Navigator.h',
     'NodeInfo.h',
     'NodeInfoInlines.h',
     'NodeIterator.h',
-    'PartialSHistory.h',
     'Pose.h',
     'ProcessGlobal.h',
     'ResponsiveImageSelector.h',
     'SameProcessMessageQueue.h',
     'ScreenOrientation.h',
     'Selection.h',
     'ShadowRoot.h',
     'StructuredCloneBlob.h',
@@ -256,17 +254,16 @@ UNIFIED_SOURCES += [
     'DOMQuad.cpp',
     'DOMRect.cpp',
     'DOMRequest.cpp',
     'DOMStringList.cpp',
     'Element.cpp',
     'EventSource.cpp',
     'FormData.cpp',
     'FragmentOrElement.cpp',
-    'GroupedSHistory.cpp',
     'IdleDeadline.cpp',
     'IdleRequest.cpp',
     'IDTracker.cpp',
     'ImageEncoder.cpp',
     'ImageTracker.cpp',
     'IntlUtils.cpp',
     'Link.cpp',
     'Location.cpp',
@@ -338,17 +335,16 @@ UNIFIED_SOURCES += [
     'nsTreeSanitizer.cpp',
     'nsViewportInfo.cpp',
     'nsWindowMemoryReporter.cpp',
     'nsWindowRoot.cpp',
     'nsWrapperCache.cpp',
     'nsXHTMLContentSerializer.cpp',
     'nsXMLContentSerializer.cpp',
     'nsXMLNameSpaceMap.cpp',
-    'PartialSHistory.cpp',
     'Pose.cpp',
     'PostMessageEvent.cpp',
     'ProcessGlobal.cpp',
     'ResponsiveImageSelector.cpp',
     'SameProcessMessageQueue.cpp',
     'ScreenOrientation.cpp',
     'Selection.cpp',
     'SelectionChangeListener.cpp',
--- a/dom/base/nsContentSink.cpp
+++ b/dom/base/nsContentSink.cpp
@@ -725,24 +725,16 @@ nsContentSink::ProcessLinkFromHeader(con
   if (nsContentUtils::PrefetchPreloadEnabled(mDocShell)) {
     // prefetch href if relation is "next" or "prefetch"
     if ((linkTypes & nsStyleLinkElement::eNEXT) ||
         (linkTypes & nsStyleLinkElement::ePREFETCH) ||
         (linkTypes & nsStyleLinkElement::ePRELOAD)) {
       PrefetchPreloadHref(aHref, mDocument, linkTypes, aAs, aType, aMedia);
     }
 
-    if (linkTypes & nsStyleLinkElement::ePRERENDER) {
-      nsCOMPtr<nsIURI> href;
-      nsresult rv = NS_NewURI(getter_AddRefs(href), aHref);
-      if (NS_SUCCEEDED(rv)) {
-        mDocument->PrerenderHref(href);
-      }
-    }
-
     if (!aHref.IsEmpty() && (linkTypes & nsStyleLinkElement::eDNS_PREFETCH)) {
       PrefetchDNS(aHref);
     }
 
     if (!aHref.IsEmpty() && (linkTypes & nsStyleLinkElement::ePRECONNECT)) {
       Preconnect(aHref, aCrossOrigin);
     }
   }
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -3318,88 +3318,16 @@ nsIDocument::NoteScriptTrackingStatus(co
 }
 
 bool
 nsIDocument::IsScriptTracking(const nsACString& aURL) const
 {
   return mTrackingScripts.Contains(aURL);
 }
 
-bool
-nsIDocument::PrerenderHref(nsIURI* aHref)
-{
-  MOZ_ASSERT(aHref);
-
-  static bool sPrerenderEnabled = false;
-  static bool sPrerenderPrefCached = false;
-  if (!sPrerenderPrefCached) {
-    sPrerenderPrefCached = true;
-    Preferences::AddBoolVarCache(&sPrerenderEnabled,
-                                 "dom.linkPrerender.enabled",
-                                 false);
-  }
-
-  // Check if prerender is enabled
-  if (!sPrerenderEnabled) {
-    return false;
-  }
-
-  nsCOMPtr<nsIURI> referrer = GetDocumentURI();
-  bool urisMatch = false;
-  aHref->EqualsExceptRef(referrer, &urisMatch);
-  if (urisMatch) {
-    // Prerender current document isn't quite meaningful, and we may not be able
-    // to load it out of process.
-    return false;
-  }
-
-  nsCOMPtr<nsIDocShell> docShell = GetDocShell();
-  nsCOMPtr<nsIWebNavigation> webNav = do_QueryInterface(docShell);
-  NS_ENSURE_TRUE(webNav, false);
-
-  bool canGoForward = false;
-  nsresult rv = webNav->GetCanGoForward(&canGoForward);
-  if (NS_FAILED(rv) || canGoForward) {
-    // Skip prerender on history navigation as we don't support it yet.
-    // Remove this check once bug 1323650 is implemented.
-    return false;
-  }
-
-  // Check if the document is in prerender state. We don't prerender in a
-  // prerendered document.
-  if (docShell->GetIsPrerendered()) {
-    return false;
-  }
-
-  // We currently do not support prerendering in documents loaded within the
-  // chrome process.
-  if (!XRE_IsContentProcess()) {
-    return false;
-  }
-
-  // Adopting an prerendered document is similar to performing a load within a
-  // different docshell, as the prerendering must have occurred in a different
-  // docshell.
-  if (!docShell->GetIsOnlyToplevelInTabGroup()) {
-    return false;
-  }
-
-  TabChild* tabChild = TabChild::GetFrom(docShell);
-  NS_ENSURE_TRUE(tabChild, false);
-
-  nsCOMPtr<nsIWebBrowserChrome3> wbc3;
-  tabChild->GetWebBrowserChrome(getter_AddRefs(wbc3));
-  NS_ENSURE_TRUE(wbc3, false);
-
-  rv = wbc3->StartPrerenderingDocument(aHref, referrer, NodePrincipal());
-  NS_ENSURE_SUCCESS(rv, false);
-
-  return true;
-}
-
 NS_IMETHODIMP
 nsDocument::GetApplicationCache(nsIApplicationCache **aApplicationCache)
 {
   NS_IF_ADDREF(*aApplicationCache = mApplicationCache);
 
   return NS_OK;
 }
 
@@ -12350,23 +12278,16 @@ nsDocument::GetVisibilityState() const
   // 1)  Are we in bfcache (!IsVisible())?  If so, nothing else matters.
   // 2)  Do we have an outer window?  If not, we're hidden.  Note that we don't
   //     want to use GetWindow here because it does weird groveling for windows
   //     in some cases.
   // 3)  Is our outer window background?  If so, we're hidden.
   // Otherwise, we're visible.
   if (!IsVisible() || !mWindow || !mWindow->GetOuterWindow() ||
       mWindow->GetOuterWindow()->IsBackground()) {
-
-    // Check if the document is in prerender state.
-    nsCOMPtr<nsIDocShell> docshell = GetDocShell();
-    if (docshell && docshell->GetIsPrerendered()) {
-      return dom::VisibilityState::Prerender;
-    }
-
     return dom::VisibilityState::Hidden;
   }
 
   return dom::VisibilityState::Visible;
 }
 
 /* virtual */ void
 nsDocument::PostVisibilityUpdateEvent()
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -50,18 +50,16 @@
 #include "NullPrincipal.h"
 #include "nsIScriptError.h"
 #include "nsGlobalWindow.h"
 #include "nsPIWindowRoot.h"
 #include "nsLayoutUtils.h"
 #include "nsMappedAttributes.h"
 #include "nsView.h"
 #include "nsBaseWidget.h"
-#include "GroupedSHistory.h"
-#include "PartialSHistory.h"
 #include "nsQueryObject.h"
 
 #include "nsIURI.h"
 #include "nsIURL.h"
 #include "nsNetUtil.h"
 
 #include "nsGkAtoms.h"
 #include "nsNameSpaceManager.h"
@@ -92,19 +90,19 @@
 #include "jsapi.h"
 #include "mozilla/dom/HTMLIFrameElement.h"
 #include "nsSandboxFlags.h"
 #include "mozilla/layers/CompositorBridgeChild.h"
 #include "mozilla/dom/CustomEvent.h"
 
 #include "mozilla/dom/ipc/StructuredCloneData.h"
 #include "mozilla/WebBrowserPersistLocalDocument.h"
-#include "mozilla/dom/GroupedHistoryEvent.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/PromiseNativeHandler.h"
+#include "mozilla/dom/GroupedHistoryEvent.h"
 
 #include "mozilla/dom/HTMLBodyElement.h"
 
 #include "ContentPrincipal.h"
 
 #ifdef XP_WIN
 #include "mozilla/plugins/PPluginWidgetParent.h"
 #include "../plugins/ipc/PluginWidgetParent.h"
@@ -143,18 +141,17 @@ typedef FrameMetrics::ViewID ViewID;
 // of shells can rapidly become huge and run us out of memory.  To solve that,
 // we'd need to re-institute a fixed version of bug 98158.
 #define MAX_DEPTH_CONTENT_FRAMES 10
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(nsFrameLoader,
                                       mDocShell,
                                       mMessageManager,
                                       mChildMessageManager,
-                                      mOpener,
-                                      mPartialSHistory)
+                                      mOpener)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsFrameLoader)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsFrameLoader)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsFrameLoader)
   NS_INTERFACE_MAP_ENTRY(nsIFrameLoader)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIFrameLoader)
   NS_INTERFACE_MAP_ENTRY(nsIWebBrowserPersistable)
@@ -165,17 +162,16 @@ nsFrameLoader::nsFrameLoader(Element* aO
   : mOwnerContent(aOwner)
   , mDetachedSubdocFrame(nullptr)
   , mOpener(aOpener)
   , mRemoteBrowser(nullptr)
   , mChildID(0)
   , mJSPluginID(aJSPluginID)
   , mEventMode(EVENT_MODE_NORMAL_DISPATCH)
   , mBrowserChangingProcessBlockers(nullptr)
-  , mIsPrerendered(false)
   , mDepthTooGreat(false)
   , mIsTopLevelContent(false)
   , mDestroyCalled(false)
   , mNeedsAsyncDestroy(false)
   , mInSwap(false)
   , mInShow(false)
   , mHideCalled(false)
   , mNetworkCreated(aNetworkCreated)
@@ -364,145 +360,16 @@ nsFrameLoader::LoadURI(nsIURI* aURI, nsI
   rv = doc->InitializeFrameLoader(this);
   if (NS_FAILED(rv)) {
     mURIToLoad = nullptr;
     mTriggeringPrincipal = nullptr;
   }
   return rv;
 }
 
-void
-nsFrameLoader::SetIsPrerendered(ErrorResult& aRv)
-{
-  nsresult rv = SetIsPrerendered();
-  if (NS_FAILED(rv)) {
-    aRv.Throw(rv);
-  }
-}
-
-NS_IMETHODIMP
-nsFrameLoader::SetIsPrerendered()
-{
-  MOZ_ASSERT(!mDocShell, "Please call SetIsPrerendered before docShell is created");
-  mIsPrerendered = true;
-
-  return NS_OK;
-}
-
-void
-nsFrameLoader::MakePrerenderedLoaderActive(ErrorResult& aRv)
-{
-  nsresult rv = MakePrerenderedLoaderActive();
-  if (NS_FAILED(rv)) {
-    aRv.Throw(rv);
-  }
-}
-
-NS_IMETHODIMP
-nsFrameLoader::MakePrerenderedLoaderActive()
-{
-  MOZ_ASSERT(mIsPrerendered, "This frameloader was not in prerendered mode.");
-
-  mIsPrerendered = false;
-  if (IsRemoteFrame()) {
-    if (!mRemoteBrowser) {
-      NS_WARNING("Missing remote browser.");
-      return NS_ERROR_FAILURE;
-    }
-
-    mRemoteBrowser->SetDocShellIsActive(true);
-  } else {
-    if (!mDocShell) {
-      NS_WARNING("Missing docshell.");
-      return NS_ERROR_FAILURE;
-    }
-
-    nsresult rv = mDocShell->SetIsActive(true);
-    NS_ENSURE_SUCCESS(rv, rv);
-  }
-
-  return NS_OK;
-}
-
-already_AddRefed<nsIPartialSHistory>
-nsFrameLoader::GetPartialSHistory()
-{
-  nsCOMPtr<nsIPartialSHistory> partialSHistory;
-  MOZ_ALWAYS_SUCCEEDS(GetPartialSHistory(getter_AddRefs(partialSHistory)));
-  return partialSHistory.forget();
-}
-
-NS_IMETHODIMP
-nsFrameLoader::GetPartialSHistory(nsIPartialSHistory** aResult)
-{
-  if (mRemoteBrowser && !mPartialSHistory) {
-    // For remote case we can lazy initialize PartialSHistory since
-    // it doens't need to be registered as a listener to nsISHistory directly.
-    mPartialSHistory = new PartialSHistory(this);
-  }
-
-  nsCOMPtr<nsIPartialSHistory> partialHistory(mPartialSHistory);
-  partialHistory.forget(aResult);
-  return NS_OK;
-}
-
-already_AddRefed<nsIGroupedSHistory>
-nsFrameLoader::EnsureGroupedSHistory(ErrorResult& aRv)
-{
-  nsCOMPtr<nsIGroupedSHistory> result;
-  nsresult rv = EnsureGroupedSHistory(getter_AddRefs(result));
-  if (NS_FAILED(rv)) {
-    aRv.Throw(rv);
-  }
-  return result.forget();
-}
-
-NS_IMETHODIMP
-nsFrameLoader::EnsureGroupedSHistory(nsIGroupedSHistory** aResult)
-{
-  nsCOMPtr<nsIPartialSHistory> partialHistory;
-  GetPartialSHistory(getter_AddRefs(partialHistory));
-  MOZ_ASSERT(partialHistory);
-
-  nsCOMPtr<nsIGroupedSHistory> groupedHistory;
-  partialHistory->GetGroupedSHistory(getter_AddRefs(groupedHistory));
-  if (!groupedHistory) {
-    groupedHistory = new GroupedSHistory();
-    groupedHistory->AppendPartialSHistory(partialHistory);
-
-#ifdef DEBUG
-    nsCOMPtr<nsIGroupedSHistory> test;
-    GetGroupedSHistory(getter_AddRefs(test));
-    MOZ_ASSERT(test == groupedHistory, "GroupedHistory must match");
-#endif
-  }
-
-  groupedHistory.forget(aResult);
-  return NS_OK;
-}
-
-already_AddRefed<nsIGroupedSHistory>
-nsFrameLoader::GetGroupedSHistory()
-{
-  nsCOMPtr<nsIGroupedSHistory> groupedSHistory;
-  MOZ_ALWAYS_SUCCEEDS(GetGroupedSHistory(getter_AddRefs(groupedSHistory)));
-  return groupedSHistory.forget();
-}
-
-NS_IMETHODIMP
-nsFrameLoader::GetGroupedSHistory(nsIGroupedSHistory** aResult)
-{
-  nsCOMPtr<nsIGroupedSHistory> groupedSHistory;
-  if (mPartialSHistory) {
-    mPartialSHistory->GetGroupedSHistory(getter_AddRefs(groupedSHistory));
-  }
-  groupedSHistory.forget(aResult);
-  return NS_OK;
-}
-
 bool
 nsFrameLoader::SwapBrowsersAndNotify(nsFrameLoader* aOther)
 {
   // Cache the owner content before calling SwapBrowsers, which will change
   // these member variables.
   RefPtr<mozilla::dom::Element> primaryContent = mOwnerContent;
   RefPtr<mozilla::dom::Element> secondaryContent = aOther->mOwnerContent;
 
@@ -530,203 +397,16 @@ nsFrameLoader::SwapBrowsersAndNotify(nsF
                                      eventInit);
   event->SetTrusted(true);
   bool dummy;
   primaryContent->DispatchEvent(event, &dummy);
 
   return true;
 }
 
-class AppendPartialSHistoryAndSwapHelper : public PromiseNativeHandler
-{
-public:
-  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_CYCLE_COLLECTION_CLASS(AppendPartialSHistoryAndSwapHelper)
-
-  AppendPartialSHistoryAndSwapHelper(nsFrameLoader* aThis,
-                                     nsFrameLoader* aOther,
-                                     Promise* aPromise)
-    : mThis(aThis), mOther(aOther), mPromise(aPromise) {}
-
-  void
-  ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override
-  {
-    nsCOMPtr<nsIGroupedSHistory> otherGroupedHistory;
-    mOther->GetGroupedSHistory(getter_AddRefs(otherGroupedHistory));
-    MOZ_ASSERT(!otherGroupedHistory,
-               "Cannot append a GroupedSHistory owner to another.");
-    if (otherGroupedHistory) {
-      mPromise->MaybeRejectWithUndefined();
-      return;
-    }
-
-    // Append ourselves.
-    nsresult rv;
-    nsCOMPtr<nsIGroupedSHistory> groupedSHistory;
-    rv = mThis->EnsureGroupedSHistory(getter_AddRefs(groupedSHistory));
-    if (NS_WARN_IF(NS_FAILED(rv))) {
-      mPromise->MaybeRejectWithUndefined();
-      return;
-    }
-
-    // Append the other.
-    nsCOMPtr<nsIPartialSHistory> otherPartialSHistory;
-    MOZ_ALWAYS_SUCCEEDS(mOther->GetPartialSHistory(getter_AddRefs(otherPartialSHistory)));
-    rv = groupedSHistory->AppendPartialSHistory(otherPartialSHistory);
-    if (NS_WARN_IF(NS_FAILED(rv))) {
-      mPromise->MaybeRejectWithUndefined();
-      return;
-    }
-
-    // Swap the browsers and fire the BrowserChangedProcess event.
-    if (mThis->SwapBrowsersAndNotify(mOther)) {
-      mPromise->MaybeResolveWithUndefined();
-    } else {
-      mPromise->MaybeRejectWithUndefined();
-    }
-  }
-
-  void
-  RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override
-  {
-    mPromise->MaybeRejectWithUndefined();
-  }
-
-private:
-  ~AppendPartialSHistoryAndSwapHelper() {}
-  RefPtr<nsFrameLoader> mThis;
-  RefPtr<nsFrameLoader> mOther;
-  RefPtr<Promise> mPromise;
-};
-
-NS_IMPL_CYCLE_COLLECTING_ADDREF(AppendPartialSHistoryAndSwapHelper)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(AppendPartialSHistoryAndSwapHelper)
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AppendPartialSHistoryAndSwapHelper)
-  NS_INTERFACE_MAP_ENTRY(nsISupports)
-NS_INTERFACE_MAP_END
-NS_IMPL_CYCLE_COLLECTION(AppendPartialSHistoryAndSwapHelper,
-                         mThis, mPromise)
-
-class RequestGroupedHistoryNavigationHelper : public PromiseNativeHandler
-{
-public:
-  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_CYCLE_COLLECTION_CLASS(RequestGroupedHistoryNavigationHelper)
-
-  RequestGroupedHistoryNavigationHelper(nsFrameLoader* aThis,
-                                        uint32_t aGlobalIndex,
-                                        Promise* aPromise)
-    : mThis(aThis), mGlobalIndex(aGlobalIndex), mPromise(aPromise) {}
-
-  void
-  ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override
-  {
-    if (NS_WARN_IF(!mThis->mOwnerContent)) {
-      mPromise->MaybeRejectWithUndefined();
-      return;
-    }
-
-    nsCOMPtr<nsIGroupedSHistory> groupedSHistory;
-    mThis->GetGroupedSHistory(getter_AddRefs(groupedSHistory));
-    if (NS_WARN_IF(!groupedSHistory)) {
-      mPromise->MaybeRejectWithUndefined();
-      return;
-    }
-
-    // Navigate the loader to the new index
-    nsCOMPtr<nsIFrameLoader> otherLoader;
-    nsresult rv = groupedSHistory->GotoIndex(mGlobalIndex, getter_AddRefs(otherLoader));
-
-    // Check if the gotoIndex failed because the target frameloader is dead. We
-    // need to perform a navigateAndRestoreByIndex and then return to recover.
-    if (rv == NS_ERROR_NOT_AVAILABLE) {
-      // Get the nsIXULBrowserWindow so that we can call NavigateAndRestoreByIndex on it.
-      nsCOMPtr<nsIDocShell> docShell = mThis->mOwnerContent->OwnerDoc()->GetDocShell();
-      if (NS_WARN_IF(!docShell)) {
-        mPromise->MaybeRejectWithUndefined();
-        return;
-      }
-
-      nsCOMPtr<nsIDocShellTreeOwner> treeOwner;
-      docShell->GetTreeOwner(getter_AddRefs(treeOwner));
-      if (NS_WARN_IF(!treeOwner)) {
-        mPromise->MaybeRejectWithUndefined();
-        return;
-      }
-
-      nsCOMPtr<nsIXULWindow> window = do_GetInterface(treeOwner);
-      if (NS_WARN_IF(!window)) {
-        mPromise->MaybeRejectWithUndefined();
-        return;
-      }
-
-      nsCOMPtr<nsIXULBrowserWindow> xbw;
-      window->GetXULBrowserWindow(getter_AddRefs(xbw));
-      if (NS_WARN_IF(!xbw)) {
-        mPromise->MaybeRejectWithUndefined();
-        return;
-      }
-
-      nsCOMPtr<nsIBrowser> ourBrowser = do_QueryInterface(mThis->mOwnerContent);
-      if (NS_WARN_IF(!ourBrowser)) {
-        mPromise->MaybeRejectWithUndefined();
-        return;
-      }
-
-      rv = xbw->NavigateAndRestoreByIndex(ourBrowser, mGlobalIndex);
-      if (NS_WARN_IF(NS_FAILED(rv))) {
-        mPromise->MaybeRejectWithUndefined();
-        return;
-      }
-      mPromise->MaybeResolveWithUndefined();
-      return;
-    }
-
-    // Check for any other type of failure
-    if (NS_WARN_IF(NS_FAILED(rv))) {
-      mPromise->MaybeRejectWithUndefined();
-      return;
-    }
-
-    // Perform the swap.
-    nsFrameLoader* other = static_cast<nsFrameLoader*>(otherLoader.get());
-    if (!other || other == mThis) {
-      mPromise->MaybeRejectWithUndefined();
-      return;
-    }
-
-    // Swap the browsers and fire the BrowserChangedProcess event.
-    if (mThis->SwapBrowsersAndNotify(other)) {
-      mPromise->MaybeResolveWithUndefined();
-    } else {
-      mPromise->MaybeRejectWithUndefined();
-    }
-  }
-
-  void
-  RejectedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override
-  {
-    mPromise->MaybeRejectWithUndefined();
-  }
-
-private:
-  ~RequestGroupedHistoryNavigationHelper() {}
-  RefPtr<nsFrameLoader> mThis;
-  uint32_t mGlobalIndex;
-  RefPtr<Promise> mPromise;
-};
-
-NS_IMPL_CYCLE_COLLECTING_ADDREF(RequestGroupedHistoryNavigationHelper)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(RequestGroupedHistoryNavigationHelper)
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(RequestGroupedHistoryNavigationHelper)
-  NS_INTERFACE_MAP_ENTRY(nsISupports)
-NS_INTERFACE_MAP_END
-NS_IMPL_CYCLE_COLLECTION(RequestGroupedHistoryNavigationHelper,
-                         mThis, mPromise)
-
 already_AddRefed<Promise>
 nsFrameLoader::FireWillChangeProcessEvent()
 {
   AutoJSAPI jsapi;
   if (NS_WARN_IF(!jsapi.Init(mOwnerContent->GetOwnerGlobal()))) {
     return nullptr;
   }
   JSContext* cx = jsapi.cx();
@@ -753,104 +433,16 @@ nsFrameLoader::FireWillChangeProcessEven
 
   mBrowserChangingProcessBlockers = nullptr;
 
   ErrorResult rv;
   RefPtr<Promise> allPromise = Promise::All(global, blockers, rv);
   return allPromise.forget();
 }
 
-already_AddRefed<Promise>
-nsFrameLoader::AppendPartialSHistoryAndSwap(nsIFrameLoader& aOther, ErrorResult& aRv)
-{
-  nsresult rv = SetIsPrerendered();
-  if (NS_FAILED(rv)) {
-    aRv.Throw(rv);
-    return nullptr;
-  }
-
-  if (&aOther == this) {
-    return nullptr;
-  }
-
-  RefPtr<nsFrameLoader> otherLoader = static_cast<nsFrameLoader*>(&aOther);
-
-  RefPtr<Promise> ready = FireWillChangeProcessEvent();
-  if (NS_WARN_IF(!ready)) {
-    aRv.Throw(NS_ERROR_FAILURE);
-    return nullptr;
-  }
-
-  // This promise will be resolved when the swap has finished, we return it now
-  // and pass it to our helper so our helper can resolve it.
-  RefPtr<Promise> complete = Promise::Create(mOwnerContent->GetOwnerGlobal(), aRv);
-  if (NS_WARN_IF(aRv.Failed())) {
-    return nullptr;
-  }
-
-  // Attach our handler to the ready promise, and make it fulfil the complete
-  // promise when we are done.
-  RefPtr<AppendPartialSHistoryAndSwapHelper> helper =
-    new AppendPartialSHistoryAndSwapHelper(this, otherLoader, complete);
-  ready->AppendNativeHandler(helper);
-  return complete.forget();
-}
-
-NS_IMETHODIMP
-nsFrameLoader::AppendPartialSHistoryAndSwap(nsIFrameLoader* aOther, nsISupports** aPromise)
-{
-  if (!aOther) {
-    return NS_ERROR_INVALID_POINTER;
-  }
-
-  ErrorResult rv;
-  RefPtr<Promise> complete = AppendPartialSHistoryAndSwap(*aOther, rv);
-  if (rv.Failed()) {
-    return rv.StealNSResult();
-  }
-  complete.forget(aPromise);
-  return NS_OK;
-}
-
-already_AddRefed<Promise>
-nsFrameLoader::RequestGroupedHistoryNavigation(uint32_t aGlobalIndex, ErrorResult& aRv)
-{
-  RefPtr<Promise> ready = FireWillChangeProcessEvent();
-  if (NS_WARN_IF(!ready)) {
-    aRv.Throw(NS_ERROR_FAILURE);
-    return nullptr;
-  }
-
-  // This promise will be resolved when the swap has finished, we return it now
-  // and pass it to our helper so our helper can resolve it.
-  RefPtr<Promise> complete = Promise::Create(mOwnerContent->GetOwnerGlobal(), aRv);
-  if (NS_WARN_IF(aRv.Failed())) {
-    return nullptr;
-  }
-
-  // Attach our handler to the ready promise, and make it fulfil the complete
-  // promise when we are done.
-  RefPtr<RequestGroupedHistoryNavigationHelper> helper =
-    new RequestGroupedHistoryNavigationHelper(this, aGlobalIndex, complete);
-  ready->AppendNativeHandler(helper);
-  return complete.forget();
-}
-
-NS_IMETHODIMP
-nsFrameLoader::RequestGroupedHistoryNavigation(uint32_t aGlobalIndex, nsISupports** aPromise)
-{
-  ErrorResult rv;
-  RefPtr<Promise> complete = RequestGroupedHistoryNavigation(aGlobalIndex, rv);
-  if (rv.Failed()) {
-    return rv.StealNSResult();
-  }
-  complete.forget(aPromise);
-  return NS_OK;
-}
-
 void
 nsFrameLoader::AddProcessChangeBlockingPromise(Promise& aPromise, ErrorResult& aRv)
 {
   if (NS_WARN_IF(!mBrowserChangingProcessBlockers)) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
   } else {
     mBrowserChangingProcessBlockers->AppendElement(&aPromise);
   }
@@ -2217,29 +1809,16 @@ nsFrameLoader::StartDestroy()
   // Let our window know that we are gone
   if (mDocShell) {
     nsCOMPtr<nsPIDOMWindowOuter> win_private(mDocShell->GetWindow());
     if (win_private) {
       win_private->SetFrameElementInternal(nullptr);
     }
   }
 
-  // Destroy the other frame loader owners now that we are being destroyed.
-  if (mPartialSHistory &&
-      mPartialSHistory->GetActiveState() == nsIPartialSHistory::STATE_ACTIVE) {
-    nsCOMPtr<nsIGroupedSHistory> groupedSHistory;
-    GetGroupedSHistory(getter_AddRefs(groupedSHistory));
-    if (groupedSHistory) {
-      NS_DispatchToCurrentThread(NS_NewRunnableFunction(
-        "nsFrameLoader::StartDestroy", [groupedSHistory]() {
-          groupedSHistory->CloseInactiveFrameLoaderOwners();
-        }));
-    }
-  }
-
   nsCOMPtr<nsIRunnable> destroyRunnable = new nsFrameLoaderDestroyRunnable(this);
   if (mNeedsAsyncDestroy || !doc ||
       NS_FAILED(doc->FinalizeFrameLoader(this, destroyRunnable))) {
     NS_DispatchToCurrentThread(destroyRunnable);
   }
 }
 
 nsresult
@@ -2512,21 +2091,16 @@ nsFrameLoader::MaybeCreateDocShell()
   nsCOMPtr<nsIDocShell> docShell = doc->GetDocShell();
   nsCOMPtr<nsIWebNavigation> parentAsWebNav = do_QueryInterface(docShell);
   NS_ENSURE_STATE(parentAsWebNav);
 
   // Create the docshell...
   mDocShell = do_CreateInstance("@mozilla.org/docshell;1");
   NS_ENSURE_TRUE(mDocShell, NS_ERROR_FAILURE);
 
-  if (mIsPrerendered) {
-    nsresult rv = mDocShell->SetIsPrerendered();
-    NS_ENSURE_SUCCESS(rv,rv);
-  }
-
   if (!mNetworkCreated) {
     if (mDocShell) {
       mDocShell->SetCreatedDynamically(true);
     }
   }
 
   // Get the frame name and tell the docshell about it.
   NS_ENSURE_TRUE(mDocShell, NS_ERROR_FAILURE);
@@ -2621,25 +2195,16 @@ nsFrameLoader::MaybeCreateDocShell()
       !mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::disablehistory)) {
     nsresult rv;
     nsCOMPtr<nsISHistory> sessionHistory =
       do_CreateInstance(NS_SHISTORY_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(mDocShell));
     webNav->SetSessionHistory(sessionHistory);
-
-
-    if (GroupedSHistory::GroupedHistoryEnabled()) {
-      mPartialSHistory = new PartialSHistory(this);
-      nsCOMPtr<nsISHistoryListener> listener(do_QueryInterface(mPartialSHistory));
-      nsCOMPtr<nsIPartialSHistoryListener> partialListener(do_QueryInterface(mPartialSHistory));
-      sessionHistory->AddSHistoryListener(listener);
-      sessionHistory->SetPartialSHistoryListener(partialListener);
-    }
   }
 
   OriginAttributes attrs;
   if (docShell->ItemType() == mDocShell->ItemType()) {
     attrs = nsDocShell::Cast(docShell)->GetOriginAttributes();
   }
 
   // Inherit origin attributes from parent document if
@@ -4041,17 +3606,16 @@ nsFrameLoader::GetNewTabContext(MutableT
         root->ShowAccelerators() ? UIStateChangeType_Set : UIStateChangeType_Clear;
       showFocusRings =
         root->ShowFocusRings() ? UIStateChangeType_Set : UIStateChangeType_Clear;
     }
   }
 
   bool tabContextUpdated =
     aTabContext->SetTabContext(OwnerIsMozBrowserFrame(),
-                               mIsPrerendered,
                                showAccelerators,
                                showFocusRings,
                                attrs,
                                presentationURLStr);
   NS_ENSURE_STATE(tabContextUpdated);
 
   return NS_OK;
 }
--- a/dom/base/nsFrameLoader.h
+++ b/dom/base/nsFrameLoader.h
@@ -22,17 +22,16 @@
 #include "nsFrameMessageManager.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/Attributes.h"
 #include "nsStubMutationObserver.h"
 #include "Units.h"
 #include "nsIWebBrowserPersistable.h"
 #include "nsIFrame.h"
-#include "nsIGroupedSHistory.h"
 #include "nsPluginTags.h"
 
 class nsIURI;
 class nsSubDocumentFrame;
 class nsView;
 class nsIInProcessContentFrameMessageManager;
 class AutoResetInShow;
 class AutoResetInFrameSwap;
@@ -69,18 +68,16 @@ typedef struct _GtkWidget GtkWidget;
 class nsFrameLoader final : public nsIFrameLoader,
                             public nsIWebBrowserPersistable,
                             public nsStubMutationObserver,
                             public mozilla::dom::ipc::MessageManagerCallback,
                             public nsWrapperCache
 {
   friend class AutoResetInShow;
   friend class AutoResetInFrameSwap;
-  friend class AppendPartialSHistoryAndSwapHelper;
-  friend class RequestGroupedHistoryNavigationHelper;
   typedef mozilla::dom::PBrowserParent PBrowserParent;
   typedef mozilla::dom::TabParent TabParent;
   typedef mozilla::layout::RenderFrameParent RenderFrameParent;
 
 public:
   static nsFrameLoader* Create(mozilla::dom::Element* aOwner,
                                nsPIDOMWindowOuter* aOpener,
                                bool aNetworkCreated,
@@ -119,26 +116,16 @@ public:
    * @param aURI The URI to load.
    * @param aTriggeringPrincipal The triggering principal for the load. May be
    *        null, in which case the node principal of the owner content will be
    *        used.
    */
   nsresult LoadURI(nsIURI* aURI, nsIPrincipal* aTriggeringPrincipal,
                    bool aOriginalSrc);
 
-  void SetIsPrerendered(mozilla::ErrorResult& aRv);
-
-  void MakePrerenderedLoaderActive(mozilla::ErrorResult& aRv);
-
-  already_AddRefed<mozilla::dom::Promise>
-  AppendPartialSHistoryAndSwap(nsIFrameLoader& aOther, mozilla::ErrorResult& aRv);
-
-  already_AddRefed<mozilla::dom::Promise>
-  RequestGroupedHistoryNavigation(uint32_t aGlobalIndex, mozilla::ErrorResult& aRv);
-
   void AddProcessChangeBlockingPromise(mozilla::dom::Promise& aPromise, mozilla::ErrorResult& aRv);
 
   void Destroy(mozilla::ErrorResult& aRv);
 
   void ActivateRemoteFrame(mozilla::ErrorResult& aRv);
 
   void DeactivateRemoteFrame(mozilla::ErrorResult& aRv);
 
@@ -168,38 +155,32 @@ public:
 
   void RequestUpdatePosition(mozilla::ErrorResult& aRv);
 
   void Print(uint64_t aOuterWindowID,
              nsIPrintSettings* aPrintSettings,
              nsIWebProgressListener* aProgressListener,
              mozilla::ErrorResult& aRv);
 
-  already_AddRefed<nsIGroupedSHistory> EnsureGroupedSHistory(mozilla::ErrorResult& aRv);
-
   void StartPersistence(uint64_t aOuterWindowID,
                         nsIWebBrowserPersistDocumentReceiver* aRecv,
                         mozilla::ErrorResult& aRv);
 
   // WebIDL getters
 
   already_AddRefed<nsIMessageSender> GetMessageManager();
 
   uint32_t EventMode() const { return mEventMode; }
 
   already_AddRefed<Element> GetOwnerElement();
 
   uint32_t LazyWidth() const;
 
   uint32_t LazyHeight() const;
 
-  already_AddRefed<nsIPartialSHistory> GetPartialSHistory();
-
-  already_AddRefed<nsIGroupedSHistory> GetGroupedSHistory();
-
   uint64_t ChildID() const { return mChildID; }
 
   bool ClampScrollPosition() const { return mClampScrollPosition; }
 
   bool ClipSubdocument() const { return mClipSubdocument; }
 
   bool DepthTooGreat() const { return mDepthTooGreat; }
 
@@ -480,23 +461,20 @@ private:
 
   // See nsIFrameLoader.idl. EVENT_MODE_NORMAL_DISPATCH automatically
   // forwards some input events to out-of-process content.
   uint32_t mEventMode;
 
   // Holds the last known size of the frame.
   mozilla::ScreenIntSize mLazySize;
 
-  nsCOMPtr<nsIPartialSHistory> mPartialSHistory;
-
   // A stack-maintained reference to an array of promises which are blocking
   // grouped history navigation
   nsTArray<RefPtr<mozilla::dom::Promise>>* mBrowserChangingProcessBlockers;
 
-  bool mIsPrerendered : 1;
   bool mDepthTooGreat : 1;
   bool mIsTopLevelContent : 1;
   bool mDestroyCalled : 1;
   bool mNeedsAsyncDestroy : 1;
   bool mInSwap : 1;
   bool mInShow : 1;
   bool mHideCalled : 1;
   // True when the object is created for an element which the parser has
--- a/dom/base/nsGkAtomList.h
+++ b/dom/base/nsGkAtomList.h
@@ -1124,17 +1124,16 @@ GK_ATOM(popupsinherittooltip, "popupsinh
 GK_ATOM(position, "position")
 GK_ATOM(poster, "poster")
 GK_ATOM(pre, "pre")
 GK_ATOM(preceding, "preceding")
 GK_ATOM(precedingSibling, "preceding-sibling")
 GK_ATOM(predicate, "predicate")
 GK_ATOM(prefix, "prefix")
 GK_ATOM(preload, "preload")
-GK_ATOM(prerendered, "prerendered")
 GK_ATOM(mozpresentation, "mozpresentation")
 GK_ATOM(preserve, "preserve")
 GK_ATOM(preserveSpace, "preserve-space")
 GK_ATOM(preventdefault, "preventdefault")
 GK_ATOM(primary, "primary")
 GK_ATOM(print, "print")
 GK_ATOM(priority, "priority")
 GK_ATOM(processingInstruction, "processing-instruction")
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -7565,23 +7565,16 @@ nsGlobalWindowInner::ClearDocumentDepend
 /* static */
 JSObject*
 nsGlobalWindowInner::CreateNamedPropertiesObject(JSContext *aCx,
                                                  JS::Handle<JSObject*> aProto)
 {
   return WindowNamedPropertiesHandler::Create(aCx, aProto);
 }
 
-bool
-nsGlobalWindowInner::GetIsPrerendered()
-{
-  nsIDocShell* docShell = GetDocShell();
-  return docShell && docShell->GetIsPrerendered();
-}
-
 void
 nsGlobalWindowInner::RedefineProperty(JSContext* aCx, const char* aPropName,
                                       JS::Handle<JS::Value> aValue,
                                       ErrorResult& aError)
 {
   JS::Rooted<JSObject*> thisObj(aCx, GetWrapperPreserveColor());
   if (!thisObj) {
     aError.Throw(NS_ERROR_UNEXPECTED);
--- a/dom/base/nsGlobalWindowInner.h
+++ b/dom/base/nsGlobalWindowInner.h
@@ -1161,18 +1161,16 @@ public:
 
   // Helper Functions
   already_AddRefed<nsIDocShellTreeOwner> GetTreeOwner();
   already_AddRefed<nsIWebBrowserChrome> GetWebBrowserChrome();
   bool IsPrivateBrowsing();
 
   void FireOfflineStatusEventIfChanged();
 
-  bool GetIsPrerendered();
-
 public:
   // Inner windows only.
   nsresult ScheduleNextIdleObserverCallback();
   uint32_t GetFuzzTimeMS();
   nsresult ScheduleActiveTimerCallback();
   uint32_t FindInsertionIndex(IdleObserverHolder* aIdleObserver);
   virtual nsresult RegisterIdleObserver(nsIIdleObserver* aIdleObserverPtr) override;
   nsresult FindIndexOfElementToRemove(nsIIdleObserver* aIdleObserver,
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -7596,23 +7596,16 @@ nsGlobalWindowOuter::InitWasOffline()
 int16_t
 nsGlobalWindowOuter::Orientation(CallerType aCallerType) const
 {
   return nsContentUtils::ResistFingerprinting(aCallerType) ?
            0 : WindowOrientationObserver::OrientationAngle();
 }
 #endif
 
-bool
-nsGlobalWindowOuter::GetIsPrerendered()
-{
-  nsIDocShell* docShell = GetDocShell();
-  return docShell && docShell->GetIsPrerendered();
-}
-
 void
 nsPIDOMWindowOuter::SetLargeAllocStatus(LargeAllocStatus aStatus)
 {
   MOZ_ASSERT(mLargeAllocStatus == LargeAllocStatus::NONE);
   mLargeAllocStatus = aStatus;
 }
 
 bool
--- a/dom/base/nsGlobalWindowOuter.h
+++ b/dom/base/nsGlobalWindowOuter.h
@@ -903,18 +903,16 @@ public:
   bool IsPrivateBrowsing();
 
   bool PopupWhitelisted();
   PopupControlState RevisePopupAbuseLevel(PopupControlState);
   void     FireAbuseEvents(const nsAString &aPopupURL,
                            const nsAString &aPopupWindowName,
                            const nsAString &aPopupWindowFeatures);
 
-  bool GetIsPrerendered();
-
 private:
   void ReportLargeAllocStatus();
 
 public:
   void FlushPendingNotifications(mozilla::FlushType aType);
 
   // Outer windows only.
   void EnsureReflowFlushAndPaint();
--- a/dom/base/nsHistory.cpp
+++ b/dom/base/nsHistory.cpp
@@ -73,17 +73,17 @@ nsHistory::GetLength(ErrorResult& aRv) c
   nsCOMPtr<nsISHistory> sHistory = GetSessionHistory();
   if (!sHistory) {
     aRv.Throw(NS_ERROR_FAILURE);
 
     return 0;
   }
 
   int32_t len;
-  nsresult rv = sHistory->GetGlobalCount(&len);
+  nsresult rv = sHistory->GetCount(&len);
 
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
 
     return 0;
   }
 
   return len >= 0 ? len : 0;
@@ -205,18 +205,18 @@ nsHistory::Go(int32_t aDelta, ErrorResul
   if (!webnav) {
     aRv.Throw(NS_ERROR_FAILURE);
 
     return;
   }
 
   int32_t curIndex = -1;
   int32_t len = 0;
-  session_history->GetGlobalIndex(&curIndex);
-  session_history->GetGlobalCount(&len);
+  session_history->GetIndex(&curIndex);
+  session_history->GetCount(&len);
 
   int32_t index = curIndex + aDelta;
   if (index > -1 && index < len)
     webnav->GotoIndex(index);
 
   // Ignore the return value from GotoIndex(), since returning errors
   // from GotoIndex() can lead to exceptions and a possible leak
   // of history length
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -3113,18 +3113,16 @@ public:
   AbstractMainThreadFor(mozilla::TaskCategory aCategory) override;
 
   // The URLs passed to these functions should match what
   // JS::DescribeScriptedCaller() returns, since these APIs are used to
   // determine whether some code is being called from a tracking script.
   void NoteScriptTrackingStatus(const nsACString& aURL, bool isTracking);
   bool IsScriptTracking(const nsACString& aURL) const;
 
-  bool PrerenderHref(nsIURI* aHref);
-
   // For more information on Flash classification, see
   // toolkit/components/url-classifier/flash-block-lists.rst
   virtual mozilla::dom::FlashClassification DocumentFlashClassification() = 0;
   virtual bool IsThirdParty() = 0;
 
   bool IsScopedStyleEnabled();
 
   nsINode* GetServoRestyleRoot() const
--- a/dom/base/nsIFrameLoader.idl
+++ b/dom/base/nsIFrameLoader.idl
@@ -12,18 +12,16 @@ interface nsIFrame;
 interface nsSubDocumentFrame;
 interface nsIMessageSender;
 interface nsIVariant;
 interface nsIDOMElement;
 interface nsITabParent;
 interface nsILoadContext;
 interface nsIPrintSettings;
 interface nsIWebProgressListener;
-interface nsIGroupedSHistory;
-interface nsIPartialSHistory;
 
 [builtinclass, uuid(1645af04-1bc7-4363-8f2c-eb9679220ab1)]
 interface nsIFrameLoader : nsISupports
 {
   /**
    * Get the docshell from the frame loader.
    */
   readonly attribute nsIDocShell docShell;
@@ -49,41 +47,16 @@ interface nsIFrameLoader : nsISupports
 
   /**
    * Loads the specified URI in this frame. Behaves identically to loadFrame,
    * except that this method allows specifying the URI to load.
    */
   void loadURI(in nsIURI aURI, in boolean originalSrc);
 
   /**
-   * Puts the frameloader in prerendering mode.
-   */
-  void setIsPrerendered();
-
-  /**
-   * Make the prerendered frameloader being active (and clear isPrerendered flag).
-   */
-  void makePrerenderedLoaderActive();
-
-  /**
-   * Append partial session history from another frame loader.
-   *
-   * @return A promise which will be resolved when the navigation is complete.
-   */
-  nsISupports appendPartialSHistoryAndSwap(in nsIFrameLoader aOther);
-
-  /**
-   * If grouped session history is applied, use this function to navigate to
-   * an entry of session history object of another frameloader.
-   *
-   * @return A promise which will be resolved when the navigation is complete.
-   */
-  nsISupports requestGroupedHistoryNavigation(in unsigned long aGlobalIndex);
-
-  /**
    * Adds a blocking promise for the current cross process navigation.
    * This method can only be called while the "BrowserWillChangeProcess" event
    * is being fired.
    */
   [implicit_jscontext]
   void addProcessChangeBlockingPromise(in jsval aPromise);
 
   /**
@@ -166,21 +139,16 @@ interface nsIFrameLoader : nsISupports
    *                       set to prevent prompting.
    * @param aProgressListener optional print progress listener.
    */
   void print(in unsigned long long aOuterWindowID,
              in nsIPrintSettings aPrintSettings,
              in nsIWebProgressListener aProgressListener);
 
   /**
-   * Ensure that the current nsIFrameLoader has a GroupedSHistory.
-   */
-  nsIGroupedSHistory ensureGroupedSHistory();
-
-  /**
    * The default event mode automatically forwards the events
    * handled in EventStateManager::HandleCrossProcessEvent to
    * the child content process when these events are targeted to
    * the remote browser element.
    *
    * Used primarly for input events (mouse, keyboard)
    */
   const unsigned long EVENT_MODE_NORMAL_DISPATCH = 0x00000000;
@@ -240,27 +208,16 @@ interface nsIFrameLoader : nsISupports
    * The last known height of the frame. Reading this property will not trigger
    * a reflow, and therefore may not reflect the current state of things. It
    * should only be used in asynchronous APIs where values are not guaranteed
    * to be up-to-date when received.
    */
   readonly attribute unsigned long lazyHeight;
 
   /**
-   * The partial session history.
-   */
-  readonly attribute nsIPartialSHistory partialSHistory;
-
-  /**
-   * The grouped session history composed of multiple session history objects
-   * across root docshells.
-   */
-  readonly attribute nsIGroupedSHistory groupedSHistory;
-
-  /**
    * Is `true` if the frameloader is dead (destroy has been called on it)
    */
   [infallible] readonly attribute boolean isDead;
 };
 
 %{C++
 class nsFrameLoader;
 %}
@@ -272,21 +229,16 @@ interface nsIFrameLoaderOwner : nsISuppo
 {
   /**
    * The frame loader owned by this nsIFrameLoaderOwner
    */
   [binaryname(FrameLoaderXPCOM)] readonly attribute nsIFrameLoader frameLoader;
   [noscript, notxpcom] alreadyAddRefed_nsFrameLoader GetFrameLoader();
 
   /**
-   * Puts the FrameLoaderOwner in prerendering mode.
-   */
-  void setIsPrerendered();
-
-  /**
    * This method is used internally by SwapFrameLoaders to set the frame loader
    * on the target nsFrameLoader.
    *
    * Avoid using this method outside of that context, and instead prefer using
    * SwapFrameLoaders.
    */
   [noscript, notxpcom] void
   internalSetFrameLoader(in nsIFrameLoader aNewFrameLoader);
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -1141,22 +1141,16 @@ nsObjectLoadingContent::GetFrameLoader()
 }
 
 void
 nsObjectLoadingContent::PresetOpenerWindow(mozIDOMWindowProxy* aWindow, mozilla::ErrorResult& aRv)
 {
   aRv.Throw(NS_ERROR_FAILURE);
 }
 
-NS_IMETHODIMP
-nsObjectLoadingContent::SetIsPrerendered()
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
 void
 nsObjectLoadingContent::InternalSetFrameLoader(nsIFrameLoader* aNewFrameLoader)
 {
   MOZ_CRASH("You shouldn't be calling this function, it doesn't make any sense on this type.");
 }
 
 NS_IMETHODIMP
 nsObjectLoadingContent::GetActualType(nsACString& aType)
--- a/dom/base/nsStyleLinkElement.cpp
+++ b/dom/base/nsStyleLinkElement.cpp
@@ -147,18 +147,16 @@ static uint32_t ToLinkMask(const nsAStri
   else if (aLink.EqualsLiteral("next"))
     return nsStyleLinkElement::eNEXT;
   else if (aLink.EqualsLiteral("alternate"))
     return nsStyleLinkElement::eALTERNATE;
   else if (aLink.EqualsLiteral("preconnect"))
     return nsStyleLinkElement::ePRECONNECT;
   else if (aLink.EqualsLiteral("preload"))
     return nsStyleLinkElement::ePRELOAD;
-  else if (aLink.EqualsLiteral("prerender"))
-    return nsStyleLinkElement::ePRERENDER;
   else
     return 0;
 }
 
 uint32_t nsStyleLinkElement::ParseLinkTypes(const nsAString& aTypes)
 {
   uint32_t linkMask = 0;
   nsAString::const_iterator start, done;
--- a/dom/base/nsStyleLinkElement.h
+++ b/dom/base/nsStyleLinkElement.h
@@ -59,17 +59,17 @@ public:
 
   enum RelValue {
     ePREFETCH =     0x00000001,
     eDNS_PREFETCH = 0x00000002,
     eSTYLESHEET =   0x00000004,
     eNEXT =         0x00000008,
     eALTERNATE =    0x00000010,
     ePRECONNECT =   0x00000020,
-    ePRERENDER =    0x00000040,
+    // NOTE: 0x40 is unused
     ePRELOAD =      0x00000080
   };
 
   // The return value is a bitwise or of 0 or more RelValues.
   static uint32_t ParseLinkTypes(const nsAString& aTypes);
 
   static bool CheckPreloadAttrs(const nsAttrValue& aAs, const nsAString& aType,
                                 const nsAString& aMedia, nsIDocument* aDocument);
--- a/dom/base/test/chrome/chrome.ini
+++ b/dom/base/test/chrome/chrome.ini
@@ -19,17 +19,16 @@ support-files =
   fileconstructor_file.png
   frame_bug814638.xul
   frame_custom_element_content.html
   custom_element_ep.js
   host_bug814638.xul
   window_nsITextInputProcessor.xul
   title_window.xul
   window_swapFrameLoaders.xul
-  window_groupedSHistory.xul
 
 [test_bug120684.xul]
 [test_bug206691.xul]
 [test_bug289714.xul]
 [test_bug339494.xul]
 [test_bug357450.xul]
 support-files = ../file_bug357450.js
 [test_bug380418.html]
@@ -71,10 +70,9 @@ support-files = ../file_bug357450.js
 [test_nsITextInputProcessor.xul]
 [test_permission_isHandlingUserInput.xul]
 support-files = ../dummy.html
 [test_range_getClientRectsAndTexts.html]
 [test_title.xul]
 support-files = file_title.xul
 [test_windowroot.xul]
 [test_swapFrameLoaders.xul]
-[test_groupedSHistory.xul]
 [test_bug1339722.html]
deleted file mode 100644
--- a/dom/base/test/chrome/test_groupedSHistory.xul
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
-                 type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1276553
--->
-<window title="Mozilla Bug 1276553"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        onload="loadTest();">
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
-  <!-- test results are displayed in the html:body -->
-  <body xmlns="http://www.w3.org/1999/xhtml">
-  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1276553"
-     target="_blank">Mozilla Bug 1276553</a>
-  </body>
-
-  <!-- test code goes here -->
-  <script type="application/javascript">
-  <![CDATA[
-
-  /** Test for GroupedSHistory **/
-  SimpleTest.waitForExplicitFinish();
-  function loadTest() {
-    window.open("window_groupedSHistory.xul", "", "width=360,height=240,chrome");
-  }
-
-  ]]>
-  </script>
-</window>
deleted file mode 100644
--- a/dom/base/test/chrome/window_groupedSHistory.xul
+++ /dev/null
@@ -1,637 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
-                 type="text/css"?>
-<!--
-The test case creates 3 <xul:browser>s, load entries into them, modify the
-documents, and then check if grouped history merge / back / forward all work
-with bfcache preserved.
-
-Related bugs:
-https://bugzilla.mozilla.org/show_bug.cgi?id=1276553
-https://bugzilla.mozilla.org/show_bug.cgi?id=1310768
--->
-<window title="Test GroupedSHistory"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="run();">
-
-  <!-- test code goes here -->
-  <script type="application/javascript">
-  <![CDATA[
-
-  const {interfaces: Ci, classes: Cc, results: Cr, utils: Cu} = Components;
-  Cu.import("resource://testing-common/TestUtils.jsm");
-  Cu.import("resource://testing-common/ContentTask.jsm");
-  Cu.import("resource://testing-common/BrowserTestUtils.jsm");
-  ContentTask.setTestScope(window.opener.wrappedJSObject);
-
-  let imports = ['SimpleTest', 'SpecialPowers', 'ok', 'is', 'info'];
-  for (let name of imports) {
-    window[name] = window.opener.wrappedJSObject[name];
-  }
-
-  function run() {
-    SpecialPowers.pushPrefEnv(
-      {'set' : [[ 'browser.groupedhistory.enabled', true ]]})
-    // Since we're not going to use GroupedSHistory in non-10s or
-    // chrome-only URLs, we don't test for non-remote browsers anymore.
-    //
-    // As a note, there are 2 known issues in non-10s:
-    // 1. nsDocShell::InternalLoad could start before nsFrameLoader calls
-    // EvictAllContentViewers, and causes RestoreFromHistory fails.
-    // 2. If using sendAsyncMessage, messages may be queued in
-    // SameProcessMessageQueue, and cause "pagehide" being delivered to the
-    // message manager of background <xul:browser> after swap.
-    .then(() => test(true))
-    .then(() => {
-      window.close();
-      SimpleTest.finish();
-    });
-  }
-
-  function test(remote) {
-    let act, bg1, bg2;
-    return Promise.resolve()
-
-    // create background browser 1 with 1 entry
-    .then(() => info('TEST-INFO | test create browser #1, remote=' + remote))
-    .then(() => createBrowser('pineapple', remote))
-    .then(b => bg1 = b)
-    .then(() => verifyBrowser(bg1, 'pineapple' /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    false      /* canGoBack */,
-                                    false      /* canGoForward */,
-                                    false      /* partial */ ))
-    .then(() => addBfcachedText(bg1))
-
-     // create background browser 2 with 2 entries
-    .then(() => info('TEST-INFO | test create browser #2, remote=' + remote))
-    .then(() => createBrowser('apple', remote))
-    .then(b => bg2 = b)
-    .then(() => verifyBrowser(bg2, 'apple'     /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    false      /* canGoBack */,
-                                    false      /* canGoForward */,
-                                    false      /* partial */ ))
-    .then(() => addBfcachedText(bg2))
-    .then(() => loadURI(bg2, getDummyHtml('pencil')))
-    .then(() => verifyBrowser(bg2, 'pencil'    /* title */,
-                                    1          /* index */,
-                                    2          /* length */,
-                                    true       /* canGoBack */,
-                                    false      /* canGoForward */,
-                                    false      /* partial */ ))
-    .then(() => addBfcachedText(bg2))
-
-    // create active browser with 1 entry
-    .then(() => info('TEST-INFO | test create browser #3, remote=' + remote))
-    .then(() => createBrowser('pen', remote, true))
-    .then(b => act = b)
-    .then(() => verifyBrowser(act, 'pen'       /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    false      /* canGoBack */,
-                                    false      /* canGoForward */,
-                                    false      /* partial */ ))
-    .then(() => addBfcachedText(act))
-
-    // merge to 2 entries pen-pineapple
-    // act: pineapple
-    // bg1: pen
-    .then(() => info('TEST-INFO | test merge history #1, remote=' + remote))
-    .then(() => mergeHistory(act, bg1, 'pineapple'))
-    .then(() => verifyBrowser(act, 'pineapple' /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    true       /* canGoBack */,
-                                    false      /* canGoForward */,
-                                    true       /* partial */,
-                                    1          /* offset */,
-                                    2          /* globalLength */,
-                                    true       /* bfcached */ ))
-
-    // merge to 4 entries pen-pineapple-apple-pencil
-    // act: apple-pencil
-    // bg1: pen
-    // bg2: pineapple
-    .then(() => info('TEST-INFO | test merge history #2, remote=' + remote))
-    .then(() => mergeHistory(act, bg2, 'pencil'))
-    .then(() => verifyBrowser(act, 'pencil'    /* title */,
-                                    1          /* index */,
-                                    2          /* length */,
-                                    true       /* canGoBack */,
-                                    false      /* canGoForward */,
-                                    true       /* partial */,
-                                    2          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-
-    // test go back
-    // act: apple-pencil
-    // bg1: pen
-    // bg2: pineapple
-    .then(() => info('TEST-INFO | test history go back #1, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, act.goBack.bind(act), 'pencil', 'apple'))
-    .then(() => verifyBrowser(act, 'apple'     /* title */,
-                                    0          /* index */,
-                                    2          /* length */,
-                                    true       /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    2          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-    // test go back
-    // act: pineapple
-    // bg1: pen
-    // bg2: apple-pencil
-    .then(() => info('TEST-INFO | test history go back #2, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, act.goBack.bind(act), 'apple', 'pineapple', bg2))
-    .then(() => verifyBrowser(act, 'pineapple' /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    true       /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    1          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-    // test go back
-    // act: pen
-    // bg1: pineapple
-    // bg2: apple-pencil
-    .then(() => info('TEST-INFO | test history go back #3, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, act.goBack.bind(act), 'pineapple', 'pen', bg1))
-    .then(() => verifyBrowser(act, 'pen'       /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    false      /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    0          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-
-    // test go forward
-    // act: pineapple
-    // bg1: pen
-    // bg2: apple-pencil
-    .then(() => info('TEST-INFO | test history go forward #1, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, act.goForward.bind(act), 'pen', 'pineapple', bg1))
-    .then(() => verifyBrowser(act, 'pineapple' /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    true       /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    1          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-    // test go forward
-    // act: apple-pencil
-    // bg1: pen
-    // bg2: pineapple
-    .then(() => info('TEST-INFO | test history go forward #2, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, act.goForward.bind(act), 'pineapple', 'apple', bg2))
-    .then(() => verifyBrowser(act, 'apple'     /* title */,
-                                    0          /* index */,
-                                    2          /* length */,
-                                    true       /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    2          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-
-    // test go forward
-    // act: apple-pencil
-    // bg1: pen
-    // bg2: pineapple
-    .then(() => info('TEST-INFO | test history go forward #3, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, act.goForward.bind(act), 'apple', 'pencil'))
-    .then(() => verifyBrowser(act, 'pencil'    /* title */,
-                                    1          /* index */,
-                                    2          /* length */,
-                                    true       /* canGoBack */,
-                                    false      /* canGoForward */,
-                                    true       /* partial */,
-                                    2          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-
-    // test goto index
-    // act: pen
-    // bg1: apple-pencil
-    // bg2: pineapple
-    .then(() => info('TEST-INFO | test history goto index #1, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, act.gotoIndex.bind(act, 0), 'pencil', 'pen', bg1))
-    .then(() => verifyBrowser(act, 'pen'       /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    false      /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    0          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-    // test goto index
-    // act: apple-pencil
-    // bg1: pen
-    // bg2: pineapple
-    .then(() => info('TEST-INFO | test history goto index #2, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, act.gotoIndex.bind(act, 2), 'pen', 'apple', bg1))
-    .then(() => verifyBrowser(act, 'apple'     /* title */,
-                                    0          /* index */,
-                                    2          /* length */,
-                                    true       /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    2          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-    // test goto index
-    // act: pineapple
-    // bg1: pen
-    // bg2: apple-pencil
-    .then(() => info('TEST-INFO | test history goto index #3, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, act.gotoIndex.bind(act, 1), 'apple', 'pineapple', bg2))
-    .then(() => verifyBrowser(act, 'pineapple' /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    true       /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    1          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-    // test goto index
-    // act: apple-pencil
-    // bg1: pen
-    // bg2: pineapple
-    .then(() => info('TEST-INFO | test history goto index #4, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, act.gotoIndex.bind(act, 3), 'pineapple', 'pencil', bg2))
-    .then(() => verifyBrowser(act, 'pencil'    /* title */,
-                                    1          /* index */,
-                                    2          /* length */,
-                                    true       /* canGoBack */,
-                                    false      /* canGoForward */,
-                                    true       /* partial */,
-                                    2          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-
-    // test content go back
-    // act: apple-pencil
-    // bg1: pen
-    // bg2: pineapple
-    .then(() => info('TEST-INFO | test content history go back #1, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, contentGoBack.bind(null, act), 'pencil', 'apple'))
-    .then(() => verifyBrowser(act, 'apple'     /* title */,
-                                    0          /* index */,
-                                    2          /* length */,
-                                    true       /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    2          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-    // test content go back
-    // act: pineapple
-    // bg1: pen
-    // bg2: apple-pencil
-    .then(() => info('TEST-INFO | test content history go back #2, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, contentGoBack.bind(null, act), 'apple', 'pineapple', bg2))
-    .then(() => verifyBrowser(act, 'pineapple' /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    true       /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    1          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-    // test content go back
-    // act: pen
-    // bg1: pineapple
-    // bg2: apple-pencil
-    .then(() => info('TEST-INFO | test content history go back #3, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, contentGoBack.bind(null, act), 'pineapple', 'pen', bg1))
-    .then(() => verifyBrowser(act, 'pen'       /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    false      /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    0          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-
-    // test content go forward
-    // act: pineapple
-    // bg1: pen
-    // bg2: apple-pencil
-    .then(() => info('TEST-INFO | test content history go forward #1, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, contentGoForward.bind(null, act), 'pen', 'pineapple', bg1))
-    .then(() => verifyBrowser(act, 'pineapple' /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    true       /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    1          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-    // test content go forward
-    // act: apple-pencil
-    // bg1: pen
-    // bg2: pineapple
-    .then(() => info('TEST-INFO | test content history go forward #2, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, contentGoForward.bind(null, act), 'pineapple', 'apple', bg2))
-    .then(() => verifyBrowser(act, 'apple'     /* title */,
-                                    0          /* index */,
-                                    2          /* length */,
-                                    true       /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    2          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-
-    // test content go forward
-    // act: apple-pencil
-    // bg1: pen
-    // bg2: pineapple
-    .then(() => info('TEST-INFO | test content history go forward #3, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, contentGoForward.bind(null, act), 'apple', 'pencil'))
-    .then(() => verifyBrowser(act, 'pencil'    /* title */,
-                                    1          /* index */,
-                                    2          /* length */,
-                                    true       /* canGoBack */,
-                                    false      /* canGoForward */,
-                                    true       /* partial */,
-                                    2          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-
-    // test content go
-    // act: pen
-    // bg1: apple-pencil
-    // bg2: pineapple
-    .then(() => info('TEST-INFO | test content history go #1, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, contentGo.bind(null, act, -3), 'pencil', 'pen', bg1))
-    .then(() => verifyBrowser(act, 'pen'       /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    false      /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    0          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-    // test content go
-    // act: apple-pencil
-    // bg1: pen
-    // bg2: pineapple
-    .then(() => info('TEST-INFO | test content history go #2, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, contentGo.bind(null, act, 2), 'pen', 'apple', bg1))
-    .then(() => verifyBrowser(act, 'apple'     /* title */,
-                                    0          /* index */,
-                                    2          /* length */,
-                                    true       /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    2          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-    // test content go
-    // act: pineapple
-    // bg1: pen
-    // bg2: apple-pencil
-    .then(() => info('TEST-INFO | test content history go #3, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, contentGo.bind(null, act, -1), 'apple', 'pineapple', bg2))
-    .then(() => verifyBrowser(act, 'pineapple' /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    true       /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    1          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-    // test content go
-    // act: apple-pencil
-    // bg1: pen
-    // bg2: pineapple
-    .then(() => info('TEST-INFO | test content history go #4, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, contentGo.bind(null, act, 2), 'pineapple', 'pencil', bg2))
-    .then(() => verifyBrowser(act, 'pencil'    /* title */,
-                                    1          /* index */,
-                                    2          /* length */,
-                                    true       /* canGoBack */,
-                                    false      /* canGoForward */,
-                                    true       /* partial */,
-                                    2          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-
-    // test history change to 3 entries pen-pineapple-banana
-    // act: pineapple
-    // bg1: pen
-    // bg2: apple-pencil
-    .then(() => info('TEST-INFO | test history change, remote=' + remote))
-    .then(() => wrapHistoryNavFn(act, act.gotoIndex.bind(act, 1), 'pencil', 'pineapple', bg2))
-    .then(() => verifyBrowser(act, 'pineapple' /* title */,
-                                    0          /* index */,
-                                    1          /* length */,
-                                    true       /* canGoBack */,
-                                    true       /* canGoForward */,
-                                    true       /* partial */,
-                                    1          /* offset */,
-                                    4          /* globalLength */,
-                                    true       /* bfcached */ ))
-
-    // act: pineapple-banana
-    // bg1: pen
-    // bg2: (removed from group)
-    .then(() => loadURI(act, getDummyHtml('banana')))
-    .then(() => verifyBrowser(act, 'banana'    /* title */,
-                                    1          /* index */,
-                                    2          /* length */,
-                                    true       /* canGoBack */,
-                                    false      /* canGoForward */,
-                                    true       /* partial */,
-                                    1          /* offset */,
-                                    3          /* globalLength */ ))
-  }
-
-  function getDummyHtml(title) {
-    return 'data:text/html;charset=UTF-8,' +
-     '<html><head><title>' + title + '</title><script>' +
-     'window.addEventListener("pageshow", e => document.dispatchEvent(' +
-     '  new CustomEvent("test:content-pageshow", {detail: document.title})));' +
-     'window.addEventListener("pagehide", e => document.dispatchEvent(' +
-     '  new CustomEvent("test:content-pagehide", {detail: document.title})));' +
-     'window.addEventListener("visibilitychange", e => document.dispatchEvent(' +
-     '  new CustomEvent("test:content-visibilitychange", {detail: ' +
-     '    {title: document.title, visibility: document.visibilityState}})));' +
-     '</script></head><body><h1>' + title + '</h1><p id="p1"></p></body></html>';
-  }
-
-  let gBrowserCount = 0;
-  function createBrowser(title, remote, active = false) {
-    let browser = document.createElement('browser');
-    browser.testId = ++gBrowserCount; // for debugging
-    browser.setAttribute('type', 'content');
-    browser.setAttribute('remote', remote);
-    browser.setAttribute('src', getDummyHtml(title));
-    browser.docShellIsActive = active;
-    document.getElementById('stack').appendChild(browser);
-    return BrowserTestUtils.browserLoaded(browser)
-           .then(() => {
-             // Register our own event listeners.
-             //
-             // We don't use BrowserTestUtils.waitForContentEvents, because when
-             // swapping frameloaders, the event listeners at content side are
-             // also swapped to another browser. The message listener registered
-             // by waitForContentEvents will never receive messages consequently.
-             browser.messageManager.loadFrameScript('data:,' +
-               'addEventListener("test:content-pageshow", e => {' +
-                 'if (e.target == content.document) {' +
-                   'sendAsyncMessage("test:content-pageshow", { title: e.detail });' +
-                 '}' +
-               '}, true, true);' +
-               'addEventListener("test:content-pagehide", e => {' +
-                 'if (e.target == content.document) {' +
-                   'sendAsyncMessage("test:content-pagehide", { title: e.detail });' +
-                 '}' +
-               '}, true, true);' +
-               'addEventListener("test:content-visibilitychange", e => {' +
-                 'sendAsyncMessage("test:content-visibilitychange", e.detail);' +
-               '}, true, true);',
-               true);
-
-             // Log for debugging purpose.
-             browser.messageManager.addMessageListener('test:content-pageshow',
-               msg => info('TEST-INFO | pageshow#' + browser.testId + ' ' + JSON.stringify(msg.data)));
-             browser.messageManager.addMessageListener('test:content-pagehide',
-               msg => info('TEST-INFO | pagehide#' + browser.testId + ' ' + JSON.stringify(msg.data)));
-             browser.messageManager.addMessageListener('test:content-visibilitychange',
-               msg => info('TEST-INFO | visibilitychange#' + browser.testId + ' ' + JSON.stringify(msg.data)));
-           })
-           .then(() => {
-             // A trick to ensure webProgress object is created for e10s case.
-             // Otherwise canGoBack / canGoForward won't be updated.
-             ok(browser.webProgress, 'check browser.webProgress exists');
-             return browser;
-           });
-  }
-
-  function addBfcachedText(browser) {
-    return ContentTask.spawn(browser, null, () => {
-      content.document.getElementById('p1').textContent = 'modified';
-    });
-  }
-
-  function loadURI(browser, uri) {
-    let promise = BrowserTestUtils.browserLoaded(browser, false);
-    browser.loadURI(uri);
-    return promise;
-  }
-
-  function mergeHistory(b1, b2, title) {
-    let promises = [];
-    let pagehide1, pagehide2;
-
-    promises.push(BrowserTestUtils.waitForMessage(b1.messageManager,
-      'test:content-visibilitychange', msg => msg.data &&
-        (msg.data.title == title) && (msg.data.visibility == 'visible')));
-
-    // For swapping remote browsers, we'll also receive Content:LocationChange
-    if (b1.isRemoteBrowser) {
-      // It's guaranteed location change can be delivered to b1's message
-      // manager, since frameloader is synchronously swapping on main thread
-      // after calling PartialSHistory::OnActive(). Therefore the message could
-      // only be handled after swapping.
-      promises.push(BrowserTestUtils.waitForMessage(b1.messageManager, 'Content:LocationChange'));
-    }
-
-    promises.push(Promise.resolve().then(() => {
-      let f1 = b1.QueryInterface(Components.interfaces.nsIFrameLoaderOwner).frameLoader;
-      let f2 = b2.QueryInterface(Components.interfaces.nsIFrameLoaderOwner).frameLoader;
-      return f1.appendPartialSHistoryAndSwap(f2);
-    }));
-
-    return Promise.all(promises);
-  }
-
-  function wrapHistoryNavFn(browser, navFn, prevTitle, nextTitle, browserToSwap) {
-    let promises = [];
-
-    // Expecting pagehide from previous page, and a pageshow from next page.
-    //
-    // "Pagehide" is sent before calling OnRequestCrossBrowserNavigation(),
-    // so it should be handled before swapping. "Pageshow" on the other hand
-    // should be handled after swapping cause frameloader is synchronously
-    // swapping on main thread after calling PartialSHistory::OnActive().
-    //
-    // Therefore both messages should be delivered to browser.messageManager.
-    promises.push(BrowserTestUtils.waitForMessage(browser.messageManager,
-      'test:content-pagehide', msg => msg.data && (msg.data.title == prevTitle)));
-    promises.push(BrowserTestUtils.waitForMessage(browser.messageManager,
-      'test:content-pageshow', msg => msg.data && (msg.data.title == nextTitle)));
-    promises.push(navFn() || Promise.resolve());
-
-    // For swapping remote browsers, we'll also receive Content:LocationChange
-    if (browserToSwap && browser.isRemoteBrowser) {
-      promises.push(BrowserTestUtils.waitForMessage(browser.messageManager,
-        'Content:LocationChange'));
-    }
-
-    return Promise.all(promises);
-  }
-
-  function contentGoBack(browser) {
-    ContentTask.spawn(browser, null, () => content.history.back());
-  }
-
-  function contentGoForward(browser) {
-    ContentTask.spawn(browser, null, () => content.history.forward());
-  }
-
-  function contentGo(browser, offset) {
-    ContentTask.spawn(browser, { offset },
-      ({ offset }) => content.history.go(offset));
-  }
-
-  function verifyBrowser(browser, title, index, length, canGoBack, canGoForward,
-                         partial, offset = 0, globalLength = length, bfcached = false) {
-    is(browser.canGoBack, canGoBack, 'check browser.canGoBack');
-    is(browser.canGoForward, canGoForward, 'check browser.canGoForward');
-    if (partial) {
-      let frameLoader = browser.QueryInterface(Components.interfaces.nsIFrameLoaderOwner).frameLoader;
-      is(frameLoader.groupedSHistory.count, globalLength, 'check groupedSHistory.count');
-    }
-
-    return ContentTask.spawn(browser,
-        { title, index, length, canGoBack, canGoForward, partial, offset, globalLength, bfcached },
-        ({ title, index, length, canGoBack, canGoForward, partial, offset, globalLength, bfcached }) => {
-      let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
-      let shistory = webNav.sessionHistory;
-      is(webNav.canGoBack, canGoBack, 'check webNav.canGoBack');
-      is(webNav.canGoForward, canGoForward, 'check webNav.canGoForward');
-      is(shistory.index, index, 'check shistory.index');
-      is(shistory.count, length, 'check shistory.count');
-      is(shistory.isPartial, partial, 'check shistory.isPartial');
-      is(shistory.globalIndexOffset, offset, 'check shistory.globalIndexOffset');
-      is(shistory.globalCount, globalLength, 'check shistory.globalCount');
-      is(content.document.title, title, 'check title');
-      is(content.document.getElementById('p1').textContent, bfcached ? 'modified' : '', 'check bfcached content');
-      is(content.history.length, globalLength, 'check history.legnth');
-    });
-  }
-
-  ]]>
-  </script>
-  <stack id="stack" flex="1" />
-</window>
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -2867,53 +2867,16 @@ IsNonExposedGlobal(JSContext* aCx, JSObj
   if ((aNonExposedGlobals & GlobalNames::WorkletGlobalScope) &&
       !strcmp(name, "WorkletGlobalScope")) {
     return true;
   }
 
   return false;
 }
 
-void
-HandlePrerenderingViolation(nsPIDOMWindowInner* aWindow)
-{
-  // Freeze the window and its workers, and its children too.
-  aWindow->Freeze();
-
-  // Suspend event handling on the document
-  nsCOMPtr<nsIDocument> doc = aWindow->GetExtantDoc();
-  if (doc) {
-    doc->SuppressEventHandling();
-  }
-}
-
-bool
-EnforceNotInPrerendering(JSContext* aCx, JSObject* aObj)
-{
-  JS::Rooted<JSObject*> thisObj(aCx, js::CheckedUnwrap(aObj));
-  if (!thisObj) {
-    // Without a this object, we cannot check the safety.
-    return true;
-  }
-  nsGlobalWindowInner* window = xpc::WindowGlobalOrNull(thisObj);
-  if (!window) {
-    // Without a window, we cannot check the safety.
-    return true;
-  }
-
-  if (window->GetIsPrerendered()) {
-    HandlePrerenderingViolation(window->AsInner());
-    // When the bindings layer sees a false return value, it returns false form
-    // the JSNative in order to trigger an uncatchable exception.
-    return false;
-  }
-
-  return true;
-}
-
 bool
 GenericBindingGetter(JSContext* cx, unsigned argc, JS::Value* vp)
 {
   JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
   const JSJitInfo *info = FUNCTION_VALUE_TO_JITINFO(args.calleev());
   prototypes::ID protoID = static_cast<prototypes::ID>(info->protoID);
   if (!args.thisv().isObject()) {
     return ThrowInvalidThis(cx, args, false, protoID);
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -2612,16 +2612,30 @@ inline bool
 UseDOMXray(JSObject* obj)
 {
   const js::Class* clasp = js::GetObjectClass(obj);
   return IsDOMClass(clasp) ||
          JS_IsNativeFunction(obj, Constructor) ||
          IsDOMIfaceAndProtoClass(clasp);
 }
 
+inline bool
+IsDOMConstructor(JSObject* obj)
+{
+  if (JS_IsNativeFunction(obj, dom::Constructor)) {
+    // NamedConstructor, like Image
+    return true;
+  }
+
+  const js::Class* clasp = js::GetObjectClass(obj);
+  // Check for a DOM interface object.
+  return dom::IsDOMIfaceAndProtoClass(clasp) &&
+         dom::DOMIfaceAndProtoJSClass::FromJSClass(clasp)->mType == dom::eInterface;
+}
+
 #ifdef DEBUG
 inline bool
 HasConstructor(JSObject* obj)
 {
   return JS_IsNativeFunction(obj, Constructor) ||
          js::GetObjectClass(obj)->getConstruct();
 }
 #endif
@@ -3241,31 +3255,16 @@ ConvertExceptionToPromise(JSContext* cx,
                           JS::MutableHandle<JS::Value> rval);
 
 #ifdef DEBUG
 void
 AssertReturnTypeMatchesJitinfo(const JSJitInfo* aJitinfo,
                                JS::Handle<JS::Value> aValue);
 #endif
 
-// This function is called by the bindings layer for methods/getters/setters
-// that are not safe to be called in prerendering mode.  It checks to make sure
-// that the |this| object is not running in a global that is in prerendering
-// mode.  Otherwise, it aborts execution of timers and event handlers, and
-// returns false which gets converted to an uncatchable exception by the
-// bindings layer.
-bool
-EnforceNotInPrerendering(JSContext* aCx, JSObject* aObj);
-
-// Handles the violation of a blacklisted action in prerendering mode by
-// aborting the scripts, and preventing timers and event handlers from running
-// in the window in the future.
-void
-HandlePrerenderingViolation(nsPIDOMWindowInner* aWindow);
-
 bool
 CallerSubsumes(JSObject* aObject);
 
 MOZ_ALWAYS_INLINE bool
 CallerSubsumes(JS::Handle<JS::Value> aValue)
 {
   if (!aValue.isObject()) {
     return true;
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -1741,26 +1741,22 @@ addExternalIface('MozRDFResource', nativ
 addExternalIface('MozTreeView', nativeType='nsITreeView',
                   headerFile='nsITreeView.h', notflattened=True)
 addExternalIface('MozWakeLockListener', headerFile='nsIDOMWakeLockListener.h')
 addExternalIface('nsIBrowserDOMWindow', nativeType='nsIBrowserDOMWindow',
                  notflattened=True)
 addExternalIface('nsIDOMCrypto', nativeType='nsIDOMCrypto',
                  headerFile='Crypto.h')
 addExternalIface('nsIFile', nativeType='nsIFile', notflattened=True)
-addExternalIface('nsIGroupedSHistory', nativeType='nsIGroupedSHistory',
-                 notflattened=True)
 addExternalIface('nsILoadGroup', nativeType='nsILoadGroup',
                  headerFile='nsILoadGroup.h', notflattened=True)
 addExternalIface('nsIMessageBroadcaster', nativeType='nsIMessageBroadcaster',
                  headerFile='nsIMessageManager.h', notflattened=True)
 addExternalIface('nsIMessageSender', nativeType='nsIMessageSender',
                  headerFile='nsIMessageManager.h', notflattened=True)
-addExternalIface('nsIPartialSHistory', nativeType='nsIPartialSHistory',
-                 notflattened=True)
 addExternalIface('nsIPrintSettings', nativeType='nsIPrintSettings',
                  notflattened=True)
 addExternalIface('nsISelectionListener', nativeType='nsISelectionListener')
 addExternalIface('nsIStreamListener', nativeType='nsIStreamListener', notflattened=True)
 addExternalIface('nsITransportProvider', nativeType='nsITransportProvider')
 addExternalIface('nsITreeSelection', nativeType='nsITreeSelection',
                  notflattened=True)
 addExternalIface('nsISupports', nativeType='nsISupports')
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -7720,33 +7720,16 @@ class CGPerSignatureCall(CGThing):
         self.extendedAttributes = descriptor.getExtendedAttributes(idlNode,
                                                                    getter=getter,
                                                                    setter=setter)
         self.arguments = arguments
         self.argCount = len(arguments)
         self.isConstructor = isConstructor
         cgThings = []
 
-        # Here, we check if the current getter, setter, method, interface or
-        # inherited interfaces have the UnsafeInPrerendering extended attribute
-        # and if so, we add a check to make sure it is safe.
-        if (idlNode.getExtendedAttribute("UnsafeInPrerendering") or
-            descriptor.interface.getExtendedAttribute("UnsafeInPrerendering") or
-            any(i.getExtendedAttribute("UnsafeInPrerendering")
-                for i in descriptor.interface.getInheritedInterfaces())):
-                cgThings.append(CGGeneric(dedent(
-                    """
-                    if (!mozilla::dom::EnforceNotInPrerendering(cx, obj)) {
-                        // Return false from the JSNative in order to trigger
-                        // an uncatchable exception.
-                        MOZ_ASSERT(!JS_IsExceptionPending(cx));
-                        return false;
-                    }
-                    """)))
-
         deprecated = (idlNode.getExtendedAttribute("Deprecated") or
                       (idlNode.isStatic() and descriptor.interface.getExtendedAttribute("Deprecated")))
         if deprecated:
             cgThings.append(CGGeneric(dedent(
                 """
                 DeprecationWarning(cx, obj, nsIDocument::e%s);
                 """ % deprecated[0])))
 
--- a/dom/bindings/parser/WebIDL.py
+++ b/dom/bindings/parser/WebIDL.py
@@ -1719,17 +1719,16 @@ class IDLInterface(IDLInterfaceOrNamespa
                                           "an interface member and on the "
                                           "interface itself",
                                           [member.location, attr.location])
                     member.addExtendedAttributes([attr])
             elif (identifier == "NeedResolve" or
                   identifier == "OverrideBuiltins" or
                   identifier == "ChromeOnly" or
                   identifier == "Unforgeable" or
-                  identifier == "UnsafeInPrerendering" or
                   identifier == "LegacyEventInit" or
                   identifier == "ProbablyShortLivingWrapper" or
                   identifier == "LegacyUnenumerableNamedProperties" or
                   identifier == "NonOrdinaryGetPrototypeOf"):
                 # Known extended attributes that do not take values
                 if not attr.noArguments():
                     raise WebIDLError("[%s] must take no arguments" % identifier,
                                       [attr.location])
@@ -4346,17 +4345,16 @@ class IDLAttribute(IDLInterfaceMember):
               identifier == "SetterCanOOM" or
               identifier == "CanOOM" or
               identifier == "GetterCanOOM" or
               identifier == "ChromeOnly" or
               identifier == "Func" or
               identifier == "SecureContext" or
               identifier == "Frozen" or
               identifier == "NewObject" or
-              identifier == "UnsafeInPrerendering" or
               identifier == "NeedsSubjectPrincipal" or
               identifier == "SetterNeedsSubjectPrincipal" or
               identifier == "GetterNeedsSubjectPrincipal" or
               identifier == "NeedsCallerType" or
               identifier == "ReturnValueNeedsContainsHack" or
               identifier == "BinaryName" or
               identifier == "NonEnumerable"):
             # Known attributes that we don't need to do anything with here
@@ -5075,17 +5073,16 @@ class IDLMethod(IDLInterfaceMember, IDLS
             if self.isSpecial() and not self.isSetter() and not self.isDeleter():
                 raise WebIDLError("[CEReactions] is only allowed on operation, "
                                   "attribute, setter, and deleter",
                                   [attr.location, self.location])
         elif (identifier == "Throws" or
               identifier == "CanOOM" or
               identifier == "NewObject" or
               identifier == "ChromeOnly" or
-              identifier == "UnsafeInPrerendering" or
               identifier == "Pref" or
               identifier == "Deprecated" or
               identifier == "Func" or
               identifier == "SecureContext" or
               identifier == "BinaryName" or
               identifier == "NeedsSubjectPrincipal" or
               identifier == "NeedsCallerType" or
               identifier == "StaticClassOverride" or
--- a/dom/bindings/test/TestCodeGen.webidl
+++ b/dom/bindings/test/TestCodeGen.webidl
@@ -177,22 +177,16 @@ interface TestInterface {
   byte returnByteSideEffectFree();
   [Affects=Nothing, DependsOn=DOMState]
   byte returnDOMDependentByte();
   [Affects=Nothing, DependsOn=Nothing]
   byte returnConstantByte();
   [DependsOn=DeviceState, Affects=Nothing]
   byte returnDeviceStateDependentByte();
 
-  [UnsafeInPrerendering]
-  void unsafePrerenderMethod();
-  [UnsafeInPrerendering]
-  attribute long unsafePrerenderWritable;
-  [UnsafeInPrerendering]
-  readonly attribute long unsafePrerenderReadonly;
   readonly attribute short readonlyShort;
   attribute short writableShort;
   void passShort(short arg);
   short receiveShort();
   void passOptionalShort(optional short arg);
   void passOptionalShortWithDefault(optional short arg = 5);
 
   readonly attribute long readonlyLong;
--- a/dom/bindings/test/chrome.ini
+++ b/dom/bindings/test/chrome.ini
@@ -5,18 +5,11 @@ support-files =
   !/dom/bindings/test/file_dom_xrays.html
   !/dom/bindings/test/file_proxies_via_xray.html
 
 [test_bug775543.html]
 [test_document_location_set_via_xray.html]
 [test_dom_xrays.html]
 [test_proxies_via_xray.html]
 [test_document_location_via_xray_cached.html]
-[test_blacklisted_prerendering_function.xul]
-support-files =
-  file_focuser.html
-  file_fullScreenPropertyAccessor.html
-skip-if = e10s # prerendering doesn't work in e10s yet
-[test_kill_longrunning_prerendered_content.xul]
-skip-if = e10s # prerendering doesn't work in e10s yet
 [test_bug1123516_maplikesetlikechrome.xul]
 skip-if = debug == false
 [test_bug1287912.html]
deleted file mode 100644
--- a/dom/bindings/test/file_focuser.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML>
-<div id="stage"></div>
-<script>
-  function stage(str) {
-    var s = document.getElementById("stage");
-    s.textContent = str;
-  }
-  stage("before");
-  setTimeout(function() {
-    stage("in timeout");
-  });
-  setInterval(function() {
-    stage("in interval");
-  });
-  addEventListener("keydown", function() {
-    stage("keydown");
-  }, false);
-  try {
-    focus();
-    stage("after");
-  } catch(e) {
-    stage("exception raised");
-  }
-</script>
deleted file mode 100644
--- a/dom/bindings/test/file_fullScreenPropertyAccessor.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML>
-<div id="stage"></div>
-<script>
-  function stage(str) {
-    var s = document.getElementById("stage");
-    s.textContent = str;
-  }
-  stage("before");
-  setTimeout(function() {
-    stage("in timeout");
-  });
-  setInterval(function() {
-    stage("in interval");
-  });
-  addEventListener("keydown", function() {
-    stage("keydown");
-  }, false);
-  try {
-    window.fullScreen;
-    stage("after");
-  } catch(e) {
-    stage("exception raised");
-  }
-</script>
deleted file mode 100644
--- a/dom/bindings/test/test_blacklisted_prerendering_function.xul
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        xmlns:html="http://www.w3.org/1999/xhtml"
-        onload="runTest();">
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-  SimpleTest.waitForExplicitFinish();
-
-  function Listener(aBrowser, aPrerendered, aCallback) {
-    this.init(aBrowser, aPrerendered, aCallback);
-  }
-
-  Listener.prototype = {
-    init: function(aBrowser, aPrerendered, aCallback) {
-      this.mBrowser = aBrowser;
-      this.mPrerendered = aPrerendered;
-      this.mCallback = aCallback;
-    },
-    QueryInterface: function(aIID) {
-      if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
-          aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
-          aIID.equals(Components.interfaces.nsISupports))
-        return this;
-      throw Components.results.NS_NOINTERFACE;
-    },
-    onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus) {
-      if ((aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) &&
-          (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_IS_DOCUMENT)) {
-        var doc = this.mBrowser.contentDocument;
-        var stage = doc.getElementById("stage");
-        if (this.mPrerendered) {
-          is(stage.textContent, "before", "The blacklisted call should properly be intercepted in prerendering mode");
-        } else {
-          // In normal mode, we may or may not have run the timeout and/or the interval.
-          switch (stage.textContent) {
-          case "after":
-          case "in timeout":
-          case "in interval":
-            ok(true, "The blacklisted call should work fine in normal mode");
-            break;
-          default:
-            ok(false, "The blacklisted call should work fine in normal mode");
-            break;
-          }
-        }
-        progress.removeProgressListener(progressListener);
-
-        // Set three timeouts to see if the interval triggered
-        var self = this;
-        function checkInterval() {
-          var expected = self.mPrerendered ? "before" : "in interval";
-          var desc = self.mPrerendered ? "No timer should be running" : "Timers should run as normal";
-          is(stage.textContent, expected, desc);
-          // Now, dispatch a key event to the window and see if the keydown handler runs
-          synthesizeKey("a", {}, self.mBrowser.contentWindow);
-          expected = self.mPrerendered ? "before" : "keydown";
-          desc = self.mPrerendered ? "No event handler should be running" : "Event handlers should run as normal";
-          is(stage.textContent, expected, desc);
-          self.mCallback();
-        }
-        setTimeout(function() {
-          setTimeout(function() {
-            setTimeout(function() {
-              checkInterval();
-            }, 0);
-          }, 0);
-        }, 0);
-      }
-    },
-    onProgressChange : function(aWebProgress, aRequest,
-                                aCurSelfProgress, aMaxSelfProgress,
-                                aCurTotalProgress, aMaxTotalProgress) {},
-    onLocationChange : function(aWebProgress, aRequest, aLocation, aFlags) {},
-    onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage) {},
-    onSecurityChange : function(aWebProgress, aRequest, aState) {},
-    mBrowser: null,
-    mPrerendered: false,
-    mCallback: null
-  };
-
-  var progress, progressListener;
-
-  function runTest() {
-    testStep(false, "file_focuser.html", function() {
-      testStep(true, "file_focuser.html", function() {
-        testStep(false, "file_fullScreenPropertyAccessor.html", function() {
-          testStep(true, "file_fullScreenPropertyAccessor.html", function() {
-            SimpleTest.finish();
-          });
-        });
-      });
-    });
-  }
-
-  function testStep(aPrerendered, aFileName, aCallback) {
-    var browser = document.getElementById(aPrerendered ? "prerendered" : "normal");;
-    progressListener = new Listener(browser, aPrerendered, aCallback);
-    var docShell = browser.docShell;
-    progress = docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
-                       .getInterface(Components.interfaces.nsIWebProgress);
-    progress.addProgressListener(progressListener,
-                                 Components.interfaces.nsIWebProgress.NOTIFY_ALL);
-    browser.loadURI("chrome://mochitests/content/chrome/dom/bindings/test/" + aFileName);
-  }
-
-]]>
-</script>
-
-<body  id="html_body" xmlns="http://www.w3.org/1999/xhtml">
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1069719">Mozilla Bug 1069719</a>
-<p id="display"></p>
-
-<pre id="test">
-</pre>
-</body>
-<browser prerendered="true" id="prerendered"/>
-<browser id="normal"/>
-</window>
deleted file mode 100644
--- a/dom/bindings/test/test_kill_longrunning_prerendered_content.xul
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        xmlns:html="http://www.w3.org/1999/xhtml"
-        onload="runTest();">
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-  SimpleTest.waitForExplicitFinish();
-
-  function Listener(aBrowser, aPrerendered, aCallback) {
-    this.init(aBrowser, aPrerendered, aCallback);
-  }
-
-  Listener.prototype = {
-    init: function(aBrowser, aCallback) {
-      this.mBrowser = aBrowser;
-      this.mCallback = aCallback;
-    },
-    QueryInterface: function(aIID) {
-      if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
-          aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
-          aIID.equals(Components.interfaces.nsISupports))
-        return this;
-      throw Components.results.NS_NOINTERFACE;
-    },
-    onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus) {
-      if ((aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) &&
-          (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_IS_DOCUMENT)) {
-        setTimeout(this.mCallback, 0);
-      }
-    },
-    onProgressChange : function(aWebProgress, aRequest,
-                                aCurSelfProgress, aMaxSelfProgress,
-                                aCurTotalProgress, aMaxTotalProgress) {},
-    onLocationChange : function(aWebProgress, aRequest, aLocation, aFlags) {},