Merge m-c to inbound. a=merge
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 15 Jul 2015 13:26:44 -0400
changeset 253041 3b44ff681dfc522fb60ef96c2e6191c6ff5ecd36
parent 253040 4106e0aaeae557a3d575b7446f67cba0f0219960 (current diff)
parent 253022 49683d4e9ebd1db5de2aad70df5d43b034321488 (diff)
child 253042 b3ced16835c7ca58efd02cb39f53b5f7d169cc83
push id29055
push userkwierso@gmail.com
push dateWed, 15 Jul 2015 23:29:13 +0000
treeherdermozilla-central@91b2b3fd8c3d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge m-c to inbound. a=merge
browser/devtools/debugger/test/browser_dbg_hit-counts-01.js
browser/devtools/debugger/test/browser_dbg_hit-counts-02.js
browser/devtools/debugger/test/browser_dbg_tracing-01.js
browser/devtools/debugger/test/browser_dbg_tracing-02.js
browser/devtools/debugger/test/browser_dbg_tracing-03.js
browser/devtools/debugger/test/browser_dbg_tracing-04.js
browser/devtools/debugger/test/browser_dbg_tracing-05.js
browser/devtools/debugger/test/browser_dbg_tracing-06.js
browser/devtools/debugger/test/browser_dbg_tracing-07.js
browser/devtools/debugger/test/browser_dbg_tracing-08.js
browser/devtools/debugger/test/code_tracing-01.js
browser/devtools/debugger/test/doc_same-line-functions.html
browser/devtools/debugger/test/doc_tracing-01.html
browser/devtools/debugger/views/tracer-view.js
ipc/ril/RilSocket.cpp
ipc/ril/RilSocket.h
ipc/ril/RilSocketConsumer.cpp
ipc/ril/RilSocketConsumer.h
toolkit/devtools/server/actors/tracer.js
toolkit/devtools/server/tests/unit/test_sourcemaps-14.js
toolkit/devtools/server/tests/unit/test_sourcemaps-15.js
toolkit/devtools/server/tests/unit/test_trace_actor-01.js
toolkit/devtools/server/tests/unit/test_trace_actor-02.js
toolkit/devtools/server/tests/unit/test_trace_actor-03.js
toolkit/devtools/server/tests/unit/test_trace_actor-04.js
toolkit/devtools/server/tests/unit/test_trace_actor-05.js
toolkit/devtools/server/tests/unit/test_trace_actor-06.js
toolkit/devtools/server/tests/unit/test_trace_actor-07.js
toolkit/devtools/server/tests/unit/test_trace_actor-08.js
toolkit/devtools/server/tests/unit/test_trace_actor-09.js
toolkit/devtools/server/tests/unit/test_trace_actor-10.js
toolkit/devtools/server/tests/unit/test_trace_actor-11.js
toolkit/devtools/server/tests/unit/test_trace_actor-12.js
toolkit/devtools/server/tests/unit/test_trace_actor-13.js
--- a/b2g/config/aries/sources.xml
+++ b/b2g/config/aries/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="c6ef08964711f461a8e6326eae911789d1ec220c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b9968cdc4a1dee49848fed6159a59c378cea062d"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="cfa80d0c1c13a13a64b049173ea3a1d605f2cffd"/>
--- a/b2g/config/dolphin/sources.xml
+++ b/b2g/config/dolphin/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="c6ef08964711f461a8e6326eae911789d1ec220c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b9968cdc4a1dee49848fed6159a59c378cea062d"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="cfa80d0c1c13a13a64b049173ea3a1d605f2cffd"/>
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="173b3104bfcbd23fc9dccd4b0035fc49aae3d444">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="c6ef08964711f461a8e6326eae911789d1ec220c"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="b9968cdc4a1dee49848fed6159a59c378cea062d"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="87a2d8ab9248540910e56921654367b78a587095"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="9d0e5057ee5404a31ec1bf76131cb11336a7c3b6"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="4efd19d199ae52656604f794c5a77518400220fd">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="c6ef08964711f461a8e6326eae911789d1ec220c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b9968cdc4a1dee49848fed6159a59c378cea062d"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="cfa80d0c1c13a13a64b049173ea3a1d605f2cffd"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="c6ef08964711f461a8e6326eae911789d1ec220c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b9968cdc4a1dee49848fed6159a59c378cea062d"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="cfa80d0c1c13a13a64b049173ea3a1d605f2cffd"/>
--- a/b2g/config/emulator-l/sources.xml
+++ b/b2g/config/emulator-l/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="c6ef08964711f461a8e6326eae911789d1ec220c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b9968cdc4a1dee49848fed6159a59c378cea062d"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="cfa80d0c1c13a13a64b049173ea3a1d605f2cffd"/>
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="173b3104bfcbd23fc9dccd4b0035fc49aae3d444">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="c6ef08964711f461a8e6326eae911789d1ec220c"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="b9968cdc4a1dee49848fed6159a59c378cea062d"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="87a2d8ab9248540910e56921654367b78a587095"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="9d0e5057ee5404a31ec1bf76131cb11336a7c3b6"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/flame-kk/sources.xml
+++ b/b2g/config/flame-kk/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="c6ef08964711f461a8e6326eae911789d1ec220c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b9968cdc4a1dee49848fed6159a59c378cea062d"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="cfa80d0c1c13a13a64b049173ea3a1d605f2cffd"/>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
 {
     "git": {
-        "git_revision": "c6ef08964711f461a8e6326eae911789d1ec220c", 
+        "git_revision": "b9968cdc4a1dee49848fed6159a59c378cea062d", 
         "remote": "https://git.mozilla.org/releases/gaia.git", 
         "branch": ""
     }, 
-    "revision": "422a64c4639a399fda83fb6ba9af46254a659421", 
+    "revision": "275f9f64b346b08c91bbe10bfc786827a5bd0531", 
     "repo_path": "integration/gaia-central"
 }
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="4efd19d199ae52656604f794c5a77518400220fd">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="c6ef08964711f461a8e6326eae911789d1ec220c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b9968cdc4a1dee49848fed6159a59c378cea062d"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="cfa80d0c1c13a13a64b049173ea3a1d605f2cffd"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/nexus-5-l/sources.xml
+++ b/b2g/config/nexus-5-l/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="c6ef08964711f461a8e6326eae911789d1ec220c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b9968cdc4a1dee49848fed6159a59c378cea062d"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="cfa80d0c1c13a13a64b049173ea3a1d605f2cffd"/>
--- a/browser/devtools/debugger/debugger-controller.js
+++ b/browser/devtools/debugger/debugger-controller.js
@@ -180,17 +180,16 @@ let DebuggerController = {
 
     yield DebuggerView.destroy();
     this.SourceScripts.disconnect();
     this.StackFrames.disconnect();
     this.ThreadState.disconnect();
     if (this._target.isTabActor) {
       this.Workers.disconnect();
     }
-    this.Tracer.disconnect();
     this.disconnect();
 
     this._shutdown = true;
   }),
 
   /**
    * Initiates remote debugging based on the current target, wiring event
    * handlers as necessary.
@@ -199,34 +198,30 @@ let DebuggerController = {
    *         A promise that is resolved when the debugger finishes connecting.
    */
   connect: Task.async(function*() {
     if (this._connected) {
       return;
     }
 
     let target = this._target;
-    let { client, form: { chromeDebugger, traceActor, actor } } = target;
+    let { client, form: { chromeDebugger, actor } } = target;
     target.on("close", this._onTabDetached);
     target.on("navigate", this._onTabNavigated);
     target.on("will-navigate", this._onTabNavigated);
     this.client = client;
 
     if (target.isAddon) {
       yield this._startAddonDebugging(actor);
     } else if (!target.isTabActor) {
       // Some actors like AddonActor or RootActor for chrome debugging
       // do not support attach/detach and can be used directly
       yield this._startChromeDebugging(chromeDebugger);
     } else {
       yield this._startDebuggingTab();
-
-      if (Prefs.tracerEnabled && traceActor) {
-        yield this._startTracingTab(traceActor);
-      }
     }
 
     this._hideUnsupportedFeatures();
   }),
 
   /**
    * Disconnects the debugger client and removes event handlers as necessary.
    */
@@ -386,41 +381,16 @@ let DebuggerController = {
 
       deferred.resolve();
     }, threadOptions);
 
     return deferred.promise;
   },
 
   /**
-   * Sets up an execution tracing session.
-   *
-   * @param object aTraceActor
-   *        The remote protocol grip of the trace actor.
-   * @return object
-   *         A promise resolved once the client attaches to the tracer.
-   */
-  _startTracingTab: function(aTraceActor) {
-    let deferred = promise.defer();
-
-    this.client.attachTracer(aTraceActor, (response, traceClient) => {
-      if (!traceClient) {
-        deferred.reject(new Error("Failed to attach to tracing actor."));
-        return;
-      }
-      this.traceClient = traceClient;
-      this.Tracer.connect();
-
-      deferred.resolve();
-    });
-
-    return deferred.promise;
-  },
-
-  /**
    * Detach and reattach to the thread actor with useSourceMaps true, blow
    * away old sources and get them again.
    */
   reconfigureThread: function({ useSourceMaps, autoBlackBox }) {
     this.activeThread.reconfigure({
       useSourceMaps: useSourceMaps,
       autoBlackBox: autoBlackBox
     }, aResponse => {
@@ -1296,17 +1266,16 @@ SourceScripts.prototype = {
         }
       });
     }
 
     // If there are any stored breakpoints for this source, display them again,
     // both in the editor and the breakpoints pane.
     DebuggerController.Breakpoints.updatePaneBreakpoints();
     DebuggerController.Breakpoints.updateEditorBreakpoints();
-    DebuggerController.HitCounts.updateEditorHitCounts();
 
     // Make sure the events listeners are up to date.
     if (DebuggerView.instrumentsPaneTab == "events-tab") {
       DebuggerController.Breakpoints.DOM.scheduleEventListenersFetch();
     }
 
     // Signal that a new source has been added.
     window.emit(EVENTS.NEW_SOURCE);
@@ -1349,17 +1318,16 @@ SourceScripts.prototype = {
     else if (!DebuggerView.Sources.selectedValue) {
       DebuggerView.Sources.selectedIndex = 0;
     }
 
     // If there are any stored breakpoints for the sources, display them again,
     // both in the editor and the breakpoints pane.
     DebuggerController.Breakpoints.updatePaneBreakpoints();
     DebuggerController.Breakpoints.updateEditorBreakpoints();
-    DebuggerController.HitCounts.updateEditorHitCounts();
 
     // Signal that sources have been added.
     window.emit(EVENTS.SOURCES_ADDED);
   },
 
   /**
    * Handler for the debugger client's 'blackboxchange' notification.
    */
@@ -1562,247 +1530,16 @@ SourceScripts.prototype = {
       }
     }
 
     return deferred.promise;
   }
 };
 
 /**
- * Tracer update the UI according to the messages exchanged with the tracer
- * actor.
- */
-function Tracer() {
-  this._trace = null;
-  this._idCounter = 0;
-  this.onTraces = this.onTraces.bind(this);
-}
-
-Tracer.prototype = {
-  get client() {
-    return DebuggerController.client;
-  },
-
-  get traceClient() {
-    return DebuggerController.traceClient;
-  },
-
-  get tracing() {
-    return !!this._trace;
-  },
-
-  /**
-   * Hooks up the debugger controller with the tracer client.
-   */
-  connect: function() {
-    this._stack = [];
-    this.client.addListener("traces", this.onTraces);
-  },
-
-  /**
-   * Disconnects the debugger controller from the tracer client. Any further
-   * communcation with the tracer actor will not have any effect on the UI.
-   */
-  disconnect: function() {
-    this._stack = null;
-    this.client.removeListener("traces", this.onTraces);
-  },
-
-  /**
-   * Instructs the tracer actor to start tracing.
-   */
-  startTracing: function(aCallback = () => {}) {
-    if (this.tracing) {
-      return;
-    }
-
-    DebuggerView.Tracer.selectTab();
-
-    let id = this._trace = "dbg.trace" + Math.random();
-    let fields = [
-      "name",
-      "location",
-      "hitCount",
-      "parameterNames",
-      "depth",
-      "arguments",
-      "return",
-      "throw",
-      "yield"
-    ];
-
-    this.traceClient.startTrace(fields, id, aResponse => {
-      const { error } = aResponse;
-      if (error) {
-        DevToolsUtils.reportException("Tracer.prototype.startTracing", error);
-        this._trace = null;
-      }
-
-      aCallback(aResponse);
-    });
-  },
-
-  /**
-   * Instructs the tracer actor to stop tracing.
-   */
-  stopTracing: function(aCallback = () => {}) {
-    if (!this.tracing) {
-      return;
-    }
-    this.traceClient.stopTrace(this._trace, aResponse => {
-      const { error } = aResponse;
-      if (error) {
-        DevToolsUtils.reportException("Tracer.prototype.stopTracing", error);
-      }
-
-      this._trace = null;
-      DebuggerController.HitCounts.clear();
-      aCallback(aResponse);
-    });
-  },
-
-  onTraces: function (aEvent, { traces }) {
-    const tracesLength = traces.length;
-    let tracesToShow;
-
-    // Update hit counts.
-    for (let t of traces) {
-      if (t.type == "enteredFrame") {
-        DebuggerController.HitCounts.set(t.location, t.hitCount);
-      }
-    }
-    DebuggerController.HitCounts.updateEditorHitCounts();
-
-    // Limit number of traces to be shown in the log.
-    if (tracesLength > TracerView.MAX_TRACES) {
-      tracesToShow = traces.slice(tracesLength - TracerView.MAX_TRACES, tracesLength);
-      this._stack.splice(0, this._stack.length);
-      DebuggerView.Tracer.empty();
-    } else {
-      tracesToShow = traces;
-    }
-
-    // Show traces in the log.
-    for (let t of tracesToShow) {
-      if (t.type == "enteredFrame") {
-        this._onCall(t);
-      } else {
-        this._onReturn(t);
-      }
-    }
-    DebuggerView.Tracer.commit();
-  },
-
-  /**
-   * Callback for handling a new call frame.
-   */
-  _onCall: function({ name, location, blackBoxed, parameterNames, depth, arguments: args }) {
-    const item = {
-      name: name,
-      location: location,
-      id: this._idCounter++,
-      blackBoxed
-    };
-
-    this._stack.push(item);
-    DebuggerView.Tracer.addTrace({
-      type: "call",
-      name: name,
-      location: location,
-      depth: depth,
-      parameterNames: parameterNames,
-      arguments: args,
-      frameId: item.id,
-      blackBoxed
-    });
-  },
-
-  /**
-   * Callback for handling an exited frame.
-   */
-  _onReturn: function(aPacket) {
-    if (!this._stack.length) {
-      return;
-    }
-
-    const { name, id, location, blackBoxed } = this._stack.pop();
-    DebuggerView.Tracer.addTrace({
-      type: aPacket.why,
-      name: name,
-      location: location,
-      depth: aPacket.depth,
-      frameId: id,
-      returnVal: aPacket.return || aPacket.throw || aPacket.yield,
-      blackBoxed
-    });
-  },
-
-  /**
-   * Create an object which has the same interface as a normal object client,
-   * but since we already have all the information for an object that we will
-   * ever get (the server doesn't create actors when tracing, just firehoses
-   * data and forgets about it) just return the data immdiately.
-   *
-   * @param Object aObject
-   *        The tracer object "grip" (more like a limited snapshot).
-   * @returns Object
-   *          The synchronous client object.
-   */
-  syncGripClient: function(aObject) {
-    return {
-      get isFrozen() { return aObject.frozen; },
-      get isSealed() { return aObject.sealed; },
-      get isExtensible() { return aObject.extensible; },
-
-      get ownProperties() { return aObject.ownProperties; },
-      get prototype() { return null; },
-
-      getParameterNames: callback => callback(aObject),
-      getPrototypeAndProperties: callback => callback(aObject),
-      getPrototype: callback => callback(aObject),
-
-      getOwnPropertyNames: (callback) => {
-        callback({
-          ownPropertyNames: aObject.ownProperties
-            ? Object.keys(aObject.ownProperties)
-            : []
-        });
-      },
-
-      getProperty: (property, callback) => {
-        callback({
-          descriptor: aObject.ownProperties
-            ? aObject.ownProperties[property]
-            : null
-        });
-      },
-
-      getDisplayString: callback => callback("[object " + aObject.class + "]"),
-
-      getScope: callback => callback({
-        error: "scopeNotAvailable",
-        message: "Cannot get scopes for traced objects"
-      })
-    };
-  },
-
-  /**
-   * Wraps object snapshots received from the tracer server so that we can
-   * differentiate them from long living object grips from the debugger server
-   * in the variables view.
-   *
-   * @param Object aObject
-   *        The object snapshot from the tracer actor.
-   */
-  WrappedObject: function(aObject) {
-    this.object = aObject;
-  }
-};
-
-/**
  * Handles breaking on event listeners in the currently debugged target.
  */
 function EventListeners() {
 }
 
 EventListeners.prototype = {
   /**
    * A list of event names on which the debuggee will automatically pause
@@ -2162,20 +1899,20 @@ Breakpoints.prototype = {
         if (condition) {
           aBreakpointClient = yield aBreakpointClient.setCondition(
             gThreadClient,
             condition
           );
         }
       }
 
-      // Preserve information about the breakpoint's line text, to display it
-      // in the sources pane without requiring fetching the source (for example,
-      // after the target navigated). Note that this will get out of sync
-      // if the source text contents change.
+      // Preserve information about the breakpoint's line text, to display it in
+      // the sources pane without requiring fetching the source (for example,
+      // after the target navigated). Note that this will get out of sync if the
+      // source text contents change.
       let line = aBreakpointClient.location.line - 1;
       aBreakpointClient.text = DebuggerView.editor.getText(line).trim();
 
       // Show the breakpoint in the breakpoints pane, and resolve.
       yield this._showBreakpoint(aBreakpointClient, aOptions);
 
       // Notify that we've added a breakpoint.
       window.emit(EVENTS.BREAKPOINT_ADDED, aBreakpointClient);
@@ -2423,97 +2160,16 @@ Breakpoints.prototype = {
 Object.defineProperty(Breakpoints.prototype, "_addedOrDisabled", {
   get: function* () {
     yield* this._added.values();
     yield* this._disabled.values();
   }
 });
 
 /**
- * Handles Tracer's hit counts.
- */
-function HitCounts() {
-  /**
-   * Storage of hit counts for every location
-   * hitCount = _locations[url][line][column]
-   */
-  this._hitCounts = Object.create(null);
-}
-
-HitCounts.prototype = {
-  set: function({url, line, column}, aHitCount) {
-    if (url) {
-      if (!this._hitCounts[url]) {
-        this._hitCounts[url] = Object.create(null);
-      }
-      if (!this._hitCounts[url][line]) {
-        this._hitCounts[url][line] = Object.create(null);
-      }
-      this._hitCounts[url][line][column] = aHitCount;
-    }
-  },
-
-  /**
-   * Update all the hit counts in the editor view. This is invoked when the
-   * selected script is changed, or when new sources are received via the
-   * _onNewSource and _onSourcesAdded event listeners.
-   */
-  updateEditorHitCounts: function() {
-    // First, remove all hit counters.
-    DebuggerView.editor.removeAllMarkers("hit-counts");
-
-    // Then, add new hit counts, just for the current source.
-    for (let url in this._hitCounts) {
-      for (let line in this._hitCounts[url]) {
-        for (let column in this._hitCounts[url][line]) {
-          this._updateEditorHitCount({url, line, column});
-        }
-      }
-    }
-  },
-
-  /**
-   * Update a hit counter on a certain line.
-   */
-  _updateEditorHitCount: function({url, line, column}) {
-    // Editor must be initialized.
-    if (!DebuggerView.editor) {
-      return;
-    }
-
-    // No need to do anything if the counter's source is not being shown in the
-    // editor.
-    if (url &&
-        DebuggerView.Sources.selectedItem.attachment.source.url != url) {
-      return;
-    }
-
-    // There might be more counters on the same line. We need to combine them
-    // into one.
-    let content = Object.keys(this._hitCounts[url][line])
-                    .sort() // Sort by key (column).
-                    .map(a => this._hitCounts[url][line][a]) // Extract values.
-                    .map(a => a + "\u00D7") // Format hit count (e.g. 146×).
-                    .join("|");
-
-    // CodeMirror's lines are indexed from 0, while traces start from 1
-    DebuggerView.editor.addContentMarker(line - 1, "hit-counts", "hit-count",
-                                         content);
-  },
-
-  /**
-   * Remove all hit couters and clear the storage
-   */
-  clear: function() {
-    DebuggerView.editor.removeAllMarkers("hit-counts");
-    this._hitCounts = Object.create(null);
-  }
-}
-
-/**
  * Localization convenience methods.
  */
 let L10N = new ViewHelpers.L10N(DBG_STRINGS_URI);
 
 /**
  * Shortcuts for accessing various debugger preferences.
  */
 let Prefs = new ViewHelpers.Prefs("devtools", {
@@ -2523,17 +2179,16 @@ let Prefs = new ViewHelpers.Prefs("devto
   variablesSortingEnabled: ["Bool", "debugger.ui.variables-sorting-enabled"],
   variablesOnlyEnumVisible: ["Bool", "debugger.ui.variables-only-enum-visible"],
   variablesSearchboxVisible: ["Bool", "debugger.ui.variables-searchbox-visible"],
   pauseOnExceptions: ["Bool", "debugger.pause-on-exceptions"],
   ignoreCaughtExceptions: ["Bool", "debugger.ignore-caught-exceptions"],
   sourceMapsEnabled: ["Bool", "debugger.source-maps-enabled"],
   prettyPrintEnabled: ["Bool", "debugger.pretty-print-enabled"],
   autoPrettyPrint: ["Bool", "debugger.auto-pretty-print"],
-  tracerEnabled: ["Bool", "debugger.tracer"],
   workersEnabled: ["Bool", "debugger.workers"],
   editorTabSize: ["Int", "editor.tabsize"],
   autoBlackBox: ["Bool", "debugger.auto-black-box"]
 });
 
 /**
  * Convenient way of emitting events from the panel window.
  */
@@ -2545,18 +2200,16 @@ EventEmitter.decorate(this);
 DebuggerController.initialize();
 DebuggerController.Parser = new Parser();
 DebuggerController.Workers = new Workers();
 DebuggerController.ThreadState = new ThreadState();
 DebuggerController.StackFrames = new StackFrames();
 DebuggerController.SourceScripts = new SourceScripts();
 DebuggerController.Breakpoints = new Breakpoints();
 DebuggerController.Breakpoints.DOM = new EventListeners();
-DebuggerController.Tracer = new Tracer();
-DebuggerController.HitCounts = new HitCounts();
 
 /**
  * Export some properties to the global scope for easier access.
  */
 Object.defineProperties(window, {
   "gTarget": {
     get: function() {
       return DebuggerController._target;
--- a/browser/devtools/debugger/debugger-view.js
+++ b/browser/devtools/debugger/debugger-view.js
@@ -53,17 +53,16 @@ let DebuggerView = {
     this.Toolbar.initialize();
     this.Options.initialize();
     this.Filtering.initialize();
     this.StackFrames.initialize();
     this.StackFramesClassicList.initialize();
     this.Workers.initialize();
     this.Sources.initialize();
     this.VariableBubble.initialize();
-    this.Tracer.initialize();
     this.WatchExpressions.initialize();
     this.EventListeners.initialize();
     this.GlobalSearch.initialize();
     this._initializeVariablesView();
     this._initializeEditor(deferred.resolve);
 
     document.title = L10N.getStr("DebuggerWindowTitle");
 
@@ -86,17 +85,16 @@ let DebuggerView = {
 
     this.Toolbar.destroy();
     this.Options.destroy();
     this.Filtering.destroy();
     this.StackFrames.destroy();
     this.StackFramesClassicList.destroy();
     this.Sources.destroy();
     this.VariableBubble.destroy();
-    this.Tracer.destroy();
     this.WatchExpressions.destroy();
     this.EventListeners.destroy();
     this.GlobalSearch.destroy();
     this._destroyPanes();
     this._destroyEditor(deferred.resolve);
 
     return deferred.promise;
   },
@@ -169,19 +167,17 @@ let DebuggerView = {
     // Attach the current toolbox to the VView so it can link DOMNodes to
     // the inspector/highlighter
     this.Variables.toolbox = DebuggerController._toolbox;
 
     // Attach a controller that handles interfacing with the debugger protocol.
     VariablesViewController.attach(this.Variables, {
       getEnvironmentClient: aObject => gThreadClient.environment(aObject),
       getObjectClient: aObject => {
-        return aObject instanceof DebuggerController.Tracer.WrappedObject
-          ? DebuggerController.Tracer.syncGripClient(aObject.object)
-          : gThreadClient.pauseGrip(aObject)
+        return gThreadClient.pauseGrip(aObject)
       }
     });
 
     // Relay events from the VariablesView.
     this.Variables.on("fetched", (aEvent, aType) => {
       switch (aType) {
         case "scopes":
           window.emit(EVENTS.FETCHED_SCOPES);
@@ -214,19 +210,16 @@ let DebuggerView = {
 
     function bindKey(func, key, modifiers = {}) {
       key = document.getElementById(key).getAttribute("key");
       let shortcut = Editor.accel(key, modifiers);
       extraKeys[shortcut] = () => DebuggerView.Filtering[func]();
     }
 
     let gutters = ["breakpoints"];
-    if (Services.prefs.getBoolPref("devtools.debugger.tracer")) {
-      gutters.unshift("hit-counts");
-    }
 
     this.editor = new Editor({
       mode: Editor.modes.text,
       readOnly: true,
       lineNumbers: true,
       showAnnotationRuler: true,
       gutters: gutters,
       extraKeys: extraKeys,
@@ -409,17 +402,16 @@ let DebuggerView = {
 
       this._setEditorText(aText);
       this._setEditorMode(aSource.url, aContentType, aText);
 
       // Synchronize any other components with the currently displayed
       // source.
       DebuggerView.Sources.selectedValue = aSource.actor;
       DebuggerController.Breakpoints.updateEditorBreakpoints();
-      DebuggerController.HitCounts.updateEditorHitCounts();
 
       histogram.add(Date.now() - startTime);
 
       // Resolve and notify that a source file was shown.
       window.emit(EVENTS.SOURCE_SHOWN, aSource);
       deferred.resolve([aSource, aText, aContentType]);
     },
     ([, aError]) => {
@@ -668,17 +660,16 @@ let DebuggerView = {
   _startup: null,
   _shutdown: null,
   Toolbar: null,
   Options: null,
   Filtering: null,
   GlobalSearch: null,
   StackFrames: null,
   Sources: null,
-  Tracer: null,
   Variables: null,
   VariableBubble: null,
   WatchExpressions: null,
   EventListeners: null,
   editor: null,
   _editorSource: {},
   _loadingText: "",
   _body: null,
--- a/browser/devtools/debugger/debugger.xul
+++ b/browser/devtools/debugger/debugger.xul
@@ -26,17 +26,16 @@
           src="chrome://browser/content/devtools/theme-switching.js"/>
   <script type="text/javascript" src="chrome://global/content/globalOverlay.js"/>
   <script type="text/javascript" src="debugger-controller.js"/>
   <script type="text/javascript" src="debugger-view.js"/>
   <script type="text/javascript" src="debugger/utils.js"/>
   <script type="text/javascript" src="debugger/workers-view.js"/>
   <script type="text/javascript" src="debugger/sources-view.js"/>
   <script type="text/javascript" src="debugger/variable-bubble-view.js"/>
-  <script type="text/javascript" src="debugger/tracer-view.js"/>
   <script type="text/javascript" src="debugger/watch-expressions-view.js"/>
   <script type="text/javascript" src="debugger/event-listeners-view.js"/>
   <script type="text/javascript" src="debugger/global-search-view.js"/>
   <script type="text/javascript" src="debugger/toolbar-view.js"/>
   <script type="text/javascript" src="debugger/options-view.js"/>
   <script type="text/javascript" src="debugger/stack-frames-view.js"/>
   <script type="text/javascript" src="debugger/stack-frames-classic-view.js"/>
   <script type="text/javascript" src="debugger/filter-view.js"/>
@@ -275,23 +274,16 @@
                        tabindex="0"/>
         <toolbarbutton id="step-in"
                        class="devtools-toolbarbutton"
                        tabindex="0"/>
         <toolbarbutton id="step-out"
                        class="devtools-toolbarbutton"
                        tabindex="0"/>
       </hbox>
-      <hbox>
-        <toolbarbutton id="trace"
-                       class="devtools-toolbarbutton"
-                       command="toggleTracing"
-                       tabindex="0"
-                       hidden="true"/>
-      </hbox>
       <vbox id="stackframes" flex="1"/>
       <textbox id="searchbox"
                class="devtools-searchinput" type="search"/>
       <toolbarbutton id="instruments-pane-toggle"
                      class="devtools-toolbarbutton"
                      tooltiptext="&debuggerUI.panesButton.tooltip;"
                      tabindex="0"/>
       <toolbarbutton id="debugger-options"
@@ -319,17 +311,16 @@
         </tabbox>
         <splitter class="devtools-horizontal-splitter"/>
         <tabbox id="sources-pane"
                 class="devtools-sidebar-tabs"
                 flex="1">
           <tabs>
             <tab id="sources-tab" label="&debuggerUI.tabs.sources;"/>
             <tab id="callstack-tab" label="&debuggerUI.tabs.callstack;"/>
-            <tab id="tracer-tab" label="&debuggerUI.tabs.traces;" hidden="true"/>
           </tabs>
           <tabpanels flex="1">
             <tabpanel id="sources-tabpanel">
               <vbox id="sources" flex="1"/>
               <toolbar id="sources-toolbar" class="devtools-toolbar">
                 <hbox id="sources-controls"
                       class="devtools-toolbarbutton-group">
                   <toolbarbutton id="black-box"
@@ -350,36 +341,16 @@
                 <toolbarbutton id="toggle-pause-exceptions"
                                class="devtools-toolbarbutton"
                                command="togglePauseOnExceptionsCommand"/>
               </toolbar>
             </tabpanel>
             <tabpanel id="callstack-tabpanel">
               <vbox id="callstack-list" flex="1"/>
             </tabpanel>
-            <tabpanel id="tracer-tabpanel">
-              <vbox id="tracer-traces" flex="1"/>
-              <hbox class="trace-item-template" hidden="true">
-                <hbox class="trace-item" align="center" flex="1" crop="end">
-                  <label class="trace-type plain"/>
-                  <label class="trace-name plain" crop="end"/>
-                </hbox>
-              </hbox>
-              <toolbar id="tracer-toolbar" class="devtools-toolbar">
-                <toolbarbutton id="clear-tracer"
-                               label="&debuggerUI.clearButton;"
-                               tooltiptext="&debuggerUI.clearButton.tooltip;"
-                               command="clearTraces"
-                               class="devtools-toolbarbutton"/>
-                <textbox id="tracer-search"
-                         class="devtools-searchinput"
-                         flex="1"
-                         type="search"/>
-              </toolbar>
-            </tabpanel>
           </tabpanels>
         </tabbox>
       </vbox>
       <splitter id="sources-and-editor-splitter"
                 class="devtools-side-splitter"/>
       <deck id="editor-deck" flex="1" class="devtools-main-content">
         <vbox id="editor"/>
         <vbox id="black-boxed-message"
--- a/browser/devtools/debugger/test/browser.ini
+++ b/browser/devtools/debugger/test/browser.ini
@@ -28,17 +28,16 @@ support-files =
   code_math.map
   code_math.min.js
   code_math_bogus_map.js
   code_same-line-functions.js
   code_script-eval.js
   code_script-switching-01.js
   code_script-switching-02.js
   code_test-editor-mode
-  code_tracing-01.js
   code_ugly.js
   code_ugly-2.js
   code_ugly-3.js
   code_ugly-4.js
   code_ugly-5.js
   code_ugly-6.js
   code_ugly-7.js
   code_ugly-8
@@ -86,29 +85,27 @@ support-files =
   doc_pretty-print.html
   doc_pretty-print-2.html
   doc_pretty-print-3.html
   doc_pretty-print-on-paused.html
   doc_promise-get-allocation-stack.html
   doc_promise.html
   doc_random-javascript.html
   doc_recursion-stack.html
-  doc_same-line-functions.html
   doc_scope-variable.html
   doc_scope-variable-2.html
   doc_scope-variable-3.html
   doc_scope-variable-4.html
   doc_script-eval.html
   doc_script-bookmarklet.html
   doc_script-switching-01.html
   doc_script-switching-02.html
   doc_split-console-paused-reload.html
   doc_step-out.html
   doc_terminate-on-tab-close.html
-  doc_tracing-01.html
   doc_watch-expressions.html
   doc_watch-expression-button.html
   doc_with-frame.html
   doc_WorkerActor.attach-tab1.html
   doc_WorkerActor.attach-tab2.html
   doc_WorkerActor.attachThread-tab.html
   head.js
   sjs_random-javascript.sjs
@@ -242,20 +239,16 @@ skip-if = e10s && debug
 [browser_dbg_function-display-name.js]
 skip-if = e10s && debug
 [browser_dbg_global-method-override.js]
 skip-if = e10s && debug
 [browser_dbg_globalactor.js]
 skip-if = e10s # TODO
 [browser_dbg_hide-toolbar-buttons.js]
 skip-if = e10s
-[browser_dbg_hit-counts-01.js]
-skip-if = e10s && debug
-[browser_dbg_hit-counts-02.js]
-skip-if = e10s && debug
 [browser_dbg_host-layout.js]
 skip-if = e10s && debug
 [browser_dbg_iframes.js]
 skip-if = e10s # TODO
 [browser_dbg_instruments-pane-collapse.js]
 skip-if = e10s && debug
 [browser_dbg_interrupts.js]
 skip-if = e10s && debug
@@ -348,17 +341,17 @@ skip-if = e10s && debug
 skip-if = e10s && debug
 [browser_dbg_pretty-print-on-paused.js]
 skip-if = e10s && debug
 [browser_dbg_progress-listener-bug.js]
 skip-if = e10s && debug
 [browser_dbg_promises-allocation-stack.js]
 skip-if = e10s && debug
 [browser_dbg_promises-chrome-allocation-stack.js]
-skip-if = (e10s && debug) || os == "linux" # Bug 1177730
+skip-if = (e10s && debug) || os == "linux" || os == "win" # Bug 1177730
 [browser_dbg_reload-preferred-script-01.js]
 skip-if = e10s && debug
 [browser_dbg_reload-preferred-script-02.js]
 skip-if = e10s && debug
 [browser_dbg_reload-preferred-script-03.js]
 skip-if = e10s && debug
 [browser_dbg_reload-same-script.js]
 skip-if = e10s && debug
@@ -448,32 +441,16 @@ skip-if = e10s && debug
 [browser_dbg_step-out.js]
 skip-if = e10s && debug
 [browser_dbg_tabactor-01.js]
 skip-if = e10s # TODO
 [browser_dbg_tabactor-02.js]
 skip-if = e10s # TODO
 [browser_dbg_terminate-on-tab-close.js]
 skip-if = e10s && debug
-[browser_dbg_tracing-01.js]
-skip-if = e10s && debug
-[browser_dbg_tracing-02.js]
-skip-if = e10s && debug
-[browser_dbg_tracing-03.js]
-skip-if = e10s && debug
-[browser_dbg_tracing-04.js]
-skip-if = e10s && debug
-[browser_dbg_tracing-05.js]
-skip-if = e10s && debug
-[browser_dbg_tracing-06.js]
-skip-if = e10s && debug
-[browser_dbg_tracing-07.js]
-skip-if = e10s && debug
-[browser_dbg_tracing-08.js]
-skip-if = e10s && debug
 [browser_dbg_variables-view-01.js]
 skip-if = e10s && debug
 [browser_dbg_variables-view-02.js]
 skip-if = e10s && debug
 [browser_dbg_variables-view-03.js]
 skip-if = e10s && debug
 [browser_dbg_variables-view-04.js]
 skip-if = e10s && debug
deleted file mode 100644
--- a/browser/devtools/debugger/test/browser_dbg_hit-counts-01.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Evaluating two functions on the same line and checking for correct hit count
- * for both of them in CodeMirror's gutter.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_same-line-functions.html";
-const CODE_URL = "code_same-line-functions.js";
-
-let gTab, gPanel, gDebugger;
-let gEditor;
-
-function test() {
-  Task.async(function* () {
-    yield pushPrefs(["devtools.debugger.tracer", true]);
-
-    initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
-      gTab = aTab;
-      gPanel = aPanel;
-      gDebugger = gPanel.panelWin;
-      gEditor = gDebugger.DebuggerView.editor;
-
-      Task.async(function* () {
-        yield waitForSourceShown(gPanel, CODE_URL);
-        yield startTracing(gPanel);
-
-        clickButton();
-
-        yield waitForClientEvents(aPanel, "traces");
-
-        testHitCounts();
-
-        yield stopTracing(gPanel);
-        yield popPrefs();
-        yield closeDebuggerAndFinish(gPanel);
-      })();
-    });
-  })().catch(e => {
-    ok(false, "Got an error: " + e.message + "\n" + e.stack);
-  });
-}
-
-function clickButton() {
-  generateMouseClickInTab(gTab, "content.document.querySelector('button')");
-}
-
-function testHitCounts() {
-  let marker = gEditor.getMarker(0, 'hit-counts');
-
-  is(marker.innerHTML, "1\u00D7|1\u00D7",
-    "Both functions should be hit only once.");
-}
-
-registerCleanupFunction(function() {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-});
deleted file mode 100644
--- a/browser/devtools/debugger/test/browser_dbg_hit-counts-02.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * When tracing is stopped all hit counters should be cleared.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_same-line-functions.html";
-const CODE_URL = "code_same-line-functions.js";
-
-let gTab, gPanel, gDebugger;
-let gEditor;
-
-function test() {
-  Task.async(function* () {
-    yield pushPrefs(["devtools.debugger.tracer", true]);
-
-    initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
-      gTab = aTab;
-      gPanel = aPanel;
-      gDebugger = gPanel.panelWin;
-      gEditor = gDebugger.DebuggerView.editor;
-
-      Task.async(function* () {
-        yield waitForSourceShown(gPanel, CODE_URL);
-        yield startTracing(gPanel);
-
-        clickButton();
-
-        yield waitForClientEvents(aPanel, "traces");
-
-        testHitCountsBeforeStopping();
-
-        yield stopTracing(gPanel);
-
-        testHitCountsAfterStopping();
-
-        yield popPrefs();
-        yield closeDebuggerAndFinish(gPanel);
-      })();
-    });
-  })().catch(e => {
-    ok(false, "Got an error: " + e.message + "\n" + e.stack);
-  });
-}
-
-function clickButton() {
-  generateMouseClickInTab(gTab, "content.document.querySelector('button')");
-}
-
-function testHitCountsBeforeStopping() {
-  let marker = gEditor.getMarker(0, 'hit-counts');
-  ok(marker, "A counter should exists.");
-}
-
-function testHitCountsAfterStopping() {
-  let marker = gEditor.getMarker(0, 'hit-counts');
-  is(marker, undefined, "A counter should be cleared.");
-}
-
-registerCleanupFunction(function() {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-});
deleted file mode 100644
--- a/browser/devtools/debugger/test/browser_dbg_tracing-01.js
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that we get the expected frame enter/exit logs in the tracer view.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_tracing-01.html";
-
-let gTab, gPanel, gDebugger;
-
-function test() {
-  SpecialPowers.pushPrefEnv({'set': [["devtools.debugger.tracer", true]]}, () => {
-    initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
-      gTab = aTab;
-      gPanel = aPanel;
-      gDebugger = gPanel.panelWin;
-
-      waitForSourceShown(gPanel, "code_tracing-01.js")
-        .then(() => startTracing(gPanel))
-        .then(clickButton)
-        .then(() => waitForClientEvents(aPanel, "traces"))
-        .then(testTraceLogs)
-        .then(() => stopTracing(gPanel))
-        .then(() => {
-          const deferred = promise.defer();
-          SpecialPowers.popPrefEnv(deferred.resolve);
-          return deferred.promise;
-        })
-        .then(() => closeDebuggerAndFinish(gPanel))
-        .then(null, aError => {
-          ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-        });
-    });
-  });
-}
-
-function clickButton() {
-  generateMouseClickInTab(gTab, "content.document.querySelector('button')");
-}
-
-function testTraceLogs() {
-  const onclickLogs = filterTraces(gPanel,
-                                   t => t.querySelector(".trace-name[value=onclick]"));
-  is(onclickLogs.length, 2, "Should have two logs from 'onclick'");
-  ok(onclickLogs[0].querySelector(".trace-call"),
-     "The first 'onclick' log should be a call.");
-  ok(onclickLogs[1].querySelector(".trace-return"),
-     "The second 'onclick' log should be a return.");
-  for (let t of onclickLogs) {
-    ok(t.querySelector(".trace-item").getAttribute("tooltiptext")
-        .includes("doc_tracing-01.html"));
-  }
-
-  const nonOnclickLogs = filterTraces(gPanel,
-                                      t => !t.querySelector(".trace-name[value=onclick]"));
-  for (let t of nonOnclickLogs) {
-    ok(t.querySelector(".trace-item").getAttribute("tooltiptext")
-        .includes("code_tracing-01.js"));
-  }
-
-  const mainLogs = filterTraces(gPanel,
-                                t => t.querySelector(".trace-name[value=main]"));
-  is(mainLogs.length, 2, "Should have an enter and an exit for 'main'");
-  ok(mainLogs[0].querySelector(".trace-call"),
-     "The first 'main' log should be a call.");
-  ok(mainLogs[1].querySelector(".trace-return"),
-     "The second 'main' log should be a return.");
-
-  const factorialLogs = filterTraces(gPanel,
-                                     t => t.querySelector(".trace-name[value=factorial]"));
-  is(factorialLogs.length, 10, "Should have 5 enter, and 5 exit frames for 'factorial'");
-  ok(factorialLogs.slice(0, 5).every(t => t.querySelector(".trace-call")),
-     "The first five 'factorial' logs should be calls.");
-  ok(factorialLogs.slice(5).every(t => t.querySelector(".trace-return")),
-     "The second five 'factorial' logs should be returns.")
-
-  // Test that the depth affects padding so that calls are indented properly.
-  let lastDepth = -Infinity;
-  for (let t of factorialLogs.slice(0, 5)) {
-    let depth = parseInt(t.querySelector(".trace-item").style.MozPaddingStart, 10);
-    ok(depth > lastDepth, "The depth should be increasing");
-    lastDepth = depth;
-  }
-  lastDepth = Infinity;
-  for (let t of factorialLogs.slice(5)) {
-    let depth = parseInt(t.querySelector(".trace-item").style.MozPaddingStart, 10);
-    ok(depth < lastDepth, "The depth should be decreasing");
-    lastDepth = depth;
-  }
-
-  const throwerLogs = filterTraces(gPanel,
-                                   t => t.querySelector(".trace-name[value=thrower]"));
-  is(throwerLogs.length, 2, "Should have an enter and an exit for 'thrower'");
-  ok(throwerLogs[0].querySelector(".trace-call"),
-     "The first 'thrower' log should be a call.");
-  ok(throwerLogs[1].querySelector(".trace-throw",
-     "The second 'thrower' log should be a throw."));
-}
-
-registerCleanupFunction(function() {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-});
deleted file mode 100644
--- a/browser/devtools/debugger/test/browser_dbg_tracing-02.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that we highlight matching calls and returns on hover.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_tracing-01.html";
-
-let gTab, gPanel, gDebugger;
-
-function test() {
-  SpecialPowers.pushPrefEnv({'set': [["devtools.debugger.tracer", true]]}, () => {
-    initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
-      gTab = aTab;
-      gPanel = aPanel;
-      gDebugger = gPanel.panelWin;
-
-      waitForSourceShown(gPanel, "code_tracing-01.js")
-        .then(() => startTracing(gPanel))
-        .then(clickButton)
-        .then(() => waitForClientEvents(aPanel, "traces"))
-        .then(highlightCall)
-        .then(testReturnHighlighted)
-        .then(unhighlightCall)
-        .then(testNoneHighlighted)
-        .then(() => stopTracing(gPanel))
-        .then(() => {
-          const deferred = promise.defer();
-          SpecialPowers.popPrefEnv(deferred.resolve);
-          return deferred.promise;
-        })
-        .then(() => closeDebuggerAndFinish(gPanel))
-        .then(null, aError => {
-          ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-        });
-    });
-  });
-}
-
-function clickButton() {
-  generateMouseClickInTab(gTab, "content.document.querySelector('button')");
-}
-
-function highlightCall() {
-  const callTrace = filterTraces(gPanel, t => t.querySelector(".trace-name[value=main]"))[0];
-  EventUtils.sendMouseEvent({ type: "mouseover" },
-                            callTrace,
-                            gDebugger);
-}
-
-function testReturnHighlighted() {
-  const returnTrace = filterTraces(gPanel, t => t.querySelector(".trace-name[value=main]"))[1];
-  ok(Array.indexOf(returnTrace.querySelector(".trace-item").classList, "selected-matching") >= 0,
-     "The corresponding return log should be highlighted.");
-}
-
-function unhighlightCall() {
-  const callTrace = filterTraces(gPanel, t => t.querySelector(".trace-name[value=main]"))[0];
-  EventUtils.sendMouseEvent({ type: "mouseout" },
-                            callTrace,
-                            gDebugger);
-}
-
-function testNoneHighlighted() {
-  const highlightedTraces = filterTraces(gPanel, t => t.querySelector(".selected-matching"));
-  is(highlightedTraces.length, 0, "Shouldn't have any highlighted traces");
-}
-
-registerCleanupFunction(function() {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-});
deleted file mode 100644
--- a/browser/devtools/debugger/test/browser_dbg_tracing-03.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-SimpleTest.requestCompleteLog();
-
-/**
- * Test that we can jump to function definitions by clicking on logs.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_tracing-01.html";
-
-let gTab, gPanel, gDebugger, gSources;
-
-function test() {
-  SpecialPowers.pushPrefEnv({'set': [["devtools.debugger.tracer", true]]}, () => {
-    initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
-      gTab = aTab;
-      gPanel = aPanel;
-      gDebugger = gPanel.panelWin;
-      gSources = gDebugger.DebuggerView.Sources;
-
-      waitForSourceShown(gPanel, "code_tracing-01.js")
-        .then(() => startTracing(gPanel))
-        .then(() => clickButton())
-        .then(() => waitForClientEvents(aPanel, "traces"))
-        .then(() => {
-          // Switch away from the JS file so we can make sure that clicking on a
-          // log will switch us back to the correct JS file.
-          gSources.selectedValue = getSourceActor(gSources, TAB_URL);
-          return ensureSourceIs(aPanel, getSourceActor(gSources, TAB_URL), true);
-        })
-        .then(() => {
-          const finished = waitForSourceShown(gPanel, "code_tracing-01.js");
-          clickTraceLog();
-          return finished;
-        })
-        .then(testCorrectLine)
-        .then(() => stopTracing(gPanel))
-        .then(() => {
-          const deferred = promise.defer();
-          SpecialPowers.popPrefEnv(deferred.resolve);
-          return deferred.promise;
-        })
-        .then(() => closeDebuggerAndFinish(gPanel))
-        .then(null, aError => {
-          ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-        });
-    });
-  });
-}
-
-function clickButton() {
-  generateMouseClickInTab(gTab, "content.document.querySelector('button')");
-}
-
-function clickTraceLog() {
-  filterTraces(gPanel, t => t.querySelector(".trace-name[value=main]"))[0].click();
-}
-
-function testCorrectLine() {
-  is(gDebugger.DebuggerView.editor.getCursor().line, 18,
-     "The editor should have the function definition site's line selected.");
-}
-
-registerCleanupFunction(function() {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gSources = null;
-});
deleted file mode 100644
--- a/browser/devtools/debugger/test/browser_dbg_tracing-04.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that when we click on logs, we get the parameters/return value in the variables view.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_tracing-01.html";
-
-let gTab, gPanel, gDebugger;
-
-function test() {
-  SpecialPowers.pushPrefEnv({'set': [["devtools.debugger.tracer", true]]}, () => {
-    initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
-      gTab = aTab;
-      gPanel = aPanel;
-      gDebugger = gPanel.panelWin;
-
-      waitForSourceShown(gPanel, "code_tracing-01.js")
-        .then(() => startTracing(gPanel))
-        .then(clickButton)
-        .then(() => waitForClientEvents(aPanel, "traces"))
-        .then(clickTraceCall)
-        .then(testParams)
-        .then(clickTraceReturn)
-        .then(testReturn)
-        .then(() => stopTracing(gPanel))
-        .then(() => {
-          const deferred = promise.defer();
-          SpecialPowers.popPrefEnv(deferred.resolve);
-          return deferred.promise;
-        })
-        .then(() => closeDebuggerAndFinish(gPanel))
-        .then(null, aError => {
-          DevToolsUtils.reportException("browser_dbg_tracing-04.js", aError);
-          ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-        });
-    });
-  });
-}
-
-function clickButton() {
-  generateMouseClickInTab(gTab, "content.document.querySelector('button')");
-}
-
-function clickTraceCall() {
-  filterTraces(gPanel, t => t.querySelector(".trace-name[value=factorial]"))[0]
-    .click();
-}
-
-function testParams() {
-  const name = gDebugger.document.querySelector(".variables-view-variable .name");
-  ok(name, "Should have a variable name");
-  is(name.getAttribute("value"), "n", "The variable name should be n");
-
-  const value = gDebugger.document.querySelector(".variables-view-variable .value.token-number");
-  ok(value, "Should have a variable value");
-  is(value.getAttribute("value"), "5", "The variable value should be 5");
-}
-
-function clickTraceReturn() {
-  filterTraces(gPanel, t => t.querySelector(".trace-name[value=factorial]"))
-    .pop().click();
-}
-
-function testReturn() {
-  const name = gDebugger.document.querySelector(".variables-view-variable .name");
-  ok(name, "Should have a variable name");
-  is(name.getAttribute("value"), "<return>", "The variable name should be <return>");
-
-  const value = gDebugger.document.querySelector(".variables-view-variable .value.token-number");
-  ok(value, "Should have a variable value");
-  is(value.getAttribute("value"), "120", "The variable value should be 120");
-}
-
-registerCleanupFunction(function() {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-});
deleted file mode 100644
--- a/browser/devtools/debugger/test/browser_dbg_tracing-05.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that text describing the tracing state is correctly displayed.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_tracing-01.html";
-
-let gTab, gPanel, gDebugger;
-let gTracer, gL10N;
-
-function test() {
-  SpecialPowers.pushPrefEnv({'set': [["devtools.debugger.tracer", true]]}, () => {
-    initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
-      gTab = aTab;
-      gPanel = aPanel;
-      gDebugger = gPanel.panelWin;
-      gTracer = gDebugger.DebuggerView.Tracer;
-      gL10N = gDebugger.L10N;
-
-      waitForSourceShown(gPanel, "code_tracing-01.js")
-        .then(testTracingNotStartedText)
-        .then(() => gTracer._onStartTracing())
-        .then(testFunctionCallsUnavailableText)
-        .then(clickButton)
-        .then(() => waitForClientEvents(aPanel, "traces"))
-        .then(testNoEmptyText)
-        .then(() => gTracer._onClear())
-        .then(testFunctionCallsUnavailableText)
-        .then(() => gTracer._onStopTracing())
-        .then(testTracingNotStartedText)
-        .then(() => gTracer._onClear())
-        .then(testTracingNotStartedText)
-        .then(() => {
-          const deferred = promise.defer();
-          SpecialPowers.popPrefEnv(deferred.resolve);
-          return deferred.promise;
-        })
-        .then(() => closeDebuggerAndFinish(gPanel))
-        .then(null, aError => {
-          DevToolsUtils.reportException("browser_dbg_tracing-05.js", aError);
-          ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-        });
-    });
-  });
-}
-
-function testTracingNotStartedText() {
-  let label = gDebugger.document.querySelector("#tracer-tabpanel .fast-list-widget-empty-text");
-  ok(label,
-    "A label is displayed in the tracer tabpanel.");
-  is(label.getAttribute("value"), gL10N.getStr("tracingNotStartedText"),
-    "The correct {{tracingNotStartedText}} is displayed in the tracer tabpanel.");
-}
-
-function testFunctionCallsUnavailableText() {
-  let label = gDebugger.document.querySelector("#tracer-tabpanel .fast-list-widget-empty-text");
-  ok(label,
-    "A label is displayed in the tracer tabpanel.");
-  is(label.getAttribute("value"), gL10N.getStr("noFunctionCallsText"),
-    "The correct {{noFunctionCallsText}} is displayed in the tracer tabpanel.");
-}
-
-function testNoEmptyText() {
-  let label = gDebugger.document.querySelector("#tracer-tabpanel .fast-list-widget-empty-text");
-  ok(!label,
-    "No label should be displayed in the tracer tabpanel.");
-}
-
-function clickButton() {
-  generateMouseClickInTab(gTab, "content.document.querySelector('button')");
-}
-
-registerCleanupFunction(function() {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gTracer = null;
-  gL10N = null;
-});
deleted file mode 100644
--- a/browser/devtools/debugger/test/browser_dbg_tracing-06.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that the tracer doesn't connect to the backend when tracing is disabled.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_tracing-01.html";
-const TRACER_PREF = "devtools.debugger.tracer";
-
-let gTab, gPanel, gDebugger;
-let gOriginalPref = Services.prefs.getBoolPref(TRACER_PREF);
-Services.prefs.setBoolPref(TRACER_PREF, false);
-
-function test() {
-  initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-
-    waitForSourceShown(gPanel, "code_tracing-01.js")
-      .then(() => {
-        ok(!gDebugger.DebuggerController.traceClient, "Should not have a trace client");
-        closeDebuggerAndFinish(gPanel);
-      })
-      .then(null, aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-}
-
-registerCleanupFunction(function() {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  Services.prefs.setBoolPref(TRACER_PREF, gOriginalPref);
-});
deleted file mode 100644
--- a/browser/devtools/debugger/test/browser_dbg_tracing-07.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Execute code both before and after blackboxing and test that we get
- * appropriately styled traces.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_tracing-01.html";
-
-let gTab, gPanel;
-
-function test() {
-  Task.async(function*() {
-    yield pushPref();
-
-    [gTab,, gPanel] = yield initDebugger(TAB_URL);
-
-    yield startTracing(gPanel);
-    yield clickButton();
-    yield waitForClientEvents(gPanel, "traces");
-
-    /**
-     * Test that there are some traces which are not blackboxed.
-     */
-    const firstBbButton = getBlackBoxButton(gPanel);
-    ok(!firstBbButton.checked, "Should not be black boxed by default");
-
-    const blackBoxedTraces =
-      gPanel.panelWin.document.querySelectorAll(".trace-item.black-boxed");
-    ok(blackBoxedTraces.length === 0, "There should no blackboxed traces.");
-
-    const notBlackBoxedTraces =
-      gPanel.panelWin.document.querySelectorAll(".trace-item:not(.black-boxed)");
-    ok(notBlackBoxedTraces.length > 0,
-      "There should be some traces which are not blackboxed.");
-
-    yield toggleBlackBoxing(gPanel);
-    yield clickButton();
-    yield waitForClientEvents(gPanel, "traces");
-
-    /**
-     * Test that there are some traces which are blackboxed.
-     */
-    const secondBbButton = getBlackBoxButton(gPanel);
-    ok(secondBbButton.checked, "The checkbox should no longer be checked.");
-    const traces =
-      gPanel.panelWin.document.querySelectorAll(".trace-item.black-boxed");
-    ok(traces.length > 0, "There should be some blackboxed traces.");
-
-    yield stopTracing(gPanel);
-    yield popPref();
-    yield closeDebuggerAndFinish(gPanel);
-
-    finish();
-  })().catch(e => {
-    ok(false, "Got an error: " + e.message + "\n" + e.stack);
-    finish();
-  });
-}
-
-function clickButton() {
-  generateMouseClickInTab(gTab, "content.document.querySelector('button')");
-}
-
-function pushPref() {
-  let deferred = promise.defer();
-  SpecialPowers.pushPrefEnv({'set': [["devtools.debugger.tracer", true]]},
-    deferred.resolve);
-  return deferred.promise;
-}
-
-function popPref() {
-  let deferred = promise.defer();
-  SpecialPowers.popPrefEnv(deferred.resolve);
-  return deferred.promise;
-}
-
-registerCleanupFunction(function() {
-  gTab = null;
-  gPanel = null;
-});
-
deleted file mode 100644
--- a/browser/devtools/debugger/test/browser_dbg_tracing-08.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that tracing about:config doesn't produce errors.
- */
-
-const TAB_URL = "about:config";
-
-let gPanel, gDoneChecks;
-
-function test() {
-  gDoneChecks = promise.defer();
-  const tracerPref = promise.defer();
-  const configPref = promise.defer();
-  SpecialPowers.pushPrefEnv({'set': [["devtools.debugger.tracer", true]]}, tracerPref.resolve);
-  SpecialPowers.pushPrefEnv({'set': [["general.warnOnAboutConfig", false]]}, configPref.resolve);
-  promise.all([tracerPref.promise, configPref.promise]).then(() => {
-    initDebugger(TAB_URL).then(([,, aPanel]) => {
-      gPanel = aPanel;
-      gPanel.panelWin.gClient.addOneTimeListener("traces", testTraceLogs);
-    }).then(() => startTracing(gPanel))
-      .then(generateTrace)
-      .then(() => waitForClientEvents(gPanel, "traces"))
-      .then(() => gDoneChecks.promise)
-      .then(() => stopTracing(gPanel))
-      .then(resetPreferences)
-      .then(() => closeDebuggerAndFinish(gPanel))
-      .then(null, aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-}
-
-function testTraceLogs(name, packet) {
-  info("Traces: " + packet.traces.length);
-  ok(packet.traces.length > 0, "Got some traces.");
-  ok(packet.traces.every(t => t.type != "enteredFrame" || !!t.location),
-     "All enteredFrame traces contain location.");
-  gDoneChecks.resolve();
-}
-
-function generateTrace(name, packet) {
-  // Interact with the page to cause JS execution.
-  let search = content.document.getElementById("textbox");
-  info("Interacting with the page.");
-  search.value = "devtools";
-}
-
-function resetPreferences() {
-  const deferred = promise.defer();
-  SpecialPowers.popPrefEnv(() => SpecialPowers.popPrefEnv(deferred.resolve));
-  return deferred.promise;
-}
-
-registerCleanupFunction(function() {
-  gPanel = null;
-  gDoneChecks = null;
-});
deleted file mode 100644
--- a/browser/devtools/debugger/test/code_tracing-01.js
+++ /dev/null
@@ -1,29 +0,0 @@
-function factorial(n) {
-  if (n <= 1) {
-    return 1;
-  } else {
-    return n * factorial(n - 1);
-  }
-}
-
-function* yielder(n) {
-  while (n-- >= 0) {
-    yield { value: n, squared: n * n };
-  }
-}
-
-function thrower() {
-  throw new Error("Curse your sudden but inevitable betrayal!");
-}
-
-function main() {
-  factorial(5);
-
-  // XXX bug 923729: Can't test yielding yet.
-  // for (let x of yielder(5)) {}
-
-  try {
-    thrower();
-  } catch (e) {
-  }
-}
deleted file mode 100644
--- a/browser/devtools/debugger/test/doc_same-line-functions.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!-- Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/ -->
-<!doctype html>
-
-<html>
-  <head>
-    <meta charset="utf-8"/>
-    <title>Debugger Tracer test page</title>
-  </head>
-
-  <body>
-    <script src="code_same-line-functions.js"></script>
-    <button onclick="first()">Click me!</button>
-  </body>
-</html>
deleted file mode 100644
--- a/browser/devtools/debugger/test/doc_tracing-01.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="utf-8"/>
-    <title>Debugger Tracer test page</title>
-  </head>
-
-  <body>
-    <script src="code_tracing-01.js"></script>
-    <button onclick="main()">Click me!</button>
-
-    <script type="text/javascript">
-      // Have an inline script to make sure the HTML file is listed
-      // in the sources. We want to switch between them.
-      function foo() {
-        return 5;
-      }
-    </script>
-  </body>
-</html>
--- a/browser/devtools/debugger/test/head.js
+++ b/browser/devtools/debugger/test/head.js
@@ -883,49 +883,16 @@ function hideVarPopupByScrollingEditor(a
   editor.setFirstVisibleLine(0);
   return popupHiding.then(waitForTick);
 }
 
 function reopenVarPopup(...aArgs) {
   return hideVarPopup.apply(this, aArgs).then(() => openVarPopup.apply(this, aArgs));
 }
 
-// Tracing helpers
-
-function startTracing(aPanel) {
-  const deferred = promise.defer();
-  aPanel.panelWin.DebuggerController.Tracer.startTracing(aResponse => {
-    if (aResponse.error) {
-      deferred.reject(aResponse);
-    } else {
-      deferred.resolve(aResponse);
-    }
-  });
-  return deferred.promise;
-}
-
-function stopTracing(aPanel) {
-  const deferred = promise.defer();
-  aPanel.panelWin.DebuggerController.Tracer.stopTracing(aResponse => {
-    if (aResponse.error) {
-      deferred.reject(aResponse);
-    } else {
-      deferred.resolve(aResponse);
-    }
-  });
-  return deferred.promise;
-}
-
-function filterTraces(aPanel, f) {
-  const traces = aPanel.panelWin.document
-    .getElementById("tracer-traces")
-    .querySelector("scrollbox")
-    .children;
-  return Array.filter(traces, f);
-}
 function attachAddonActorForUrl(aClient, aUrl) {
   let deferred = promise.defer();
 
   getAddonActorForUrl(aClient, aUrl).then(aGrip => {
     aClient.attachAddon(aGrip.actor, aResponse => {
       deferred.resolve([aGrip, aResponse]);
     });
   });
deleted file mode 100644
--- a/browser/devtools/debugger/views/tracer-view.js
+++ /dev/null
@@ -1,416 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-"use strict";
-
-/**
- * Functions handling the traces UI.
- */
-function TracerView(DebuggerController, DebuggerView) {
-  this._selectedItem = null;
-  this._matchingItems = null;
-  this.widget = null;
-
-  this.Tracer = DebuggerController.Tracer;
-  this.DebuggerView = DebuggerView;
-
-  this._highlightItem = this._highlightItem.bind(this);
-  this._isNotSelectedItem = this._isNotSelectedItem.bind(this);
-
-  this._unhighlightMatchingItems =
-    DevToolsUtils.makeInfallible(this._unhighlightMatchingItems.bind(this));
-  this._onToggleTracing =
-    DevToolsUtils.makeInfallible(this._onToggleTracing.bind(this));
-  this._onStartTracing =
-    DevToolsUtils.makeInfallible(this._onStartTracing.bind(this));
-  this._onClear =
-    DevToolsUtils.makeInfallible(this._onClear.bind(this));
-  this._onSelect =
-    DevToolsUtils.makeInfallible(this._onSelect.bind(this));
-  this._onMouseOver =
-    DevToolsUtils.makeInfallible(this._onMouseOver.bind(this));
-  this._onSearch =
-    DevToolsUtils.makeInfallible(this._onSearch.bind(this));
-}
-
-TracerView.MAX_TRACES = 200;
-
-TracerView.prototype = Heritage.extend(WidgetMethods, {
-  /**
-   * Initialization function, called when the debugger is started.
-   */
-  initialize: function() {
-    dumpn("Initializing the TracerView");
-
-    this._traceButton = document.getElementById("trace");
-    this._tracerTab = document.getElementById("tracer-tab");
-
-    // Remove tracer related elements from the dom and tear everything down if
-    // the tracer isn't enabled.
-    if (!Prefs.tracerEnabled) {
-      this._traceButton.remove();
-      this._traceButton = null;
-      this._tracerTab.remove();
-      this._tracerTab = null;
-      return;
-    }
-
-    this.widget = new FastListWidget(document.getElementById("tracer-traces"));
-    this._traceButton.removeAttribute("hidden");
-    this._tracerTab.removeAttribute("hidden");
-
-    this._search = document.getElementById("tracer-search");
-    this._template = document.getElementsByClassName("trace-item-template")[0];
-    this._templateItem = this._template.getElementsByClassName("trace-item")[0];
-    this._templateTypeIcon = this._template.getElementsByClassName("trace-type")[0];
-    this._templateNameNode = this._template.getElementsByClassName("trace-name")[0];
-
-    this.widget.addEventListener("select", this._onSelect, false);
-    this.widget.addEventListener("mouseover", this._onMouseOver, false);
-    this.widget.addEventListener("mouseout", this._unhighlightMatchingItems, false);
-    this._search.addEventListener("input", this._onSearch, false);
-
-    this._startTooltip = L10N.getStr("startTracingTooltip");
-    this._stopTooltip = L10N.getStr("stopTracingTooltip");
-    this._tracingNotStartedString = L10N.getStr("tracingNotStartedText");
-    this._noFunctionCallsString = L10N.getStr("noFunctionCallsText");
-
-    this._traceButton.setAttribute("tooltiptext", this._startTooltip);
-    this.emptyText = this._tracingNotStartedString;
-
-    this._addCommands();
-  },
-
-  /**
-   * Destruction function, called when the debugger is closed.
-   */
-  destroy: function() {
-    dumpn("Destroying the TracerView");
-
-    if (!this.widget) {
-      return;
-    }
-
-    this.widget.removeEventListener("select", this._onSelect, false);
-    this.widget.removeEventListener("mouseover", this._onMouseOver, false);
-    this.widget.removeEventListener("mouseout", this._unhighlightMatchingItems, false);
-    this._search.removeEventListener("input", this._onSearch, false);
-  },
-
-  /**
-   * Add commands that XUL can fire.
-   */
-  _addCommands: function() {
-    XULUtils.addCommands(document.getElementById('debuggerCommands'), {
-      toggleTracing: () => this._onToggleTracing(),
-      startTracing: () => this._onStartTracing(),
-      clearTraces: () => this._onClear()
-    });
-  },
-
-  /**
-   * Function invoked by the "toggleTracing" command to switch the tracer state.
-   */
-  _onToggleTracing: function() {
-    if (this.Tracer.tracing) {
-      this._onStopTracing();
-    } else {
-      this._onStartTracing();
-    }
-  },
-
-  /**
-   * Function invoked either by the "startTracing" command or by
-   * _onToggleTracing to start execution tracing in the backend.
-   *
-   * @return object
-   *         A promise resolved once the tracing has successfully started.
-   */
-  _onStartTracing: function() {
-    this._traceButton.setAttribute("checked", true);
-    this._traceButton.setAttribute("tooltiptext", this._stopTooltip);
-
-    this.empty();
-    this.emptyText = this._noFunctionCallsString;
-
-    let deferred = promise.defer();
-    this.Tracer.startTracing(deferred.resolve);
-    return deferred.promise;
-  },
-
-  /**
-   * Function invoked by _onToggleTracing to stop execution tracing in the
-   * backend.
-   *
-   * @return object
-   *         A promise resolved once the tracing has successfully stopped.
-   */
-  _onStopTracing: function() {
-    this._traceButton.removeAttribute("checked");
-    this._traceButton.setAttribute("tooltiptext", this._startTooltip);
-
-    this.emptyText = this._tracingNotStartedString;
-
-    let deferred = promise.defer();
-    this.Tracer.stopTracing(deferred.resolve);
-    return deferred.promise;
-  },
-
-  /**
-   * Function invoked by the "clearTraces" command to empty the traces pane.
-   */
-  _onClear: function() {
-    this.empty();
-  },
-
-  /**
-   * Populate the given parent scope with the variable with the provided name
-   * and value.
-   *
-   * @param String aName
-   *        The name of the variable.
-   * @param Object aParent
-   *        The parent scope.
-   * @param Object aValue
-   *        The value of the variable.
-   */
-  _populateVariable: function(aName, aParent, aValue) {
-    let item = aParent.addItem(aName, { value: aValue });
-
-    if (aValue) {
-      let wrappedValue = new this.Tracer.WrappedObject(aValue);
-      this.DebuggerView.Variables.controller.populate(item, wrappedValue);
-      item.expand();
-      item.twisty = false;
-    }
-  },
-
-  /**
-   * Handler for the widget's "select" event. Displays parameters, exception, or
-   * return value depending on whether the selected trace is a call, throw, or
-   * return respectively.
-   *
-   * @param Object traceItem
-   *        The selected trace item.
-   */
-  _onSelect: function _onSelect({ detail: traceItem }) {
-    if (!traceItem) {
-      return;
-    }
-
-    const data = traceItem.attachment.trace;
-    const { location: { url, line } } = data;
-    this.DebuggerView.setEditorLocation(
-      this.DebuggerView.Sources.getActorForLocation({ url }),
-      line,
-      { noDebug: true }
-    );
-
-    this.DebuggerView.Variables.empty();
-    const scope = this.DebuggerView.Variables.addScope();
-
-    if (data.type == "call") {
-      const params = DevToolsUtils.zip(data.parameterNames, data.arguments);
-      for (let [name, val] of params) {
-        if (val === undefined) {
-          scope.addItem(name, { value: "<value not available>" });
-        } else {
-          this._populateVariable(name, scope, val);
-        }
-      }
-    } else {
-      const varName = "<" + (data.type == "throw" ? "exception" : data.type) + ">";
-      this._populateVariable(varName, scope, data.returnVal);
-    }
-
-    scope.expand();
-    this.DebuggerView.showInstrumentsPane();
-  },
-
-  /**
-   * Add the hover frame enter/exit highlighting to a given item.
-   */
-  _highlightItem: function(aItem) {
-    if (!aItem || !aItem.target) {
-      return;
-    }
-    const trace = aItem.target.querySelector(".trace-item");
-    trace.classList.add("selected-matching");
-  },
-
-  /**
-   * Remove the hover frame enter/exit highlighting to a given item.
-   */
-  _unhighlightItem: function(aItem) {
-    if (!aItem || !aItem.target) {
-      return;
-    }
-    const match = aItem.target.querySelector(".selected-matching");
-    if (match) {
-      match.classList.remove("selected-matching");
-    }
-  },
-
-  /**
-   * Remove the frame enter/exit pair highlighting we do when hovering.
-   */
-  _unhighlightMatchingItems: function() {
-    if (this._matchingItems) {
-      this._matchingItems.forEach(this._unhighlightItem);
-      this._matchingItems = null;
-    }
-  },
-
-  /**
-   * Returns true if the given item is not the selected item.
-   */
-  _isNotSelectedItem: function(aItem) {
-    return aItem !== this.selectedItem;
-  },
-
-  /**
-   * Highlight the frame enter/exit pair of items for the given item.
-   */
-  _highlightMatchingItems: function(aItem) {
-    const frameId = aItem.attachment.trace.frameId;
-    const predicate = e => e.attachment.trace.frameId == frameId;
-
-    this._unhighlightMatchingItems();
-    this._matchingItems = this.items.filter(predicate);
-    this._matchingItems
-      .filter(this._isNotSelectedItem)
-      .forEach(this._highlightItem);
-  },
-
-  /**
-   * Listener for the mouseover event.
-   */
-  _onMouseOver: function({ target }) {
-    const traceItem = this.getItemForElement(target);
-    if (traceItem) {
-      this._highlightMatchingItems(traceItem);
-    }
-  },
-
-  /**
-   * Listener for typing in the search box.
-   */
-  _onSearch: function() {
-    const query = this._search.value.trim().toLowerCase();
-    const predicate = name => name.toLowerCase().includes(query);
-    this.filterContents(item => predicate(item.attachment.trace.name));
-  },
-
-  /**
-   * Select the traces tab in the sidebar.
-   */
-  selectTab: function() {
-    const tabs = this._tracerTab.parentElement;
-    tabs.selectedIndex = Array.indexOf(tabs.children, this._tracerTab);
-  },
-
-  /**
-   * Commit all staged items to the widget. Overridden so that we can call
-   * |FastListWidget.prototype.flush|.
-   */
-  commit: function() {
-    WidgetMethods.commit.call(this);
-    // TODO: Accessing non-standard widget properties. Figure out what's the
-    // best way to expose such things. Bug 895514.
-    this.widget.flush();
-  },
-
-  /**
-   * Adds the trace record provided as an argument to the view.
-   *
-   * @param object aTrace
-   *        The trace record coming from the tracer actor.
-   */
-  addTrace: function(aTrace) {
-    // Create the element node for the trace item.
-    let view = this._createView(aTrace);
-
-    // Append a source item to this container.
-    this.push([view], {
-      staged: true,
-      attachment: {
-        trace: aTrace
-      }
-    });
-  },
-
-  /**
-   * Customization function for creating an item's UI.
-   *
-   * @return nsIDOMNode
-   *         The network request view.
-   */
-  _createView: function(aTrace) {
-    let { type, name, location, blackBoxed, depth, frameId } = aTrace;
-    let { parameterNames, returnVal, arguments: args } = aTrace;
-    let fragment = document.createDocumentFragment();
-
-    this._templateItem.classList.toggle("black-boxed", blackBoxed);
-    this._templateItem.setAttribute("tooltiptext", SourceUtils.trimUrl(location.url));
-    this._templateItem.style.MozPaddingStart = depth + "em";
-
-    const TYPES = ["call", "yield", "return", "throw"];
-    for (let t of TYPES) {
-      this._templateTypeIcon.classList.toggle("trace-" + t, t == type);
-    }
-    this._templateTypeIcon.setAttribute("value", {
-      call: "\u2192",
-      yield: "Y",
-      return: "\u2190",
-      throw: "E",
-      terminated: "TERMINATED"
-    }[type]);
-
-    this._templateNameNode.setAttribute("value", name);
-
-    // All extra syntax and parameter nodes added.
-    const addedNodes = [];
-
-    if (parameterNames) {
-      const syntax = (p) => {
-        const el = document.createElement("label");
-        el.setAttribute("value", p);
-        el.classList.add("trace-syntax");
-        el.classList.add("plain");
-        addedNodes.push(el);
-        return el;
-      };
-
-      this._templateItem.appendChild(syntax("("));
-
-      for (let i = 0, n = parameterNames.length; i < n; i++) {
-        let param = document.createElement("label");
-        param.setAttribute("value", parameterNames[i]);
-        param.classList.add("trace-param");
-        param.classList.add("plain");
-        addedNodes.push(param);
-        this._templateItem.appendChild(param);
-
-        if (i + 1 !== n) {
-          this._templateItem.appendChild(syntax(", "));
-        }
-      }
-
-      this._templateItem.appendChild(syntax(")"));
-    }
-
-    // Flatten the DOM by removing one redundant box (the template container).
-    for (let node of this._template.childNodes) {
-      fragment.appendChild(node.cloneNode(true));
-    }
-
-    // Remove any added nodes from the template.
-    for (let node of addedNodes) {
-      this._templateItem.removeChild(node);
-    }
-
-    return fragment;
-  }
-});
-
-DebuggerView.Tracer = new TracerView(DebuggerController, DebuggerView);
--- a/browser/devtools/jar.mn
+++ b/browser/devtools/jar.mn
@@ -66,17 +66,16 @@ browser.jar:
     content/browser/devtools/codemirror/mozilla.css                    (sourceeditor/codemirror/mozilla.css)
     content/browser/devtools/debugger.xul                              (debugger/debugger.xul)
     content/browser/devtools/debugger.css                              (debugger/debugger.css)
     content/browser/devtools/debugger-controller.js                    (debugger/debugger-controller.js)
     content/browser/devtools/debugger-view.js                          (debugger/debugger-view.js)
     content/browser/devtools/debugger/workers-view.js                  (debugger/views/workers-view.js)
     content/browser/devtools/debugger/sources-view.js                  (debugger/views/sources-view.js)
     content/browser/devtools/debugger/variable-bubble-view.js          (debugger/views/variable-bubble-view.js)
-    content/browser/devtools/debugger/tracer-view.js                   (debugger/views/tracer-view.js)
     content/browser/devtools/debugger/watch-expressions-view.js        (debugger/views/watch-expressions-view.js)
     content/browser/devtools/debugger/event-listeners-view.js          (debugger/views/event-listeners-view.js)
     content/browser/devtools/debugger/global-search-view.js            (debugger/views/global-search-view.js)
     content/browser/devtools/debugger/toolbar-view.js                  (debugger/views/toolbar-view.js)
     content/browser/devtools/debugger/options-view.js                  (debugger/views/options-view.js)
     content/browser/devtools/debugger/stack-frames-view.js             (debugger/views/stack-frames-view.js)
     content/browser/devtools/debugger/stack-frames-classic-view.js     (debugger/views/stack-frames-classic-view.js)
     content/browser/devtools/debugger/filter-view.js                   (debugger/views/filter-view.js)
--- a/browser/devtools/performance/modules/logic/frame-utils.js
+++ b/browser/devtools/performance/modules/logic/frame-utils.js
@@ -33,16 +33,19 @@ const CHAR_CODE_COLON = ":".charCodeAt(0
 const CHAR_CODE_SLASH = "/".charCodeAt(0);
 
 // The cache used in the `nsIURL` function.
 const gNSURLStore = new Map();
 
 // The cache used to store inflated frames.
 const gInflatedFrameStore = new WeakMap();
 
+// The cache used to store frame data from `getInfo`.
+const gFrameData = new WeakMap();
+
 /**
  * Parses the raw location of this function call to retrieve the actual
  * function name, source url, host name, line and column.
  */
 function parseLocation(location, fallbackLine, fallbackColumn) {
   // Parse the `location` for the function name, source url, line, column etc.
 
   let line, column, url;
@@ -444,13 +447,76 @@ function isChromeScheme(location, i) {
     return false;
   }
 }
 
 function isNumeric(c) {
   return c >= CHAR_CODE_0 && c <= CHAR_CODE_9;
 }
 
+/**
+ * Calculates the relative costs of this frame compared to a root,
+ * and generates allocations information if specified. Uses caching
+ * if possible.
+ *
+ * @param {ThreadNode|FrameNode} node
+ *                               The node we are calculating.
+ * @param {ThreadNode} options.root
+ *                     The root thread node to calculate relative costs.
+ *                     Generates [self|total] [duration|percentage] values.
+ * @param {boolean} options.allocations
+ *                  Generates `totalAllocations` and `selfAllocations`.
+ *
+ * @return {object}
+ */
+function getFrameInfo (node, options) {
+  let data = gFrameData.get(node);
+
+  if (!data) {
+    if (node.nodeType === "Thread") {
+      data = Object.create(null);
+      data.functionName = global.L10N.getStr("table.root");
+    } else {
+      data = parseLocation(node.location, node.line, node.column);
+      data.hasOptimizations = node.hasOptimizations();
+      data.isContent = node.isContent;
+      data.isMetaCategory = node.isMetaCategory;
+    }
+    data.samples = node.youngestFrameSamples;
+    data.categoryData = global.CATEGORY_MAPPINGS[node.category] || {};
+    data.nodeType = node.nodeType;
+
+    // Frame name (function location or some meta information)
+    data.name = data.isMetaCategory ? data.categoryData.label : data.functionName || "";
+    data.tooltiptext = data.isMetaCategory ? data.categoryData.label : node.location || "";
+
+    gFrameData.set(node, data);
+  }
+
+  // If a root specified, calculate the relative costs in the context of
+  // this call tree. The cached store may already have this, but generate
+  // if it does not.
+  if (options && options.root && !data.COSTS_CALCULATED) {
+    let totalSamples = options.root.samples;
+    let totalDuration = options.root.duration;
+
+    data.selfDuration = node.youngestFrameSamples / totalSamples * totalDuration;
+    data.selfPercentage = node.youngestFrameSamples / totalSamples * 100;
+    data.totalDuration = node.samples / totalSamples * totalDuration;
+    data.totalPercentage = node.samples / totalSamples * 100;
+    data.COSTS_CALCULATED = true;
+  }
+
+  if (options && options.allocations && !data.ALLOCATIONS_CALCULATED) {
+    data.totalAllocations = node.allocations + node.calls.reduce((acc, node) => acc + node.allocations, 0);
+    data.selfAllocations = node.allocations;
+    data.ALLOCATIONS_CALCULATED = true;
+  }
+
+  return data;
+}
+
+exports.getFrameInfo = getFrameInfo;
 exports.computeIsContentAndCategory = computeIsContentAndCategory;
 exports.parseLocation = parseLocation;
 exports.getInflatedFrameCache = getInflatedFrameCache;
 exports.getOrAddInflatedFrame = getOrAddInflatedFrame;
 exports.InflatedFrame = InflatedFrame;
--- a/browser/devtools/performance/modules/logic/tree-model.js
+++ b/browser/devtools/performance/modules/logic/tree-model.js
@@ -1,19 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
 const { Cc, Ci, Cu, Cr } = require("chrome");
 
-loader.lazyRequireGetter(this, "L10N",
-  "devtools/performance/global", true);
-loader.lazyRequireGetter(this, "CATEGORY_MAPPINGS",
-  "devtools/performance/global", true);
 loader.lazyRequireGetter(this, "JITOptimizations",
   "devtools/performance/jit", true);
 loader.lazyRequireGetter(this, "FrameUtils",
   "devtools/performance/frame-utils");
 
 /**
  * A call tree for a thread. This is essentially a linkage between all frames
  * of all samples into a single tree structure, with additional information
@@ -34,16 +30,17 @@ function ThreadNode(thread, options = {}
   if (options.endTime == void 0 || options.startTime == void 0) {
     throw new Error("ThreadNode requires both `startTime` and `endTime`.");
   }
   this.samples = 0;
   this.sampleTimes = [];
   this.youngestFrameSamples = 0;
   this.calls = [];
   this.duration = options.endTime - options.startTime;
+  this.nodeType = "Thread";
 
   let { samples, stackTable, frameTable, stringTable, allocationsTable } = thread;
 
   // Nothing to do if there are no samples.
   if (samples.data.length === 0) {
     return;
   }
 
@@ -302,24 +299,22 @@ ThreadNode.prototype = {
 
     // Replace the toplevel calls with rootCalls, which now contains the
     // uninverted roots.
     this.calls = rootCalls;
   },
 
   /**
    * Gets additional details about this node.
+   * @see FrameNode.prototype.getInfo for more information.
+   *
    * @return object
    */
-  getInfo: function() {
-    return {
-      nodeType: "Thread",
-      functionName: L10N.getStr("table.root"),
-      categoryData: {}
-    };
+  getInfo: function(options) {
+    return FrameUtils.getFrameInfo(this, options);
   },
 
   /**
    * Mimicks the interface of FrameNode, and a ThreadNode can never have
    * optimization data (at the moment, anyway), so provide a function
    * to return null so we don't need to check if a frame node is a thread
    * or not everytime we fetch optimization data.
    *
@@ -373,16 +368,17 @@ function FrameNode(frameKey, { location,
   this.samples = 0;
   this.calls = [];
   this.isContent = !!isContent;
   this._optimizations = null;
   this._tierData = null;
   this._stringTable = null;
   this.isMetaCategory = !!isMetaCategory;
   this.category = category;
+  this.nodeType = "Frame";
 }
 
 FrameNode.prototype = {
   /**
    * Take optimization data observed for this frame.
    *
    * @param object optimizationSite
    *               Any JIT optimization information attached to the current
@@ -438,40 +434,31 @@ FrameNode.prototype = {
       for (let i = 0; i < otherOpts.length; i++) {
         opts.push(otherOpts[i]);
       }
     }
   },
 
   /**
    * Returns the parsed location and additional data describing
-   * this frame. Uses cached data if possible.
+   * this frame. Uses cached data if possible. Takes the following
+   * options:
+   *
+   * @param {ThreadNode} options.root
+   *                     The root thread node to calculate relative costs.
+   *                     Generates [self|total] [duration|percentage] values.
+   * @param {boolean} options.allocations
+   *                  Generates `totalAllocations` and `selfAllocations`.
    *
    * @return object
    *         The computed { name, file, url, line } properties for this
-   *         function call.
-   */
-  getInfo: function() {
-    return this._data || this._computeInfo();
-  },
-
-  /**
-   * Parses the raw location of this function call to retrieve the actual
-   * function name and source url.
+   *         function call, as well as additional params if options specified.
    */
-  _computeInfo: function() {
-    let categoryData = CATEGORY_MAPPINGS[this.category] || {};
-    let parsedData = FrameUtils.parseLocation(this.location, this.line, this.column);
-    parsedData.nodeType = "Frame";
-    parsedData.categoryData = categoryData;
-    parsedData.isContent = this.isContent;
-    parsedData.isMetaCategory = this.isMetaCategory;
-    parsedData.hasOptimizations = this.hasOptimizations();
-
-    return this._data = parsedData;
+  getInfo: function(options) {
+    return FrameUtils.getFrameInfo(this, options);
   },
 
   /**
    * Returns whether or not the frame node has an JITOptimizations model.
    *
    * @return {Boolean}
    */
   hasOptimizations: function () {
--- a/browser/devtools/performance/modules/widgets/tree-view.js
+++ b/browser/devtools/performance/modules/widgets/tree-view.js
@@ -128,49 +128,48 @@ function CallView({
 CallView.prototype = Heritage.extend(AbstractTreeItem.prototype, {
   /**
    * Creates the view for this tree node.
    * @param nsIDOMNode document
    * @param nsIDOMNode arrowNode
    * @return nsIDOMNode
    */
   _displaySelf: function(document, arrowNode) {
-    let displayedData = this.getDisplayedData();
-    let frameInfo = this.frame.getInfo();
+    let frameInfo = this.getDisplayedData();
 
     if (this.visibleCells.duration) {
-      var durationCell = this._createTimeCell(document, displayedData.totalDuration);
+      var durationCell = this._createTimeCell(document, frameInfo.totalDuration);
     }
     if (this.visibleCells.selfDuration) {
-      var selfDurationCell = this._createTimeCell(document, displayedData.selfDuration, true);
+      var selfDurationCell = this._createTimeCell(document, frameInfo.selfDuration, true);
     }
     if (this.visibleCells.percentage) {
-      var percentageCell = this._createExecutionCell(document, displayedData.totalPercentage);
+      var percentageCell = this._createExecutionCell(document, frameInfo.totalPercentage);
     }
     if (this.visibleCells.selfPercentage) {
-      var selfPercentageCell = this._createExecutionCell(document, displayedData.selfPercentage, true);
+      var selfPercentageCell = this._createExecutionCell(document, frameInfo.selfPercentage, true);
     }
     if (this.visibleCells.allocations) {
-      var allocationsCell = this._createAllocationsCell(document, displayedData.totalAllocations);
+      var allocationsCell = this._createAllocationsCell(document, frameInfo.totalAllocations);
     }
     if (this.visibleCells.selfAllocations) {
-      var selfAllocationsCell = this._createAllocationsCell(document, displayedData.selfAllocations, true);
+      var selfAllocationsCell = this._createAllocationsCell(document, frameInfo.selfAllocations, true);
     }
     if (this.visibleCells.samples) {
-      var samplesCell = this._createSamplesCell(document, displayedData.samples);
+      var samplesCell = this._createSamplesCell(document, frameInfo.samples);
     }
     if (this.visibleCells.function) {
-      var functionCell = this._createFunctionCell(document, arrowNode, displayedData.name, frameInfo, this.level);
+      var functionCell = this._createFunctionCell(document, arrowNode, frameInfo.name, frameInfo, this.level);
     }
 
     let targetNode = document.createElement("hbox");
     targetNode.className = "call-tree-item";
     targetNode.setAttribute("origin", frameInfo.isContent ? "content" : "chrome");
     targetNode.setAttribute("category", frameInfo.categoryData.abbrev || "");
-    targetNode.setAttribute("tooltiptext", displayedData.tooltiptext);
+    targetNode.setAttribute("tooltiptext", frameInfo.tooltiptext);
 
     if (this.hidden) {
       targetNode.style.display = "none";
     }
     if (this.visibleCells.duration) {
       targetNode.appendChild(durationCell);
     }
     if (this.visibleCells.percentage) {
@@ -350,80 +349,36 @@ CallView.prototype = Heritage.extend(Abs
    *
    * @return object
    */
   getDisplayedData: function() {
     if (this._cachedDisplayedData) {
       return this._cachedDisplayedData;
     }
 
-    let data = this._cachedDisplayedData = Object.create(null);
-    let frameInfo = this.frame.getInfo();
+    return this._cachedDisplayedData = this.frame.getInfo({
+      root: this.root.frame,
+      allocations: (this.visibleCells.allocations || this.visibleCells.selfAllocations)
+    });
 
     /**
      * When inverting call tree, the costs and times are dependent on position
      * in the tree. We must only count leaf nodes with self cost, and total costs
      * dependent on how many times the leaf node was found with a full stack path.
      *
      *   Total |  Self | Calls | Function
      * ============================================================================
      *  100%   |  100% |   100 | ▼ C
      *   50%   |   0%  |    50 |   ▼ B
      *   50%   |   0%  |    50 |     ▼ A
      *   50%   |   0%  |    50 |   ▼ B
      *
      * Every instance of a `CallView` represents a row in the call tree. The same
      * container node is used for all rows.
      */
-
-    // Leaf nodes in an inverted tree don't have to do anything special.
-    let isLeaf = this._level === 0;
-    let totalSamples = this.root.frame.samples;
-    let totalDuration = this.root.frame.duration;
-
-    // Self duration, cost
-    if (this.visibleCells.selfDuration) {
-      data.selfDuration = this.frame.youngestFrameSamples / totalSamples * totalDuration;
-    }
-    if (this.visibleCells.selfPercentage) {
-      data.selfPercentage = this.frame.youngestFrameSamples / totalSamples * 100;
-    }
-
-    // Total duration, cost
-    if (this.visibleCells.duration) {
-      data.totalDuration = this.frame.samples / totalSamples * totalDuration;
-    }
-    if (this.visibleCells.percentage) {
-      data.totalPercentage = this.frame.samples / totalSamples * 100;
-    }
-
-    // Raw samples.
-    if (this.visibleCells.samples) {
-      data.samples = this.frame.youngestFrameSamples;
-    }
-
-    // Self/total allocations count.
-    if (this.visibleCells.allocations) {
-      let childrenAllocations = this.frame.calls.reduce((acc, node) => acc + node.allocations, 0);
-      data.totalAllocations = this.frame.allocations + childrenAllocations;
-    }
-    if (this.visibleCells.selfAllocations) {
-      data.selfAllocations = this.frame.allocations;
-    }
-
-    // Frame name (function location or some meta information).
-    data.name = frameInfo.isMetaCategory
-      ? frameInfo.categoryData.label
-      : frameInfo.functionName || "";
-
-    data.tooltiptext = frameInfo.isMetaCategory
-      ? frameInfo.categoryData.label
-      : this.frame.location || "";
-
-    return this._cachedDisplayedData;
   },
 
   /**
    * Toggles the category information hidden or visible.
    * @param boolean visible
    */
   toggleCategories: function(visible) {
     if (!visible) {
new file mode 100644
--- /dev/null
+++ b/browser/devtools/performance/test/unit/test_tree-model-10.js
@@ -0,0 +1,149 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+/**
+ * Tests that the tree model calculates correct costs/percentages for
+ * frame nodes. The model-only version of browser_profiler-tree-view-10.js
+ */
+
+function run_test() {
+  run_next_test();
+}
+
+add_task(function () {
+  let { ThreadNode } = devtools.require("devtools/performance/tree-model");
+  let thread = new ThreadNode(gThread, { invertTree: true, startTime: 0, endTime: 50 });
+
+  /**
+   * Samples
+   *
+   * A->C
+   * A->B
+   * A->B->C x4
+   * A->B->D x4
+   *
+   * Expected Tree
+   * +--total--+--self--+--tree-------------+
+   * |   50%   |   50%  |  C
+   * |   40%   |   0    |  -> B
+   * |   30%   |   0    |     -> A
+   * |   10%   |   0    |  -> A
+   *
+   * |   40%   |   40%  |  D
+   * |   40%   |   0    |  -> B
+   * |   40%   |   0    |     -> A
+   *
+   * |   10%   |   10%  |  B
+   * |   10%   |   0    |  -> A
+   */
+
+  [ // total, self, name
+    [ 50, 50, "C", [
+      [ 40,  0, "B", [
+        [ 30,  0, "A"]
+      ]],
+      [ 10,  0, "A"]
+    ]],
+    [ 40, 40, "D", [
+      [ 40,  0, "B", [
+        [ 40,  0, "A"],
+      ]]
+    ]],
+    [ 10, 10, "B", [
+      [ 10,  0, "A"],
+    ]]
+  ].forEach(compareFrameInfo(thread));
+});
+
+function compareFrameInfo (root, parent) {
+  parent = parent || root;
+  return function (def) {
+    let [total, self, name, children] = def;
+    let node = getFrameNodePath(parent, name);
+    let data = node.getInfo({ root });
+    equal(total, data.totalPercentage, `${name} has correct total percentage: ${data.totalPercentage}`);
+    equal(self, data.selfPercentage, `${name} has correct self percentage: ${data.selfPercentage}`);
+    if (children) {
+      children.forEach(compareFrameInfo(root, node));
+    }
+  }
+}
+
+let gThread = synthesizeProfileForTest([{
+  time: 5,
+  frames: [
+    { location: "(root)" },
+    { location: "A" },
+    { location: "B" },
+    { location: "C" }
+  ]
+}, {
+  time: 10,
+  frames: [
+    { location: "(root)" },
+    { location: "A" },
+    { location: "B" },
+    { location: "D" }
+  ]
+}, {
+  time: 15,
+  frames: [
+    { location: "(root)" },
+    { location: "A" },
+    { location: "C" },
+  ]
+}, {
+  time: 20,
+  frames: [
+    { location: "(root)" },
+    { location: "A" },
+    { location: "B" },
+  ]
+}, {
+  time: 25,
+  frames: [
+    { location: "(root)" },
+    { location: "A" },
+    { location: "B" },
+    { location: "C" }
+  ]
+}, {
+  time: 30,
+  frames: [
+    { location: "(root)" },
+    { location: "A" },
+    { location: "B" },
+    { location: "C" }
+  ]
+}, {
+  time: 35,
+  frames: [
+    { location: "(root)" },
+    { location: "A" },
+    { location: "B" },
+    { location: "D" }
+  ]
+}, {
+  time: 40,
+  frames: [
+    { location: "(root)" },
+    { location: "A" },
+    { location: "B" },
+    { location: "D" }
+  ]
+}, {
+  time: 45,
+  frames: [
+    { location: "(root)" },
+    { location: "B" },
+    { location: "C" }
+  ]
+}, {
+  time: 50,
+  frames: [
+    { location: "(root)" },
+    { location: "A" },
+    { location: "B" },
+    { location: "D" }
+  ]
+}]);
new file mode 100644
--- /dev/null
+++ b/browser/devtools/performance/test/unit/test_tree-model-11.js
@@ -0,0 +1,85 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+/**
+ * Tests that the costs for recursive frames does not overcount the collapsed
+ * samples.
+ */
+
+function run_test() {
+  run_next_test();
+}
+
+add_task(function () {
+  let { ThreadNode } = devtools.require("devtools/performance/tree-model");
+  let thread = new ThreadNode(gThread, { startTime: 0, endTime: 50, flattenRecursion: true });
+
+  /**
+   * Samples
+   *
+   * A->B->C
+   * A->B->B->B->C
+   * A->B
+   * A->B->B->B
+   */
+
+  [ // total, self, name
+    [ 100, 0, "(root)", [
+      [ 100, 0, "A", [
+        [ 100, 50, "B", [
+          [ 50, 50, "C"]
+        ]]
+      ]],
+    ]],
+  ].forEach(compareFrameInfo(thread));
+});
+
+function compareFrameInfo (root, parent) {
+  parent = parent || root;
+  return function (def) {
+    let [total, self, name, children] = def;
+    let node = getFrameNodePath(parent, name);
+    let data = node.getInfo({ root });
+    equal(total, data.totalPercentage, `${name} has correct total percentage: ${data.totalPercentage}`);
+    equal(self, data.selfPercentage, `${name} has correct self percentage: ${data.selfPercentage}`);
+    if (children) {
+      children.forEach(compareFrameInfo(root, node));
+    }
+  }
+}
+
+let gThread = synthesizeProfileForTest([{
+  time: 5,
+  frames: [
+    { location: "(root)" },
+    { location: "A" },
+    { location: "B" },
+    { location: "B" },
+    { location: "B" },
+    { location: "C" }
+  ]
+}, {
+  time: 10,
+  frames: [
+    { location: "(root)" },
+    { location: "A" },
+    { location: "B" },
+    { location: "C" }
+  ]
+}, {
+  time: 15,
+  frames: [
+    { location: "(root)" },
+    { location: "A" },
+    { location: "B" },
+    { location: "B" },
+    { location: "B" },
+  ]
+}, {
+  time: 20,
+  frames: [
+    { location: "(root)" },
+    { location: "A" },
+    { location: "B" },
+  ]
+}]);
--- a/browser/devtools/performance/test/unit/xpcshell.ini
+++ b/browser/devtools/performance/test/unit/xpcshell.ini
@@ -17,11 +17,13 @@ skip-if = toolkit == 'android' || toolki
 [test_tree-model-02.js]
 [test_tree-model-03.js]
 [test_tree-model-04.js]
 [test_tree-model-05.js]
 [test_tree-model-06.js]
 [test_tree-model-07.js]
 [test_tree-model-08.js]
 [test_tree-model-09.js]
+[test_tree-model-10.js]
+[test_tree-model-11.js]
 [test_waterfall-utils-collapse-01.js]
 [test_waterfall-utils-collapse-02.js]
 [test_waterfall-utils-collapse-03.js]
--- a/dom/ipc/ProcessPriorityManager.cpp
+++ b/dom/ipc/ProcessPriorityManager.cpp
@@ -1090,17 +1090,17 @@ ParticularProcessPriorityManager::SetPri
   if (oldPriority != mPriority) {
     ProcessPriorityManagerImpl::GetSingleton()->
       NotifyProcessPriorityChanged(this, oldPriority);
 
     unused << mContentParent->SendNotifyProcessPriorityChanged(mPriority);
   }
 
   if (aPriority < PROCESS_PRIORITY_FOREGROUND) {
-    unused << mContentParent->SendFlushMemory(NS_LITERAL_STRING("low-memory"));
+    unused << mContentParent->SendFlushMemory(NS_LITERAL_STRING("lowering-priority"));
   }
 
   FireTestOnlyObserverNotification("process-priority-set",
     ProcessPriorityToString(mPriority));
 }
 
 void
 ParticularProcessPriorityManager::Freeze()
--- a/dom/system/gonk/SystemWorkerManager.cpp
+++ b/dom/system/gonk/SystemWorkerManager.cpp
@@ -114,17 +114,17 @@ SystemWorkerManager::Shutdown()
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   mShutdown = true;
 
   ShutdownAutoMounter();
 
 #ifdef MOZ_B2G_RIL
-  RilWorker::Shutdown();
+  RilConsumer::Shutdown();
 #endif
 
   nsCOMPtr<nsIWifi> wifi(do_QueryInterface(mWifiWorker));
   if (wifi) {
     wifi->Shutdown();
     wifi = nullptr;
   }
   mWifiWorker = nullptr;
@@ -196,17 +196,17 @@ SystemWorkerManager::RegisterRilWorker(u
 
   WorkerCrossThreadDispatcher *wctd =
     GetWorkerCrossThreadDispatcher(aCx, aWorker);
   if (!wctd) {
     NS_WARNING("Failed to GetWorkerCrossThreadDispatcher for ril");
     return NS_ERROR_FAILURE;
   }
 
-  return RilWorker::Register(aClientId, wctd);
+  return RilConsumer::Register(aClientId, wctd);
 #endif // MOZ_B2G_RIL
 }
 
 nsresult
 SystemWorkerManager::InitWifi(JSContext *cx)
 {
   nsCOMPtr<nsIWorkerHolder> worker = do_CreateInstance(kWifiWorkerCID);
   NS_ENSURE_TRUE(worker, NS_ERROR_FAILURE);
--- a/ipc/ril/Ril.cpp
+++ b/ipc/ril/Ril.cpp
@@ -1,283 +1,299 @@
 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/ipc/Ril.h"
+
 #include <fcntl.h>
 #include <sys/socket.h>
 #include <sys/un.h>
-#include "jsfriendapi.h"
-#include "mozilla/ArrayUtils.h"
-#include "mozilla/dom/ScriptSettings.h"
-#include "mozilla/dom/workers/Workers.h"
-#include "mozilla/ipc/RilSocket.h"
-#include "mozilla/ipc/RilSocketConsumer.h"
-#include "nsThreadUtils.h" // For NS_IsMainThread.
-#include "RilConnector.h"
+#include <netdb.h> // For gethostbyname.
 
-#ifdef CHROMIUM_LOG
 #undef CHROMIUM_LOG
-#endif
-
 #if defined(MOZ_WIDGET_GONK)
 #include <android/log.h>
 #define CHROMIUM_LOG(args...)  __android_log_print(ANDROID_LOG_INFO, "Gonk", args)
 #else
 #define CHROMIUM_LOG(args...)  printf(args);
 #endif
 
-namespace mozilla {
-namespace ipc {
+#include "jsfriendapi.h"
+#include "mozilla/ArrayUtils.h"
+#include "nsTArray.h"
+#include "nsThreadUtils.h" // For NS_IsMainThread.
+#include "RilConnector.h"
 
-USING_WORKERS_NAMESPACE;
-using namespace JS;
+USING_WORKERS_NAMESPACE
+using namespace mozilla::ipc;
 
-class RilConsumer;
+namespace {
 
 static const char RIL_SOCKET_NAME[] = "/dev/socket/rilproxy";
 
-static nsTArray<nsAutoPtr<RilConsumer>> sRilConsumers;
+static nsTArray<nsAutoPtr<mozilla::ipc::RilConsumer>> sRilConsumers;
 
-//
-// RilConsumer
-//
+class ConnectWorkerToRIL final : public WorkerTask
+{
+public:
+  bool RunTask(JSContext* aCx) override;
+};
 
-class RilConsumer final : public RilSocketConsumer
+class SendRilSocketDataTask final : public nsRunnable
 {
 public:
-  RilConsumer();
-
-  nsresult ConnectWorkerToRIL(JSContext* aCx);
+  SendRilSocketDataTask(unsigned long aClientId,
+                        UnixSocketRawData* aRawData)
+    : mRawData(aRawData)
+    , mClientId(aClientId)
+  { }
 
-  nsresult Register(unsigned long aClientId,
-                    WorkerCrossThreadDispatcher* aDispatcher);
-  void Unregister();
-
-  // Methods for |RilSocketConsumer|
-  //
+  NS_IMETHOD Run() override
+  {
+    MOZ_ASSERT(NS_IsMainThread());
 
-  void ReceiveSocketData(JSContext* aCx,
-                         int aIndex,
-                         nsAutoPtr<UnixSocketBuffer>& aBuffer) override;
-  void OnConnectSuccess(int aIndex) override;
-  void OnConnectError(int aIndex) override;
-  void OnDisconnect(int aIndex) override;
+    if (sRilConsumers.Length() <= mClientId || !sRilConsumers[mClientId]) {
+      // Probably shutting down.
+      delete mRawData;
+      return NS_OK;
+    }
 
-protected:
-  static bool PostRILMessage(JSContext* aCx, unsigned aArgc, Value* aVp);
-
-  nsresult Send(JSContext* aCx, const CallArgs& aArgs);
-  nsresult Receive(JSContext* aCx,
-                   uint32_t aClientId,
-                   const UnixSocketBuffer* aBuffer);
-  void Close();
+    sRilConsumers[mClientId]->Send(mRawData);
+    return NS_OK;
+  }
 
 private:
-  nsRefPtr<RilSocket> mSocket;
-  nsCString mAddress;
-  bool mShutdown;
+  UnixSocketRawData* mRawData;
+  unsigned long mClientId;
 };
 
-RilConsumer::RilConsumer()
-  : mShutdown(false)
-{ }
+static bool
+PostToRIL(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
+{
+  JS::CallArgs args = JS::CallArgsFromVp(aArgc, aVp);
+  NS_ASSERTION(!NS_IsMainThread(), "Expecting to be on the worker thread");
+
+  if (args.length() != 2) {
+    JS_ReportError(aCx, "Expecting two arguments with the RIL message");
+    return false;
+  }
+
+  int clientId = args[0].toInt32();
+  JS::Value v = args[1];
+
+  UnixSocketRawData* raw = nullptr;
+
+  if (v.isString()) {
+    JSAutoByteString abs;
+    JS::Rooted<JSString*> str(aCx, v.toString());
+    if (!abs.encodeUtf8(aCx, str)) {
+      return false;
+    }
+
+    raw = new UnixSocketRawData(abs.ptr(), abs.length());
+  } else if (!v.isPrimitive()) {
+    JSObject* obj = v.toObjectOrNull();
+    if (!JS_IsTypedArrayObject(obj)) {
+      JS_ReportError(aCx, "Object passed in wasn't a typed array");
+      return false;
+    }
 
-nsresult
-RilConsumer::ConnectWorkerToRIL(JSContext* aCx)
+    uint32_t type = JS_GetArrayBufferViewType(obj);
+    if (type != js::Scalar::Int8 &&
+        type != js::Scalar::Uint8 &&
+        type != js::Scalar::Uint8Clamped) {
+      JS_ReportError(aCx, "Typed array data is not octets");
+      return false;
+    }
+
+    JS::AutoCheckCannotGC nogc;
+    size_t size = JS_GetTypedArrayByteLength(obj);
+    void* data = JS_GetArrayBufferViewData(obj, nogc);
+    raw = new UnixSocketRawData(data, size);
+  } else {
+    JS_ReportError(
+      aCx, "Incorrect argument. Expecting a string or a typed array");
+    return false;
+  }
+
+  if (!raw) {
+    JS_ReportError(aCx, "Unable to post to RIL");
+    return false;
+  }
+
+  nsRefPtr<SendRilSocketDataTask> task = new SendRilSocketDataTask(clientId,
+                                                                   raw);
+  NS_DispatchToMainThread(task);
+  return true;
+}
+
+bool
+ConnectWorkerToRIL::RunTask(JSContext* aCx)
 {
   // Set up the postRILMessage on the function for worker -> RIL thread
   // communication.
+  NS_ASSERTION(!NS_IsMainThread(), "Expecting to be on the worker thread");
   NS_ASSERTION(!JS_IsRunning(aCx), "Are we being called somehow?");
-  Rooted<JSObject*> workerGlobal(aCx, CurrentGlobalOrNull(aCx));
+  JS::Rooted<JSObject*> workerGlobal(aCx, JS::CurrentGlobalOrNull(aCx));
 
   // Check whether |postRILMessage| has been defined.  No one but this class
   // should ever define |postRILMessage| in a RIL worker.
-  Rooted<Value> val(aCx);
+  JS::Rooted<JS::Value> val(aCx);
   if (!JS_GetProperty(aCx, workerGlobal, "postRILMessage", &val)) {
     JS_ReportPendingException(aCx);
-    return NS_ERROR_FAILURE;
+    return false;
   }
 
   // Make sure that |postRILMessage| is a function.
   if (JSTYPE_FUNCTION == JS_TypeOfValue(aCx, val)) {
-    return NS_OK;
+    return true;
   }
 
-  JSFunction* postRILMessage = JS_DefineFunction(aCx, workerGlobal,
-                                                 "postRILMessage",
-                                                 PostRILMessage, 2, 0);
-  if (NS_WARN_IF(!postRILMessage)) {
-    return NS_ERROR_FAILURE;
-  }
-  return NS_OK;
+  return !!JS_DefineFunction(aCx, workerGlobal, "postRILMessage",
+                             PostToRIL, 2, 0);
 }
 
-nsresult
-RilConsumer::Register(unsigned long aClientId,
-                      WorkerCrossThreadDispatcher* aDispatcher)
+class DispatchRILEvent final : public WorkerTask
+{
+public:
+  DispatchRILEvent(unsigned long aClient, UnixSocketBuffer* aBuffer)
+    : mClientId(aClient)
+    , mBuffer(aBuffer)
+  { }
+
+  bool RunTask(JSContext* aCx) override;
+
+private:
+  unsigned long mClientId;
+  nsAutoPtr<UnixSocketBuffer> mBuffer;
+};
+
+bool
+DispatchRILEvent::RunTask(JSContext* aCx)
+{
+  JS::Rooted<JSObject*> obj(aCx, JS::CurrentGlobalOrNull(aCx));
+
+  JS::Rooted<JSObject*> array(aCx,
+                              JS_NewUint8Array(aCx, mBuffer->GetSize()));
+  if (!array) {
+    return false;
+  }
+  {
+    JS::AutoCheckCannotGC nogc;
+    memcpy(JS_GetArrayBufferViewData(array, nogc),
+           mBuffer->GetData(), mBuffer->GetSize());
+  }
+
+  JS::AutoValueArray<2> args(aCx);
+  args[0].setNumber((uint32_t)mClientId);
+  args[1].setObject(*array);
+
+  JS::Rooted<JS::Value> rval(aCx);
+  return JS_CallFunctionName(aCx, obj, "onRILMessage", args, &rval);
+}
+
+} // namespace
+
+namespace mozilla {
+namespace ipc {
+
+RilConsumer::RilConsumer(unsigned long aClientId,
+                         WorkerCrossThreadDispatcher* aDispatcher)
+  : mDispatcher(aDispatcher)
+  , mShutdown(false)
 {
   // Only append client id after RIL_SOCKET_NAME when it's not connected to
   // the first(0) rilproxy for compatibility.
   if (!aClientId) {
     mAddress = RIL_SOCKET_NAME;
   } else {
     struct sockaddr_un addr_un;
     snprintf(addr_un.sun_path, sizeof addr_un.sun_path, "%s%lu",
              RIL_SOCKET_NAME, aClientId);
     mAddress = addr_un.sun_path;
   }
 
-  mSocket = new RilSocket(aDispatcher, this, aClientId);
+  mSocket = new StreamSocket(this, aClientId);
+  mSocket->Connect(new RilConnector(mAddress, aClientId));
+}
 
-  nsresult rv = mSocket->Connect(new RilConnector(mAddress, aClientId));
-  if (NS_FAILED(rv)) {
-    return rv;
+nsresult
+RilConsumer::Register(unsigned int aClientId,
+                      WorkerCrossThreadDispatcher* aDispatcher)
+{
+  MOZ_ASSERT(NS_IsMainThread());
+
+  sRilConsumers.EnsureLengthAtLeast(aClientId + 1);
+
+  if (sRilConsumers[aClientId]) {
+    NS_WARNING("RilConsumer already registered");
+    return NS_ERROR_FAILURE;
   }
 
+  nsRefPtr<ConnectWorkerToRIL> connection = new ConnectWorkerToRIL();
+  if (!aDispatcher->PostTask(connection)) {
+    NS_WARNING("Failed to connect worker to ril");
+    return NS_ERROR_UNEXPECTED;
+  }
+
+  // Now that we're set up, connect ourselves to the RIL thread.
+  sRilConsumers[aClientId] = new RilConsumer(aClientId, aDispatcher);
   return NS_OK;
 }
 
 void
-RilConsumer::Unregister()
-{
-  mShutdown = true;
-  Close();
-}
-
-bool
-RilConsumer::PostRILMessage(JSContext* aCx, unsigned aArgc, Value* aVp)
+RilConsumer::Shutdown()
 {
-  CallArgs args = CallArgsFromVp(aArgc, aVp);
-
-  if (args.length() != 2) {
-    JS_ReportError(aCx, "Expecting two arguments with the RIL message");
-    return false;
-  }
-
-  int clientId = args[0].toInt32();
-
-  if ((ssize_t)sRilConsumers.Length() <= clientId || !sRilConsumers[clientId]) {
-    // Probably shutting down.
-    return true;
-  }
+  MOZ_ASSERT(NS_IsMainThread());
 
-  nsresult rv = sRilConsumers[clientId]->Send(aCx, args);
-  if (NS_FAILED(rv)) {
-    return false;
-  }
-
-  return true;
-}
-
-nsresult
-RilConsumer::Send(JSContext* aCx, const CallArgs& aArgs)
-{
-  if (NS_WARN_IF(!mSocket) ||
-      NS_WARN_IF(mSocket->GetConnectionStatus() != SOCKET_CONNECTED)) {
-    // Probably shutting down.
-    return NS_OK;
-  }
-
-  nsAutoPtr<UnixSocketRawData> raw;
-
-  Value v = aArgs[1];
-
-  if (v.isString()) {
-    JSAutoByteString abs;
-    Rooted<JSString*> str(aCx, v.toString());
-    if (!abs.encodeUtf8(aCx, str)) {
-      return NS_ERROR_FAILURE;
+  for (unsigned long i = 0; i < sRilConsumers.Length(); i++) {
+    nsAutoPtr<RilConsumer> instance(sRilConsumers[i]);
+    if (!instance) {
+      continue;
     }
 
-    raw = new UnixSocketRawData(abs.ptr(), abs.length());
-  } else if (!v.isPrimitive()) {
-    JSObject* obj = v.toObjectOrNull();
-    if (!JS_IsTypedArrayObject(obj)) {
-      JS_ReportError(aCx, "Object passed in wasn't a typed array");
-      return NS_ERROR_FAILURE;
-    }
-
-    uint32_t type = JS_GetArrayBufferViewType(obj);
-    if (type != js::Scalar::Int8 &&
-        type != js::Scalar::Uint8 &&
-        type != js::Scalar::Uint8Clamped) {
-      JS_ReportError(aCx, "Typed array data is not octets");
-      return NS_ERROR_FAILURE;
-    }
-
-    AutoCheckCannotGC nogc;
-    size_t size = JS_GetTypedArrayByteLength(obj);
-    void* data = JS_GetArrayBufferViewData(obj, nogc);
-    raw = new UnixSocketRawData(data, size);
-  } else {
-    JS_ReportError(
-      aCx, "Incorrect argument. Expecting a string or a typed array");
-    return NS_ERROR_FAILURE;
+    instance->mShutdown = true;
+    instance->Close();
+    instance = nullptr;
   }
-
-  if (!raw) {
-    JS_ReportError(aCx, "Unable to post to RIL");
-    return NS_ERROR_FAILURE;
-  }
-
-  mSocket->SendSocketData(raw.forget());
-
-  return NS_OK;
 }
 
-nsresult
-RilConsumer::Receive(JSContext* aCx,
-                     uint32_t aClientId,
-                     const UnixSocketBuffer* aBuffer)
+void
+RilConsumer::Send(UnixSocketRawData* aRawData)
 {
-  MOZ_ASSERT(aBuffer);
-
-  Rooted<JSObject*> obj(aCx, CurrentGlobalOrNull(aCx));
-
-  Rooted<JSObject*> array(aCx, JS_NewUint8Array(aCx, aBuffer->GetSize()));
-  if (NS_WARN_IF(!array)) {
-    return NS_ERROR_FAILURE;
+  if (!mSocket || mSocket->GetConnectionStatus() != SOCKET_CONNECTED) {
+    // Probably shutting down.
+    delete aRawData;
+    return;
   }
-  {
-    AutoCheckCannotGC nogc;
-    memcpy(JS_GetArrayBufferViewData(array, nogc),
-           aBuffer->GetData(), aBuffer->GetSize());
-  }
-
-  AutoValueArray<2> args(aCx);
-  args[0].setNumber(aClientId);
-  args[1].setObject(*array);
-
-  Rooted<Value> rval(aCx);
-  JS_CallFunctionName(aCx, obj, "onRILMessage", args, &rval);
-
-  return NS_OK;
+  mSocket->SendSocketData(aRawData);
 }
 
 void
 RilConsumer::Close()
 {
   if (mSocket) {
     mSocket->Close();
     mSocket = nullptr;
   }
 }
 
-// |RilSocketConnector|
+// |StreamSocketConnector|
 
 void
-RilConsumer::ReceiveSocketData(JSContext* aCx,
-                               int aIndex,
+RilConsumer::ReceiveSocketData(int aIndex,
                                nsAutoPtr<UnixSocketBuffer>& aBuffer)
 {
-  Receive(aCx, (uint32_t)aIndex, aBuffer);
+  MOZ_ASSERT(NS_IsMainThread());
+
+  nsRefPtr<DispatchRILEvent> dre(new DispatchRILEvent(aIndex, aBuffer.forget()));
+  mDispatcher->PostTask(dre);
 }
 
 void
 RilConsumer::OnConnectSuccess(int aIndex)
 {
   // Nothing to do here.
   CHROMIUM_LOG("RIL[%d]: %s\n", aIndex, __FUNCTION__);
 }
@@ -295,145 +311,10 @@ RilConsumer::OnDisconnect(int aIndex)
   CHROMIUM_LOG("RIL[%d]: %s\n", aIndex, __FUNCTION__);
   if (mShutdown) {
     return;
   }
   mSocket->Connect(new RilConnector(mAddress, aIndex),
                    mSocket->GetSuggestedConnectDelayMs());
 }
 
-//
-// RilWorker
-//
-
-nsTArray<nsAutoPtr<RilWorker>> RilWorker::sRilWorkers;
-
-nsresult
-RilWorker::Register(unsigned int aClientId,
-                    WorkerCrossThreadDispatcher* aDispatcher)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  sRilWorkers.EnsureLengthAtLeast(aClientId + 1);
-
-  if (sRilWorkers[aClientId]) {
-    NS_WARNING("RilWorkers already registered");
-    return NS_ERROR_FAILURE;
-  }
-
-  // Now that we're set up, connect ourselves to the RIL thread.
-  sRilWorkers[aClientId] = new RilWorker(aDispatcher);
-
-  nsresult rv = sRilWorkers[aClientId]->RegisterConsumer(aClientId);
-  if (NS_FAILED(rv)) {
-    return rv;
-  }
-
-  return NS_OK;
-}
-
-void
-RilWorker::Shutdown()
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  for (size_t i = 0; i < sRilWorkers.Length(); ++i) {
-    if (!sRilWorkers[i]) {
-      continue;
-    }
-    sRilWorkers[i]->UnregisterConsumer(i);
-    sRilWorkers[i] = nullptr;
-  }
-}
-
-RilWorker::RilWorker(WorkerCrossThreadDispatcher* aDispatcher)
-  : mDispatcher(aDispatcher)
-{
-  MOZ_ASSERT(mDispatcher);
-}
-
-class RilWorker::RegisterConsumerTask : public WorkerTask
-{
-public:
-  RegisterConsumerTask(unsigned int aClientId,
-                       WorkerCrossThreadDispatcher* aDispatcher)
-    : mClientId(aClientId)
-    , mDispatcher(aDispatcher)
-  {
-    MOZ_ASSERT(mDispatcher);
-  }
-
-  bool RunTask(JSContext* aCx) override
-  {
-    sRilConsumers.EnsureLengthAtLeast(mClientId + 1);
-
-    MOZ_ASSERT(!sRilConsumers[mClientId]);
-
-    nsAutoPtr<RilConsumer> rilConsumer(new RilConsumer());
-
-    nsresult rv = rilConsumer->ConnectWorkerToRIL(aCx);
-    if (NS_FAILED(rv)) {
-      return false;
-    }
-
-    rv = rilConsumer->Register(mClientId, mDispatcher);
-    if (NS_FAILED(rv)) {
-      return false;
-    }
-    sRilConsumers[mClientId] = rilConsumer;
-
-    return true;
-  }
-
-private:
-  unsigned int mClientId;
-  nsRefPtr<WorkerCrossThreadDispatcher> mDispatcher;
-};
-
-nsresult
-RilWorker::RegisterConsumer(unsigned int aClientId)
-{
-  nsRefPtr<RegisterConsumerTask> task = new RegisterConsumerTask(aClientId,
-                                                                 mDispatcher);
-  if (!mDispatcher->PostTask(task)) {
-    NS_WARNING("Failed to post register-consumer task.");
-    return NS_ERROR_UNEXPECTED;
-  }
-
-  return NS_OK;
-}
-
-class RilWorker::UnregisterConsumerTask : public WorkerTask
-{
-public:
-  UnregisterConsumerTask(unsigned int aClientId)
-    : mClientId(aClientId)
-  { }
-
-  bool RunTask(JSContext* aCx) override
-  {
-    MOZ_ASSERT(mClientId < sRilConsumers.Length());
-    MOZ_ASSERT(sRilConsumers[mClientId]);
-
-    sRilConsumers[mClientId]->Unregister();
-    sRilConsumers[mClientId] = nullptr;
-
-    return true;
-  }
-
-private:
-  unsigned int mClientId;
-};
-
-void
-RilWorker::UnregisterConsumer(unsigned int aClientId)
-{
-  nsRefPtr<UnregisterConsumerTask> task =
-    new UnregisterConsumerTask(aClientId);
-
-  if (!mDispatcher->PostTask(task)) {
-    NS_WARNING("Failed to post unregister-consumer task.");
-    return;
-  }
-}
-
 } // namespace ipc
 } // namespace mozilla
--- a/ipc/ril/Ril.h
+++ b/ipc/ril/Ril.h
@@ -2,53 +2,50 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_ipc_Ril_h
 #define mozilla_ipc_Ril_h 1
 
-#include "nsAutoPtr.h"
-#include "nsError.h"
-#include "nsTArray.h"
+#include <mozilla/dom/workers/Workers.h>
+#include <mozilla/ipc/StreamSocket.h>
+#include <mozilla/ipc/StreamSocketConsumer.h>
 
 namespace mozilla {
-
-namespace dom {
-namespace workers {
-
-class WorkerCrossThreadDispatcher;
-
-} // namespace workers
-} // namespace dom
-
 namespace ipc {
 
-class RilConsumer;
-
-class RilWorker final
+class RilConsumer final : public StreamSocketConsumer
 {
 public:
   static nsresult Register(
     unsigned int aClientId,
     mozilla::dom::workers::WorkerCrossThreadDispatcher* aDispatcher);
+  static void Shutdown();
 
-  static void Shutdown();
+  void Send(UnixSocketRawData* aRawData);
 
 private:
-  class RegisterConsumerTask;
-  class UnregisterConsumerTask;
+  RilConsumer(unsigned long aClientId,
+              mozilla::dom::workers::WorkerCrossThreadDispatcher* aDispatcher);
 
-  RilWorker(mozilla::dom::workers::WorkerCrossThreadDispatcher* aDispatcher);
+  void Close();
+
+  // Methods for |StreamSocketConsumer|
+  //
 
-  nsresult RegisterConsumer(unsigned int aClientId);
-  void     UnregisterConsumer(unsigned int aClientId);
+  void ReceiveSocketData(int aIndex,
+                         nsAutoPtr<UnixSocketBuffer>& aBuffer) override;
+  void OnConnectSuccess(int aIndex) override;
+  void OnConnectError(int aIndex) override;
+  void OnDisconnect(int aIndex) override;
 
-  static nsTArray<nsAutoPtr<RilWorker>> sRilWorkers;
-
+  nsRefPtr<StreamSocket> mSocket;
   nsRefPtr<mozilla::dom::workers::WorkerCrossThreadDispatcher> mDispatcher;
+  nsCString mAddress;
+  bool mShutdown;
 };
 
 } // namespace ipc
 } // namespace mozilla
 
 #endif // mozilla_ipc_Ril_h
deleted file mode 100644
--- a/ipc/ril/RilSocket.cpp
+++ /dev/null
@@ -1,433 +0,0 @@
-/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "RilSocket.h"
-#include <fcntl.h>
-#include "mozilla/dom/workers/Workers.h"
-#include "mozilla/ipc/UnixSocketConnector.h"
-#include "mozilla/RefPtr.h"
-#include "nsXULAppAPI.h"
-#include "RilSocketConsumer.h"
-
-static const size_t MAX_READ_SIZE = 1 << 16;
-
-namespace mozilla {
-namespace ipc {
-
-USING_WORKERS_NAMESPACE
-
-//
-// RilSocketIO
-//
-
-class RilSocketIO final : public ConnectionOrientedSocketIO
-{
-public:
-  class ConnectTask;
-  class DelayedConnectTask;
-  class ReceiveTask;
-
-  RilSocketIO(WorkerCrossThreadDispatcher* aDispatcher,
-              MessageLoop* aConsumerLoop,
-              MessageLoop* aIOLoop,
-              RilSocket* aRilSocket,
-              UnixSocketConnector* aConnector);
-  ~RilSocketIO();
-
-  RilSocket* GetRilSocket();
-  DataSocket* GetDataSocket();
-
-  // Delayed-task handling
-  //
-
-  void SetDelayedConnectTask(CancelableTask* aTask);
-  void ClearDelayedConnectTask();
-  void CancelDelayedConnectTask();
-
-  // Methods for |DataSocket|
-  //
-
-  nsresult QueryReceiveBuffer(UnixSocketIOBuffer** aBuffer) override;
-  void ConsumeBuffer() override;
-  void DiscardBuffer() override;
-
-  // Methods for |SocketIOBase|
-  //
-
-  SocketBase* GetSocketBase() override;
-
-  bool IsShutdownOnConsumerThread() const override;
-  bool IsShutdownOnIOThread() const override;
-
-  void ShutdownOnConsumerThread() override;
-  void ShutdownOnIOThread() override;
-
-private:
-  /**
-   * Cross-thread dispatcher for the RIL worker
-   */
-  nsRefPtr<WorkerCrossThreadDispatcher> mDispatcher;
-
-  /**
-   * Consumer pointer. Non-thread safe RefPtr, so should only be manipulated
-   * directly from consumer thread. All non-consumer-thread accesses should
-   * happen with mIO as container.
-   */
-  RefPtr<RilSocket> mRilSocket;
-
-  /**
-   * If true, do not requeue whatever task we're running
-   */
-  bool mShuttingDownOnIOThread;
-
-  /**
-   * Task member for delayed connect task. Should only be access on consumer
-   * thread.
-   */
-  CancelableTask* mDelayedConnectTask;
-
-  /**
-   * I/O buffer for received data
-   */
-  nsAutoPtr<UnixSocketRawData> mBuffer;
-};
-
-RilSocketIO::RilSocketIO(WorkerCrossThreadDispatcher* aDispatcher,
-                         MessageLoop* aConsumerLoop,
-                         MessageLoop* aIOLoop,
-                         RilSocket* aRilSocket,
-                         UnixSocketConnector* aConnector)
-  : ConnectionOrientedSocketIO(aConsumerLoop, aIOLoop, aConnector)
-  , mDispatcher(aDispatcher)
-  , mRilSocket(aRilSocket)
-  , mShuttingDownOnIOThread(false)
-  , mDelayedConnectTask(nullptr)
-{
-  MOZ_ASSERT(mDispatcher);
-  MOZ_ASSERT(mRilSocket);
-}
-
-RilSocketIO::~RilSocketIO()
-{
-  MOZ_ASSERT(IsConsumerThread());
-  MOZ_ASSERT(IsShutdownOnConsumerThread());
-}
-
-RilSocket*
-RilSocketIO::GetRilSocket()
-{
-  return mRilSocket.get();
-}
-
-DataSocket*
-RilSocketIO::GetDataSocket()
-{
-  return mRilSocket.get();
-}
-
-void
-RilSocketIO::SetDelayedConnectTask(CancelableTask* aTask)
-{
-  MOZ_ASSERT(IsConsumerThread());
-
-  mDelayedConnectTask = aTask;
-}
-
-void
-RilSocketIO::ClearDelayedConnectTask()
-{
-  MOZ_ASSERT(IsConsumerThread());
-
-  mDelayedConnectTask = nullptr;
-}
-
-void
-RilSocketIO::CancelDelayedConnectTask()
-{
-  MOZ_ASSERT(IsConsumerThread());
-
-  if (!mDelayedConnectTask) {
-    return;
-  }
-
-  mDelayedConnectTask->Cancel();
-  ClearDelayedConnectTask();
-}
-
-// |DataSocketIO|
-
-nsresult
-RilSocketIO::QueryReceiveBuffer(UnixSocketIOBuffer** aBuffer)
-{
-  MOZ_ASSERT(aBuffer);
-
-  if (!mBuffer) {
-    mBuffer = new UnixSocketRawData(MAX_READ_SIZE);
-  }
-  *aBuffer = mBuffer.get();
-
-  return NS_OK;
-}
-
-/**
- * |ReceiveTask| transfers data received on the I/O thread
- * to an instance of |RilSocket| on the consumer thread.
- */
-class RilSocketIO::ReceiveTask final : public WorkerTask
-{
-public:
-  ReceiveTask(RilSocketIO* aIO, UnixSocketBuffer* aBuffer)
-    : mIO(aIO)
-    , mBuffer(aBuffer)
-  {
-    MOZ_ASSERT(mIO);
-  }
-
-  bool RunTask(JSContext* aCx) override
-  {
-    // Dispatched via WCTD, but still needs to run on the consumer thread
-    MOZ_ASSERT(mIO->IsConsumerThread());
-
-    if (NS_WARN_IF(mIO->IsShutdownOnConsumerThread())) {
-      // Since we've already explicitly closed and the close
-      // happened before this, this isn't really an error.
-      return true;
-    }
-
-    RilSocket* rilSocket = mIO->GetRilSocket();
-    MOZ_ASSERT(rilSocket);
-
-    rilSocket->ReceiveSocketData(aCx, mBuffer);
-
-    return true;
-  }
-
-private:
-  RilSocketIO* mIO;
-  nsAutoPtr<UnixSocketBuffer> mBuffer;
-};
-
-void
-RilSocketIO::ConsumeBuffer()
-{
-  nsRefPtr<ReceiveTask> task = new ReceiveTask(this, mBuffer.forget());
-  NS_WARN_IF(!mDispatcher->PostTask(task));
-}
-
-void
-RilSocketIO::DiscardBuffer()
-{
-  // Nothing to do.
-}
-
-// |SocketIOBase|
-
-SocketBase*
-RilSocketIO::GetSocketBase()
-{
-  return GetDataSocket();
-}
-
-bool
-RilSocketIO::IsShutdownOnConsumerThread() const
-{
-  MOZ_ASSERT(IsConsumerThread());
-
-  return mRilSocket == nullptr;
-}
-
-bool
-RilSocketIO::IsShutdownOnIOThread() const
-{
-  return mShuttingDownOnIOThread;
-}
-
-void
-RilSocketIO::ShutdownOnConsumerThread()
-{
-  MOZ_ASSERT(IsConsumerThread());
-  MOZ_ASSERT(!IsShutdownOnConsumerThread());
-
-  mRilSocket = nullptr;
-}
-
-void
-RilSocketIO::ShutdownOnIOThread()
-{
-  MOZ_ASSERT(!IsConsumerThread());
-  MOZ_ASSERT(!mShuttingDownOnIOThread);
-
-  Close(); // will also remove fd from I/O loop
-  mShuttingDownOnIOThread = true;
-}
-
-//
-// Socket tasks
-//
-
-class RilSocketIO::ConnectTask final
-  : public SocketIOTask<RilSocketIO>
-{
-public:
-  ConnectTask(RilSocketIO* aIO)
-    : SocketIOTask<RilSocketIO>(aIO)
-  { }
-
-  void Run() override
-  {
-    MOZ_ASSERT(!GetIO()->IsConsumerThread());
-    MOZ_ASSERT(!IsCanceled());
-
-    GetIO()->Connect();
-  }
-};
-
-class RilSocketIO::DelayedConnectTask final
-  : public SocketIOTask<RilSocketIO>
-{
-public:
-  DelayedConnectTask(RilSocketIO* aIO)
-    : SocketIOTask<RilSocketIO>(aIO)
-  { }
-
-  void Run() override
-  {
-    MOZ_ASSERT(GetIO()->IsConsumerThread());
-
-    if (IsCanceled()) {
-      return;
-    }
-
-    RilSocketIO* io = GetIO();
-    if (io->IsShutdownOnConsumerThread()) {
-      return;
-    }
-
-    io->ClearDelayedConnectTask();
-    io->GetIOLoop()->PostTask(FROM_HERE, new ConnectTask(io));
-  }
-};
-
-//
-// RilSocket
-//
-
-RilSocket::RilSocket(WorkerCrossThreadDispatcher* aDispatcher,
-                     RilSocketConsumer* aConsumer, int aIndex)
-  : mIO(nullptr)
-  , mDispatcher(aDispatcher)
-  , mConsumer(aConsumer)
-  , mIndex(aIndex)
-{
-  MOZ_ASSERT(mDispatcher);
-  MOZ_ASSERT(mConsumer);
-}
-
-RilSocket::~RilSocket()
-{
-  MOZ_ASSERT(!mIO);
-}
-
-void
-RilSocket::ReceiveSocketData(JSContext* aCx,
-                             nsAutoPtr<UnixSocketBuffer>& aBuffer)
-{
-  mConsumer->ReceiveSocketData(aCx, mIndex, aBuffer);
-}
-
-nsresult
-RilSocket::Connect(UnixSocketConnector* aConnector, int aDelayMs,
-                   MessageLoop* aConsumerLoop, MessageLoop* aIOLoop)
-{
-  MOZ_ASSERT(!mIO);
-
-  mIO = new RilSocketIO(mDispatcher, aConsumerLoop, aIOLoop, this, aConnector);
-  SetConnectionStatus(SOCKET_CONNECTING);
-
-  if (aDelayMs > 0) {
-    RilSocketIO::DelayedConnectTask* connectTask =
-      new RilSocketIO::DelayedConnectTask(mIO);
-    mIO->SetDelayedConnectTask(connectTask);
-    MessageLoop::current()->PostDelayedTask(FROM_HERE, connectTask, aDelayMs);
-  } else {
-    aIOLoop->PostTask(FROM_HERE, new RilSocketIO::ConnectTask(mIO));
-  }
-
-  return NS_OK;
-}
-
-nsresult
-RilSocket::Connect(UnixSocketConnector* aConnector, int aDelayMs)
-{
-  return Connect(aConnector, aDelayMs,
-                 MessageLoop::current(), XRE_GetIOMessageLoop());
-}
-
-// |ConnectionOrientedSocket|
-
-nsresult
-RilSocket::PrepareAccept(UnixSocketConnector* aConnector,
-                         MessageLoop* aConsumerLoop,
-                         MessageLoop* aIOLoop,
-                         ConnectionOrientedSocketIO*& aIO)
-{
-  MOZ_CRASH("|RilSocket| does not support accepting connections.");
-}
-
-// |DataSocket|
-
-void
-RilSocket::SendSocketData(UnixSocketIOBuffer* aBuffer)
-{
-  MOZ_ASSERT(mIO);
-  MOZ_ASSERT(mIO->IsConsumerThread());
-  MOZ_ASSERT(!mIO->IsShutdownOnConsumerThread());
-
-  mIO->GetIOLoop()->PostTask(
-    FROM_HERE,
-    new SocketIOSendTask<RilSocketIO, UnixSocketIOBuffer>(mIO, aBuffer));
-}
-
-// |SocketBase|
-
-void
-RilSocket::Close()
-{
-  MOZ_ASSERT(mIO);
-  MOZ_ASSERT(mIO->IsConsumerThread());
-
-  mIO->CancelDelayedConnectTask();
-
-  // From this point on, we consider |mIO| as being deleted. We sever
-  // the relationship here so any future calls to |Connect| will create
-  // a new I/O object.
-  mIO->ShutdownOnConsumerThread();
-  mIO->GetIOLoop()->PostTask(FROM_HERE, new SocketIOShutdownTask(mIO));
-  mIO = nullptr;
-
-  NotifyDisconnect();
-}
-
-void
-RilSocket::OnConnectSuccess()
-{
-  mConsumer->OnConnectSuccess(mIndex);
-}
-
-void
-RilSocket::OnConnectError()
-{
-  mConsumer->OnConnectError(mIndex);
-}
-
-void
-RilSocket::OnDisconnect()
-{
-  mConsumer->OnDisconnect(mIndex);
-}
-
-} // namespace ipc
-} // namespace mozilla
deleted file mode 100644
--- a/ipc/ril/RilSocket.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_ipc_RilSocket_h
-#define mozilla_ipc_RilSocket_h
-
-#include "mozilla/ipc/ConnectionOrientedSocket.h"
-
-class JSContext;
-class MessageLoop;
-
-namespace mozilla {
-namespace dom {
-namespace workers {
-
-class WorkerCrossThreadDispatcher;
-
-} // namespace workers
-} // namespace dom
-} // namespace mozilla
-
-namespace mozilla {
-namespace ipc {
-
-class RilSocketConsumer;
-class RilSocketIO;
-class UnixSocketConnector;
-
-class RilSocket final : public ConnectionOrientedSocket
-{
-public:
-  /**
-   * Constructs an instance of |RilSocket|.
-   *
-   * @param aDispatcher The dispatcher class for the received messages.
-   * @param aConsumer The consumer for the socket.
-   * @param aIndex An arbitrary index.
-   */
-  RilSocket(mozilla::dom::workers::WorkerCrossThreadDispatcher* aDispatcher,
-            RilSocketConsumer* aConsumer, int aIndex);
-
-  /**
-   * Method to be called whenever data is received. RIL-worker only.
-   *
-   * @param aCx The RIL worker's JS context.
-   * @param aBuffer Data received from the socket.
-   */
-  void ReceiveSocketData(JSContext* aCx, nsAutoPtr<UnixSocketBuffer>& aBuffer);
-
-  /**
-   * Starts a task on the socket that will try to connect to a socket in a
-   * non-blocking manner.
-   *
-   * @param aConnector Connector object for socket type specific functions
-   * @param aDelayMs Time delay in milliseconds.
-   * @param aConsumerLoop The socket's consumer thread.
-   * @param aIOLoop The socket's I/O thread.
-   * @return NS_OK on success, or an XPCOM error code otherwise.
-   */
-  nsresult Connect(UnixSocketConnector* aConnector, int aDelayMs,
-                   MessageLoop* aConsumerLoop, MessageLoop* aIOLoop);
-
-  /**
-   * Starts a task on the socket that will try to connect to a socket in a
-   * non-blocking manner.
-   *
-   * @param aConnector Connector object for socket type specific functions
-   * @param aDelayMs Time delay in milliseconds.
-   * @return NS_OK on success, or an XPCOM error code otherwise.
-   */
-  nsresult Connect(UnixSocketConnector* aConnector, int aDelayMs = 0);
-
-  // Methods for |ConnectionOrientedSocket|
-  //
-
-  nsresult PrepareAccept(UnixSocketConnector* aConnector,
-                         MessageLoop* aConsumerLoop,
-                         MessageLoop* aIOLoop,
-                         ConnectionOrientedSocketIO*& aIO) override;
-
-  // Methods for |DataSocket|
-  //
-
-  void SendSocketData(UnixSocketIOBuffer* aBuffer) override;
-
-  // Methods for |SocketBase|
-  //
-
-  void Close() override;
-  void OnConnectSuccess() override;
-  void OnConnectError() override;
-  void OnDisconnect() override;
-
-protected:
-  virtual ~RilSocket();
-
-private:
-  RilSocketIO* mIO;
-  nsRefPtr<mozilla::dom::workers::WorkerCrossThreadDispatcher> mDispatcher;
-  RilSocketConsumer* mConsumer;
-  int mIndex;
-};
-
-} // namespace ipc
-} // namepsace mozilla
-
-#endif // mozilla_ipc_RilSocket_h
deleted file mode 100644
--- a/ipc/ril/RilSocketConsumer.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "RilSocketConsumer.h"
-
-namespace mozilla {
-namespace ipc {
-
-//
-// RilSocketConsumer
-//
-
-RilSocketConsumer::~RilSocketConsumer()
-{ }
-
-}
-}
deleted file mode 100644
--- a/ipc/ril/RilSocketConsumer.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_ipc_RilSocketConsumer_h
-#define mozilla_ipc_RilSocketConsumer_h
-
-#include "nsAutoPtr.h"
-
-class JSContext;
-
-namespace mozilla {
-namespace ipc {
-
-class UnixSocketBuffer;
-
-/**
- * |RilSocketConsumer| handles socket events and received data.
- */
-class RilSocketConsumer
-{
-public:
-  /**
-   * Method to be called whenever data is received. RIL-worker only.
-   *
-   * @param aCx The RIL worker's JS context.
-   * @param aIndex The index that has been given to the stream socket.
-   * @param aBuffer Data received from the socket.
-   */
-  virtual void ReceiveSocketData(JSContext* aCx,
-                                 int aIndex,
-                                 nsAutoPtr<UnixSocketBuffer>& aBuffer) = 0;
-
-  /**
-   * Callback for socket success. Consumer-thread only.
-   *
-   * @param aIndex The index that has been given to the stream socket.
-   */
-  virtual void OnConnectSuccess(int aIndex) = 0;
-
-  /**
-   * Callback for socket errors. Consumer-thread only.
-   *
-   * @param aIndex The index that has been given to the stream socket.
-   */
-  virtual void OnConnectError(int aIndex) = 0;
-
-  /**
-   * Callback for socket disconnect. Consumer-thread only.
-   *
-   * @param aIndex The index that has been given to the stream socket.
-   */
-  virtual void OnDisconnect(int aIndex) = 0;
-
-protected:
-  virtual ~RilSocketConsumer();
-};
-
-}
-}
-
-#endif
--- a/ipc/ril/moz.build
+++ b/ipc/ril/moz.build
@@ -1,24 +1,20 @@
 # -*- Mode: python; c-basic-offset: 4; 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/.
 
 EXPORTS.mozilla.ipc += [
     'Ril.h',
-    'RilSocket.h',
-    'RilSocketConsumer.h'
 ]
 
 SOURCES += [
     'Ril.cpp',
-    'RilConnector.cpp',
-    'RilSocket.cpp',
-    'RilSocketConsumer.cpp'
+    'RilConnector.cpp'
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 FAIL_ON_WARNINGS = True
--- a/mobile/android/base/AndroidManifest.xml.in
+++ b/mobile/android/base/AndroidManifest.xml.in
@@ -236,16 +236,20 @@
 
             <!-- For debugging -->
             <intent-filter>
                 <action android:name="org.mozilla.gecko.DEBUG" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity-alias>
 
+        <activity android:name="org.mozilla.gecko.trackingprotection.TrackingProtectionPrompt"
+                  android:launchMode="singleTop"
+                  android:theme="@style/OverlayActivity" />
+
 #ifdef MOZ_ANDROID_TAB_QUEUE
         <!-- The main reason for the Tab Queue build flag is to not mess with the VIEW intent filter
              before the rest of the plumbing is in place -->
 
         <service android:name="org.mozilla.gecko.tabqueue.TabQueueService" />
 
         <activity android:name="org.mozilla.gecko.tabqueue.TabQueuePrompt"
                   android:launchMode="singleTop"
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -1,17 +1,15 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
  * 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/. */
 
 package org.mozilla.gecko;
 
-import com.nineoldandroids.animation.Animator;
-import com.nineoldandroids.animation.ObjectAnimator;
 import org.mozilla.gecko.AppConstants.Versions;
 import org.mozilla.gecko.DynamicToolbar.PinReason;
 import org.mozilla.gecko.DynamicToolbar.VisibilityTransition;
 import org.mozilla.gecko.GeckoProfileDirectories.NoMozillaDirectoryException;
 import org.mozilla.gecko.Tabs.TabEvents;
 import org.mozilla.gecko.animation.PropertyAnimator;
 import org.mozilla.gecko.animation.TransitionsTracker;
 import org.mozilla.gecko.animation.ViewHelper;
@@ -66,16 +64,17 @@ import org.mozilla.gecko.tabs.TabHistory
 import org.mozilla.gecko.tabs.TabHistoryController.OnShowTabHistory;
 import org.mozilla.gecko.tabs.TabHistoryFragment;
 import org.mozilla.gecko.tabs.TabHistoryPage;
 import org.mozilla.gecko.tabs.TabsPanel;
 import org.mozilla.gecko.toolbar.AutocompleteHandler;
 import org.mozilla.gecko.toolbar.BrowserToolbar;
 import org.mozilla.gecko.toolbar.BrowserToolbar.TabEditingState;
 import org.mozilla.gecko.toolbar.ToolbarProgressView;
+import org.mozilla.gecko.trackingprotection.TrackingProtectionPrompt;
 import org.mozilla.gecko.util.ActivityUtils;
 import org.mozilla.gecko.util.Clipboard;
 import org.mozilla.gecko.util.EventCallback;
 import org.mozilla.gecko.util.GamepadUtils;
 import org.mozilla.gecko.util.GeckoEventListener;
 import org.mozilla.gecko.util.HardwareUtils;
 import org.mozilla.gecko.util.MenuUtils;
 import org.mozilla.gecko.util.NativeEventListener;
@@ -134,16 +133,18 @@ import android.view.ViewStub;
 import android.view.ViewTreeObserver;
 import android.view.Window;
 import android.view.animation.Interpolator;
 import android.widget.Button;
 import android.widget.ListView;
 import android.widget.RelativeLayout;
 import android.widget.Toast;
 import android.widget.ViewFlipper;
+import com.nineoldandroids.animation.Animator;
+import com.nineoldandroids.animation.ObjectAnimator;
 import org.json.JSONException;
 import org.json.JSONObject;
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.lang.reflect.Method;
@@ -2051,16 +2052,32 @@ public class BrowserApp extends GeckoApp
     @Override
     public void addTab() {
         Tabs.getInstance().addTab();
     }
 
     @Override
     public void addPrivateTab() {
         Tabs.getInstance().addPrivateTab();
+
+        showTrackingProtectionPromptIfApplicable();
+    }
+
+    private void showTrackingProtectionPromptIfApplicable() {
+        final SharedPreferences prefs = getSharedPreferences();
+
+        final boolean hasTrackingProtectionPromptBeShownBefore = prefs.getBoolean(GeckoPreferences.PREFS_TRACKING_PROTECTION_PROMPT_SHOWN, false);
+
+        if (hasTrackingProtectionPromptBeShownBefore) {
+            return;
+        }
+
+        prefs.edit().putBoolean(GeckoPreferences.PREFS_TRACKING_PROTECTION_PROMPT_SHOWN, true).apply();
+
+        startActivity(new Intent(BrowserApp.this, TrackingProtectionPrompt.class));
     }
 
     @Override
     public void showNormalTabs() {
         showTabs(TabsPanel.Panel.NORMAL_TABS);
     }
 
     @Override
--- a/mobile/android/base/RestrictedProfiles.java
+++ b/mobile/android/base/RestrictedProfiles.java
@@ -190,17 +190,25 @@ public class RestrictedProfiles {
         if (getInGuest()) {
             return true;
         }
 
         if (Versions.preJBMR2) {
             return false;
         }
 
-        return !getRestrictions(context).isEmpty();
+        Bundle restrictions = getRestrictions(context);
+        for (String key : restrictions.keySet()) {
+            if (restrictions.getBoolean(key)) {
+                // At least one restriction is enabled -> We are a restricted profile
+                return true;
+            }
+        }
+
+        return false;
     }
 
     public static boolean isAllowed(final Context context, final Restriction action) {
         return isAllowed(context, action, null);
     }
 
     @WrapElementForJNI
     public static boolean isAllowed(int action, String url) {
--- a/mobile/android/base/locales/en-US/android_strings.dtd
+++ b/mobile/android/base/locales/en-US/android_strings.dtd
@@ -194,16 +194,21 @@
 <!ENTITY pref_cookies_not_accept_foreign "Enabled, excluding 3rd party">
 <!ENTITY pref_cookies_disabled "Disabled">
 
 <!ENTITY pref_tracking_protection_title "Tracking protection">
 <!ENTITY pref_tracking_protection_summary2 "Actively block tracking elements in Private Browsing">
 <!ENTITY pref_donottrack_title "Do not track">
 <!ENTITY pref_donottrack_summary "&brandShortName; will tell sites that you do not want to be tracked">
 
+<!ENTITY tracking_protection_prompt_title "Now with Tracking Protection">
+<!ENTITY tracking_protection_prompt_text "Actively block tracking elements so you don\'t have to worry.">
+<!ENTITY tracking_protection_prompt_tip_text "Visit Privacy settings to learn more">
+<!ENTITY tracking_protection_prompt_action_button "Got it!">
+
 <!ENTITY tab_queue_toast_message3 "Tab saved in &brandShortName;">
 <!ENTITY tab_queue_toast_action "Open now">
 <!ENTITY tab_queue_prompt_title "Opening multiple links?">
 <!ENTITY tab_queue_prompt_text4 "Save them until the next time you open &brandShortName;.">
 <!ENTITY tab_queue_prompt_tip_text2 "You can change this later in Settings">
 <!ENTITY tab_queue_prompt_positive_action_button "Enable">
 <!ENTITY tab_queue_prompt_negative_action_button "Not now">
 <!ENTITY tab_queue_notification_title "&brandShortName;">
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -484,16 +484,17 @@ gbjar.sources += [
     'toolbar/SiteIdentityPopup.java',
     'toolbar/TabCounter.java',
     'toolbar/ToolbarDisplayLayout.java',
     'toolbar/ToolbarEditLayout.java',
     'toolbar/ToolbarEditText.java',
     'toolbar/ToolbarPrefs.java',
     'toolbar/ToolbarProgressView.java',
     'TouchEventInterceptor.java',
+    'trackingprotection/TrackingProtectionPrompt.java',
     'updater/UpdateService.java',
     'updater/UpdateServiceHelper.java',
     'Webapp.java',
     'webapp/Allocator.java',
     'webapp/ApkResources.java',
     'webapp/Dispatcher.java',
     'webapp/EventListener.java',
     'webapp/InstallHelper.java',
--- a/mobile/android/base/preferences/GeckoPreferences.java
+++ b/mobile/android/base/preferences/GeckoPreferences.java
@@ -95,16 +95,17 @@ OnSharedPreferenceChangeListener
 
     // We have a white background, which makes transitions on
     // some devices look bad. Don't use transitions on those
     // devices.
     private static final boolean NO_TRANSITIONS = HardwareUtils.IS_KINDLE_DEVICE;
 
     public static final String NON_PREF_PREFIX = "android.not_a_preference.";
     public static final String INTENT_EXTRA_RESOURCES = "resource";
+    public static final String PREFS_TRACKING_PROTECTION_PROMPT_SHOWN = NON_PREF_PREFIX + "trackingProtectionPromptShown";
     public static String PREFS_HEALTHREPORT_UPLOAD_ENABLED = NON_PREF_PREFIX + "healthreport.uploadEnabled";
 
     private static boolean sIsCharEncodingEnabled;
     private boolean mInitialized;
     private int mPrefsRequestId;
     private PanelsPreferenceCategory mPanelsPreferenceCategory;
 
     // These match keys in resources/xml*/preferences*.xml
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ff6fb6d8078cd4f2930f6000644f3fa82045dd7a
GIT binary patch
literal 1508
zc$@*`1snQ_P)<h;3K|Lk000e1NJLTq001-q002A)1^@s6DJz+V000H6Nkl<ZcmdU0
z1CS(35UqdrZQHhO+qP}nwr%_WE@TbPwr$(C=A9-tqZhN+vr|_Q9XnCT_g*23tC9>0
z7cQ)AOlDVW{khuGqsG#=+EO!Z-B^71jX0zs5AvdnDs@PuQtMlrJ}k2SI&JB-$kKn>
zQ1{5V*|~3Ff!}PDg$>w(P1puT(zU&c_kIUWbcS~R{>ahi+E9bY&<GHzi4R!71U5K;
z3pjyWRcd{+$hgO~p+9n8M{V777!C0QH*f@3a0Yk9gE4e*E@4JuwQ5~GZRulU=q_th
zCpgz|Q-I<(;*f?s3AXkOXix|d(IL5r`GwUGEzpJrM%JZ_qjwF_&CaEds#~}22CBe-
zGAIihumzj24U7Us&4(7Ht+N$mnim=Bt*wh9=U+F5u0<i|+O4gM9Do5VU;-N)zy+Kt
z=!#b5evB3g?^)|FC!&43ckjOXijk_jy|w-Vv_Miq!3o^J5nKiL(MqbU4oJg>4Oaz-
zL2UxWy84l&@yzavsz^cdS2Cg!mk9FfYNDgHrMtCt-)KW^wWXQy-JrOFz_lPj-uo?$
z@n;(2o{B8}g+5&IU=34HE!mv%3rJ9{I6?DQVnMZ~>sH#*Tpr06i?Vx#FNo$SIiTCM
zYquI}p?M(-0#}X$Ef6$~N499uVl5_UcF2OjRS22}L6dnT+%gk1BV<9~Dg;f2pb0#Z
zh&EzlXmZGcz?I`*G6(6AJkpqYTd)=y7qTF5<v7rS#pz%kiS-w2p<y8l0#}X$ElL~L
zi${9zcVFH@mih$ULh1A#90yt;r~{8QsnkJvL9Ttsg1}V>>HyMB%LwxRcqXV($b!I?
z<3NkjhNz4nqVrjo(;*AOUW?;E3rPPWT;DCsDSR2SAnp9Eg8MHZ{SJ>b&cDFi_KP74
z0#}X$Er@(rG~3s#2JQ)25H^?`2U?VNsVjs^&-&=)VGAP9alls@lR8H9!%lfYsgpw%
z1g;zhT2z!y?<l~>iHR#*L1JkJEea<#*ckDIOeVAO($(ym*yM#M2pr|+4qBEqT@Rj!
zQ=NP*(1;KP$)N%b`N3uAe>oSiw7MY*0!NMk4cuG2T84n5PgvSJAqoOVjsXqJ6S3S8
zYohin?aB}Zfn)5F4FT63LhamaHoFeea(_36V+ctQxXA+?Xb>)tdY2L9+}Ug#bqq-m
zxN-a79yjZLESErR06rL!AaD~q)sJKzxhg=WQOgb;qlOJP#5G_Dg1`yf#P~TW_DTe&
zCUT(hS_wgr+yj9#xW{HTmOc>PF1tL<r1uX&5IAw$;9TLM1NUeezr8<@E!Y1nr66#T
z{BWpK*?`N)?F3stZH2?fk_oad#qEM?70$Zc;gXPZsneOqyRQ_2z(Lx@i<7GE1S8?+
zhvNEu`6ZL3b~Pyo*x(?%a8zXjcvK{=SzzF2_UdF8xXzjq1Z;V20*(b4!M&;^rk%Se
z-vu%UV>}gG5HO`ZaI4l;y*yQoERD&v&bHj^V82u>LBIm0JRJo$Rh<Br7#TNJbiK~}
z=@$;nwV_r?3j&5V)J52t3QjA!5WHRz#HJ71bKaW9(aX5;OF|HA$89XZC8^`0_oZ>X
zPOMk2-X_wS;5`GD_SF>xo3JhMz#-8G4j?K)ux!VZn7Dfz<NRAVl_^A!_I^LulsLc!
zhoqlnuAvPzj;Xm>c!Y=fDbBIrja=?Kvho!)JrUbwt!o7A<dle=B0EqKz|<8FV+*y3
zGTORsaW;Vk%wlMf?`vLRz*1N{3|<WEiUvLMRJ7uNlS!tV6|gVS#tpCF)#GGbZ&>TE
za?Wjo55Ezojhj+lIoO14Rf=GmHCqqc--KSA%!4i1RHY6?v{&TlM;yl%Dg<Rv7B*C9
zL1(kuEtz1cUloM(Ltd0oD?>2eAF3@q9a*Zg>|X`&8*xZ07VaXC3we$MK2xXw0000<
KMNUMnLSTYnU%0OT
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c95a4876e1317196132a14cbf8277aba60764b0b
GIT binary patch
literal 2097
zc$@(-2+sG3P)<h;3K|Lk000e1NJLTq002e+002-31^@s6q@e=>000O0Nkl<Zcmds9
z1C(XE63xT6ZQHhO+qP}nw(Xx%F5a7&#@I8@wrz8No|UPzuCvz~_U%5&K9zDM3>)2U
z_iEf~-A5$7gv34*#r{H~+ez#!5<Mh}wn*%oB<W2etw%90yHThKs(Q1i?Z=VWTS@G@
zQEWG2J%Yq8iL93{<`=P^N}_8?>{q1e!%<t$R_)$-)22;V2;+!Wt92zayE~~qpEZ3v
ziv5n*HWKR@*wCPVk=TXAx*xGIYx)XldW~xPA!c@+VG(cxGJ6E8z9F)HgV-#x9TZtF
z#sbIkm)Hr!HcM<jWlirT)u)=-Z7;p_(w)On00JWG2TAmoQFKidI~fnE<rj&a7sd7@
zw!cNz&yluXv}VnktArAmTMr}FEkj)7MN#a4C`M7!7jX=rKX4qQ*d{3B;gO{$LaIUz
z($+Ib?A!r8`27F8p})ck;SEtr_key1bKr83-zm1+w-#wVC9=Jb#eNP6h9VxIH2oOQ
z4S?#@^&{J9ePI1;NF1^Kp2R*%s?Xte`%Y6+Q@e&fqtof!1Qsufy(6mqFp5q`*5ms^
zj;5CefYrXfm~RA$FrAU@7bNz6C^eDpZNPLGF_tY`c0GcQ6nkUj^li8Zk?qJuzTm^L
zmjLrxI(Ni2L##g{P46VL$HO-X69`_l>Kdy0z$od}#QN1Js!{CVl2yeK4w3a7=d67w
z3<!7|%$?ga+Y3nS3;*$Sj}0RL%(q7jn>{UfU%;aK<p4&r`$e(WMYZpd*s92SruWP+
z8kG0nFJj<rve{!u(tC*0Z-{LVc&4tX)=G@(?za?4&tgrVitt0k4l8fEVq#z#{}T$V
zAhA>Y&DBE;V!z-;yCUg@p#eB&&9B!&3=DxEXQk%_&t$<n4Gkb?QYkSz7f#G`Lu9+a
zk(if+21xYJl@hayw-)HnfEdYhi?gHjry7YtqN_m6(}NquN_s^mF@LC$n5n6$EBnN>
zo&sV{cZhj)M$B((BnJ6sZ!M~=CkD^_lBU;(2BO-pD<lS<`8B<@z&!~F7V|H#rZ;C2
z^RpU>K{W0YqmK><;GBHvJ2Hv+VU5J3ly2-FrS`*v@6Ox%GKu+4jl>|d@s)4;0U+jp
z9UUC~NN4~#j2ekS`ootPy%&htb4MLxpA8M*-!&40+_O(i_s$`TZg47pUkwc)dtW0l
zI5OT^QcAZ1G1E>4?+00|^o|;df%Wm$f&wF~Qp&%8L{n%04quJL!1ec!(x$7raS(~d
z&;UvyH4=lE&?^K607a(!i>MBS1~{ch)@haW?T!z3@_&i>vh&4#vV87cY9t1gQD^T5
z|5vfT+flx!=XIGHi9y+SM`CnM0FadO778*l@AvHLB!;cysF8opsXyT4WW*d^88NPN
zi~84pL+{%ak~NRbe#oZkh;e#<;LMh@SY8$nVpkC{3)**NJ;`Uz&*IfUOzEVcn%dm-
z_Ibks*3Z>LOgS7#Dc!Mo*2wXGmu2Vibu|%#K4NDb7vqRECFV<x#2n?6X{#XyjYUp^
z?x4&ywpY#P%b=O28e+;mjOAV24=kqm8g*WH#FY@^rgTZ{YYQqPpy4@Vd8P(p(97dB
zGeD1e3?ASx_^UiAUIQ^`s4V7sbNEFy+doU}ys!#l#6It&bI(AL-;<a(`YcXeztLZN
zU6`~<Ck72rj^f?DbnfoHknSq9zfLkSNLv;<RX<bgE+Wz697pdDnHYX-l8Gs$X)!c5
zmx%q;>jZBOOrf*@jXtTwAkptU|0L*_MQdv^dr~GfQ<F#xUa*&H$gHp5u<SJ`ljz?w
zPx-l%NDO)li>+nz0ql7rc9<h*HuaI{z7t0b+pKqtAP`F^Tl)2EQhnv55aZXW{c>~x
zWs^+kyqcQ2c2jCFpEMc7_`S+7A{ev?3q`RctLcmR{NyAMquRMINN|Wri_M4bN}>mP
zQ*4+n%ihHA$DNoc+AU`f7Ku{530>k&AKUTcN(|-#eBEOITymeimkY)(443*3A1`8{
z6Wty|){8|tcMD4eGUon9?8x1B-~C!y*VWg@ju^II6sBc=Fn}NKA1O!}W~Rr5n35DD
zmyN_+KSp`4>*x@-Q5r5ciN;YAgLtkupRKKDhkgO`JEd7`TzQgDbU;)`MGUSZh+^vt
z>;3Z}vR*$f=$m8EFY6q^_hIB`n8d*8gtaM<atQR|Kx(}h04<oly<q{o@B;qOu!t$=
zr0oJ!Lc*Xxt=3&J##10?HT01;;qjk>-uZ(hX6{~OdtVqdka8#`s&L5-t}`fhVT=6{
z&42wQ1`2<!=@>jS3=0@5p5yHwPi7CDtIGf)pC^o#Iz56Kduc5QhM|my-Prftx$cI+
z^#ptGz4sO8N{S&tgbRF76<kV>Ztm4)%62bQI7Tv>iwiO4xejStzm*=kwn64x&xJ9-
z$W0g}aAkp~H?oEPO;zvE`<R}6BEJ~SOC|W8?Fhh}o}6FK<E2O8U_t*Z_S!g94!ub{
zuP6^+CX5r%<>}{v{Ue5}SV|TQ?I&nwCpHG53%cz{^_5{<0fkCppTx~!{w91Aj}QWJ
z7km+PR4m40j-ra#C`<yNPf!aUY&W?biK=3lL}0KR63}l#pzxuL!=wWWH;PfFFBbPp
zY)>|OZRQ(Q0hrtyVp@*a)_GxtFCF%^n9{vNwQw9YB;3(RKx|vlnn7%bMzMde>bv}$
b?C@|I1-Y6kJ3lf`00000NkvXXu0mjfZYB3@
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..edf20af1178d65921e7ea29bc086cef5443d64d6
GIT binary patch
literal 2789
zc$_U&2|SeR7apdCA_{}sN=ib>C}kO8h9+fSDkV#Xrc03#k-9~fh7e_oZWEGieDlr1
zP)e4mP=m2=iOIEAxc+1Pf8RI#e($_<-t#`^oaZ_3ncu|O+gi(R_+tYKg_0$nz&k?U
z{?I2(3JvXAiq=vnlw_^_DQ5z7qyu1eb@l4%Y8eAIpko<>Syfd99ihcwRDdAJX0z!4
z6Y`61=@1OIS<tbfq5=Sz3<j$VV8Th5Fbp=J5C#$gB0B?wW07zWY=o}>kPby57yw|G
ziElv&zyfM(0gy#!v7pQllEq@tVKU6}@^To=gi14!4DbTMaykgpqjNYA&oY1oGl$ti
z#5r(6c(KGx#8LJ2^)Mb0j&Nf(HbRs@sE{}(<Piu2a5<38U~tMRD(Fl^0wNQHNrC`S
zjwph(Lk8>wI2_o|LPS9onM^SaL~=FE?ROxY3KGbKbBY(z9OMY&A?<K`nMiZs_Lqrm
zq(zV)fMr6_aDD&)0mg5nxcN|i08vUuv_N$Mfb$ywT|iZ!wjlChN(em$1Cq%G;BZJI
z^LIkA5TwL!KbH#|Fg*}{1rW{#2?4=MC|pb%nHlIgV0>j|rC2WlhL9lgj&O?rxD{|L
zv?C)_1#?DNA%g+uf%$-J@u-Lg4B7#t3iPrpcs$?<d~M@p2hH(#h@-6&YFS2Ne9h8|
z!W>O)>-vR7(X4!T(#%H3Q!gd)-_iT8&8Nh?Pe_Z}P||r}>VL)~znp_)Z|hwi+gX28
z^{08);G56-_CI#*e%@BpbL^x;AoYolK)UxoDe|ke6?<FCGuCZ!JG>qH+UebqQH_ZK
zZQ&lxWP^}%Muo*3#Z4X!=RyC?AIjd|vHtSaE8tr-->T-X>7ndHb?Tq~e9Fo(O?QcZ
zajSIOfyeY_9m~ppm9mB{%)ATo6CdeD<c9y<{zujQCfnm$lpROICi{t@jdC3qZT@j*
z=iz)G#>HZk?_R%`+Q&F^n)|?&XBXURqH@BxZE6vPS~o((n>&X|u+q_~8ckbbuJ-u!
zu>C^Y*#SN5*NZ*u0J9$U@=#|K@A{RM?j0^S{BB!sPNsana>;j26^~zOFTOROW|W;b
zKmDmYGcoL1NWf{LU|8c&vOz^*E@{%izlI;~Bb?wH``U*-%rTv@dWq&cb+PjgN5tFd
zeBGMT$IUO<lFV=I$zgk^TC3M%$%JzeSLN>ex|owVtBq1|$(#L_`ZCrQ>B;vm90P6h
zxrE(QZ7HCzEy7D(6SNt!awBcxO_70<{r86m^w+a3SEvsRhvQrdZ&(81S$TBPwXUaV
zExqJmPungp8+TF<301BcUY@uxvHtKlR!>TG{0i=<ac^2yq}&}XeN@$)Tt8cwEw3Yg
z)2}IDefTw*TE%}n*1esdi0H$HR?4fD_F=gL5$&32`$Xfj$v+!*_8OWF9+x>P**b3;
z7FpF>ldYmvTk$HA6e!;<C2ZCi7*^EZ@}ZdFDbdiL|7d-vx+Eih5~Zec|4U~F)uuK4
z@){{X-Do+chS;GHQ)@jt@_Bzw*8vTjddGFmk4GX;pNPc&ho*YG;hcc1)rEOC<wT}5
zfB&zt!E}G+a8I8Rd!NKWhfP>E&LJuiFKR4L=6%c)9_dq8#!8>?X6?t(TpHWFB#M$U
zD=AcqMxEpOMJEs2wdfX37&~u0%PI&@4s_UvO(^hvOcUbzXo@5<|J}zTVFH)nK{85e
z7*i%kRR;18W^~0FpIIxYvgGXJHE!>0Cg0689L20n7a3VG&gBc!La0v;IVFq~hZcyO
z`)J!6bs9Kl`tpP+6zY_>&?5v`c#wI!(A^**qcSMLg`PQ3;@<YD(SIpPVA!_g(?|Qa
z(d3S0F{wZ_O`+;%WJsD7DUet4107_sQN@=8rNV>b7#4O$FY4o%4SA&?kZ+iwWvN|s
z@s;Qsmr(7MFBwxDRV1AM7h~FVO6>sn(RIdb6yuA%u8KXgOl*4Ap?mZB^wcZA!){I0
z1?~oE8R&E#IXaUwib?P!sq05yDu`KolMvc^(a!KGc|_?ott37-D~B>i_O0;Xo2h1O
z7~DIaKpuJO;h?bFP-5GqTZ9swc5QAA&m46X$jNi<Z`aPO<GG_U&mMHuo*q-uCFQEV
zwQ9dW9!dA$2eqy{^U27r#3a`(wSjjIRTR@H;hF84e1S)vnVvj?;t{`Sk$q^El&nru
z8dqdQNYn#}6zwk7uk#)I$i72f0wqQkjcbrivpl6(I3-y*T`*N?L=c=hZ+}74nA06<
zcUh6unLg@V;$zbDUBZ)?jdM7F{<hs-$9J`S3@6Ym^z^*k*?+Xr$0f^uEn3NI`bX&8
zCXg8yT#rrKx{^I<-(Yq30RMVbf4gLGa>}Cf4W~3-*w}^WcYoUAgu96;{%HDb?!fAt
zf*txT{xnSxSG5wMcP72rA%Sc&7aQ;AzfiN{=lFOmie^0<Et1)zdDO=B<rfY$Bz6Ml
zv4U>>5u*P0%l{32*=6J#`BQ6`(8<4IY%lk4>`KtM$TBn9B)5B_lVFBvS%WQI_i(^|
z(g~pU57x;Z=&cEFRxol|Bo))7>&-)VM6XGh{BcWA>MsAn{}G^cSL($BZMNi__vv`!
z`0ESuHC@`nssdM!1Y(FQum7*WOZul-&+61O_vUU`*3#>rq@<1AR(#E)^evgrzCSp8
zOK|gI{JGgTNko;{JHT#g=+C_m9hpVEayLnpq-W9<Li^<x{J3o$(M#LV*sE`nsx9~I
zpq`w)qBiqgcK)8-qxPbx4`27;$5Wz*H{CY-<Xkz1<*H-4UT&&Ti0#m-l_QLNI6;U~
zvpsm<^QnrWMRK*izQc2s`1eVQ8v)<omH_JU)XNHv@z13bHai+5yy!1_LTG&u9WU*r
z@+5C#(A1DW<uQR@8eq|qc6Q;ImCz2=HQ-4w_<F<pnha*2@;%)MbA8;at**=)RF%~C
z8*G~6%!4s9ds91Pbr)XP$u#T!wddiV%IF)$3!|bLwi=$=>s_`irQ<l5id)jk*A=BH
zNu#Nbry6J=>dEDz$GFn|J8`MYD-NR#F>bku-AC|mg;t`cU7<2@7Xo(bdt=qTi@Pl}
zrc*cG8zO&B`P`+C*}SCy1N|Jl<ue`Y@D$YMZ`*ZA_2)feqjVydY3Zty1jXUBu-bS~
zL;k;fv!Dm6c0?S_=jPw?zdD4JUE`UbrPL1ETDNWc@Z_2>f4StP-}&zI(wd7>-d??X
zfZDvE*yL~}oGRvGok?x8bsa@tgHpHCT<#syN;S2fxob9vDY8^elFLf8!1{dpLnHn^
z1BhLJj6QWJ+wfI{N0a$dSnz62OLupR>Ebi|r6pyPs}tUSqtD`@|9KRVV2dxc@Vxtf
DKlAVv
--- a/mobile/android/base/resources/layout/tab_queue_prompt.xml
+++ b/mobile/android/base/resources/layout/tab_queue_prompt.xml
@@ -9,53 +9,53 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:clipChildren="false"
     android:clipToPadding="false">
 
     <LinearLayout
         android:id="@+id/tab_queue_container"
-        android:layout_width="@dimen/tab_queue_container_width"
+        android:layout_width="@dimen/overlay_prompt_container_width"
         android:layout_height="wrap_content"
         android:layout_gravity="bottom|center"
         android:background="@android:color/white"
         android:orientation="vertical">
 
         <TextView
             android:id="@+id/title"
-            android:layout_width="@dimen/tab_queue_content_width"
+            android:layout_width="@dimen/overlay_prompt_content_width"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
             android:fontFamily="sans-serif-light"
             android:gravity="center_horizontal"
             android:paddingTop="40dp"
             android:text="@string/tab_queue_prompt_title"
             android:textColor="@color/text_and_tabs_tray_grey"
             android:textSize="20sp"
 
             tools:text="Opening multiple links?" />
 
         <TextView
             android:id="@+id/text"
-            android:layout_width="@dimen/tab_queue_content_width"
+            android:layout_width="@dimen/overlay_prompt_content_width"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
             android:gravity="center"
             android:lineSpacingMultiplier="1.25"
             android:paddingTop="20dp"
             android:text="@string/tab_queue_prompt_text"
             android:textColor="@color/placeholder_grey"
             android:textSize="16sp"
 
             tools:text="Save them until the next time you open Firefox." />
 
         <TextView
             android:id="@+id/tip_text"
-            android:layout_width="@dimen/tab_queue_content_width"
+            android:layout_width="@dimen/overlay_prompt_content_width"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
             android:gravity="center"
             android:paddingBottom="30dp"
             android:paddingTop="20dp"
             android:text="@string/tab_queue_prompt_tip_text"
             android:textColor="@color/action_orange"
             android:textSize="14sp"
@@ -83,30 +83,30 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:gravity="center_horizontal"
                 android:orientation="horizontal">
 
                 <TextView
                     android:id="@+id/cancel_button"
                     style="@style/Widget.BaseButton"
-                    android:layout_width="@dimen/tab_queue_button_width"
+                    android:layout_width="@dimen/overlay_prompt_button_width"
                     android:layout_height="match_parent"
                     android:layout_gravity="center"
                     android:background="@color/android:white"
                     android:text="@string/tab_queue_prompt_negative_action_button"
                     android:textColor="@drawable/tab_queue_dismiss_button_foreground"
                     android:textSize="16sp"
 
                     tools:text="Not now" />
 
                 <Button
                     android:id="@+id/ok_button"
                     style="@style/Widget.BaseButton"
-                    android:layout_width="@dimen/tab_queue_button_width"
+                    android:layout_width="@dimen/overlay_prompt_button_width"
                     android:layout_height="match_parent"
                     android:layout_gravity="center"
                     android:background="@drawable/button_background_action_orange_round"
                     android:text="@string/tab_queue_prompt_positive_action_button"
                     android:textColor="@android:color/white"
                     android:textSize="16sp"
 
                     tools:text="Enable" />
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/layout/tracking_protection_prompt.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<merge
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        xmlns:tools="http://schemas.android.com/tools"
+        android:id="@+id/tracking_protection_container"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:clipChildren="false"
+        android:clipToPadding="false">
+
+    <LinearLayout
+            android:id="@+id/tracking_protection_inner_container"
+            android:layout_width="@dimen/overlay_prompt_container_width"
+            android:layout_height="wrap_content"
+            android:layout_gravity="bottom|center"
+            android:background="@android:color/white"
+            android:orientation="vertical">
+
+        <ImageView android:layout_width="wrap_content"
+                   android:layout_height="wrap_content"
+                   android:src="@drawable/ic_tracking_protection"
+                   android:layout_gravity="center"
+                   android:layout_marginTop="40dp"
+                   android:layout_marginBottom="20dp" />
+
+        <TextView
+                android:id="@+id/title"
+                android:layout_width="@dimen/overlay_prompt_content_width"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:fontFamily="sans-serif-light"
+                android:gravity="center_horizontal"
+                android:text="@string/tracking_protection_prompt_title"
+                android:textColor="@color/text_and_tabs_tray_grey"
+                android:textSize="20sp"
+
+                tools:text="Now with Tracking Protection"/>
+
+        <TextView
+                android:id="@+id/text"
+                android:layout_width="@dimen/overlay_prompt_content_width"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:gravity="center"
+                android:lineSpacingMultiplier="1.25"
+                android:paddingTop="20dp"
+                android:text="@string/tracking_protection_prompt_text"
+                android:textColor="@color/placeholder_grey"
+                android:textSize="16sp"
+
+                tools:text="Actively block tracking elements so you don't have to worry."/>
+
+        <TextView
+                android:id="@+id/link_text"
+                android:layout_width="@dimen/overlay_prompt_content_width"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:gravity="center"
+                android:paddingBottom="30dp"
+                android:paddingTop="20dp"
+                android:text="@string/tracking_protection_prompt_tip_text"
+                android:textColor="@color/link_blue"
+                android:textSize="14sp"
+
+                tools:text="Visit Privacy settings to learn more"/>
+
+
+        <Button
+                android:id="@+id/ok_button"
+                style="@style/Widget.BaseButton"
+                android:layout_width="match_parent"
+
+                android:layout_height="52dp"
+                android:layout_gravity="center"
+                android:layout_marginBottom="40dp"
+                android:background="@drawable/button_background_action_orange_round"
+                android:text="@string/tracking_protection_prompt_action_button"
+                android:textColor="@android:color/white"
+                android:textSize="16sp"
+
+                android:layout_marginLeft="32dp"
+                android:layout_marginRight="32dp"
+                tools:text="Got it"/>
+
+    </LinearLayout>
+</merge>
--- a/mobile/android/base/resources/values-large-v11/dimens.xml
+++ b/mobile/android/base/resources/values-large-v11/dimens.xml
@@ -21,14 +21,14 @@
 
     <dimen name="tabs_panel_indicator_width">72dp</dimen>
     <dimen name="tabs_panel_button_width">60dp</dimen>
     <dimen name="panel_grid_view_column_width">200dp</dimen>
 
     <dimen name="reading_list_row_height">96dp</dimen>
     <dimen name="reading_list_row_padding_right">15dp</dimen>
 
-    <dimen name="tab_queue_container_width">360dp</dimen>
+    <dimen name="overlay_prompt_container_width">360dp</dimen>
 
     <!-- Should be closer to 0.83 (140/168) but various roundings mean that 0.9 works better -->
     <item name="thumbnail_aspect_ratio" format="float" type="dimen">0.9</item>
 
 </resources>
--- a/mobile/android/base/resources/values/dimens.xml
+++ b/mobile/android/base/resources/values/dimens.xml
@@ -51,19 +51,19 @@
          commonly-used size of favicon and, performance permitting, fetch the remainder from the
          database. The largest available size is always stored in the database, regardless of this
          value.-->
     <dimen name="favicon_largest_interesting_size">32dp</dimen>
 
     <dimen name="firstrun_content_width">300dp</dimen>
     <dimen name="firstrun_min_height">180dp</dimen>
 
-    <dimen name="tab_queue_content_width">260dp</dimen>
-    <dimen name="tab_queue_button_width">148dp</dimen>
-    <dimen name="tab_queue_container_width">@dimen/match_parent</dimen>
+    <dimen name="overlay_prompt_content_width">260dp</dimen>
+    <dimen name="overlay_prompt_button_width">148dp</dimen>
+    <dimen name="overlay_prompt_container_width">@dimen/match_parent</dimen>
 
     <!-- Site security icon -->
     <dimen name="browser_toolbar_site_security_height">@dimen/match_parent</dimen>
     <dimen name="browser_toolbar_site_security_width">12dp</dimen>
     <dimen name="browser_toolbar_site_security_margin_right">4dp</dimen>
     <dimen name="browser_toolbar_site_security_padding_vertical">0dp</dimen>
     <dimen name="browser_toolbar_site_security_padding_horizontal">0dp</dimen>
 
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -245,16 +245,21 @@
   <string name="pref_private_data_syncedTabs">&pref_private_data_syncedTabs;</string>
   <string name="pref_import_android">&pref_import_android;</string>
   <string name="pref_import_android_summary">&pref_import_android_summary;</string>
   <string name="pref_update_autodownload">&pref_update_autodownload2;</string>
   <string name="pref_update_autodownload_wifi">&pref_update_autodownload_wifi;</string>
   <string name="pref_update_autodownload_disabled">&pref_update_autodownload_never;</string>
   <string name="pref_update_autodownload_enabled">&pref_update_autodownload_always;</string>
 
+  <string name="tracking_protection_prompt_title">&tracking_protection_prompt_title;</string>
+  <string name="tracking_protection_prompt_text">&tracking_protection_prompt_text;</string>
+  <string name="tracking_protection_prompt_tip_text">&tracking_protection_prompt_tip_text;</string>
+  <string name="tracking_protection_prompt_action_button">&tracking_protection_prompt_action_button;</string>
+
   <string name="pref_tab_queue_title">&pref_tab_queue_title2;</string>
   <string name="pref_tab_queue_summary">&pref_tab_queue_summary3;</string>
   <string name="tab_queue_prompt_title">&tab_queue_prompt_title;</string>
   <string name="tab_queue_prompt_text">&tab_queue_prompt_text4;</string>
   <string name="tab_queue_prompt_tip_text">&tab_queue_prompt_tip_text2;</string>
   <string name="tab_queue_prompt_positive_action_button">&tab_queue_prompt_positive_action_button;</string>
   <string name="tab_queue_prompt_negative_action_button">&tab_queue_prompt_negative_action_button;</string>
   <string name="tab_queue_toast_message">&tab_queue_toast_message3;</string>
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/trackingprotection/TrackingProtectionPrompt.java
@@ -0,0 +1,134 @@
+/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
+ * 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/. */
+
+package org.mozilla.gecko.trackingprotection;
+
+import org.mozilla.gecko.Locales;
+import org.mozilla.gecko.R;
+import org.mozilla.gecko.animation.TransitionsTracker;
+import org.mozilla.gecko.preferences.GeckoPreferences;
+import org.mozilla.gecko.util.HardwareUtils;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.MotionEvent;
+import android.view.View;
+import com.nineoldandroids.animation.Animator;
+import com.nineoldandroids.animation.AnimatorListenerAdapter;
+import com.nineoldandroids.animation.AnimatorSet;
+import com.nineoldandroids.animation.ObjectAnimator;
+import com.nineoldandroids.view.ViewHelper;
+
+public class TrackingProtectionPrompt extends Locales.LocaleAwareActivity {
+        public static final String LOGTAG = "Gecko" + TrackingProtectionPrompt.class.getSimpleName();
+
+        // Flag set during animation to prevent animation multiple-start.
+        private boolean isAnimating;
+
+        private View containerView;
+
+        @Override
+        protected void onCreate(Bundle savedInstanceState) {
+            super.onCreate(savedInstanceState);
+
+            showPrompt();
+        }
+
+        private void showPrompt() {
+            setContentView(R.layout.tracking_protection_prompt);
+
+            findViewById(R.id.ok_button).setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    onConfirmButtonPressed();
+                }
+            });
+            findViewById(R.id.link_text).setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    slideOut();
+                    final Intent settingsIntent = new Intent(TrackingProtectionPrompt.this, GeckoPreferences.class);
+                    GeckoPreferences.setResourceToOpen(settingsIntent, "preferences_privacy");
+                    startActivity(settingsIntent);
+
+                    // Don't use a transition to settings if we're on a device where that
+                    // would look bad.
+                    if (HardwareUtils.IS_KINDLE_DEVICE) {
+                        overridePendingTransition(0, 0);
+                    }
+                }
+            });
+
+            containerView = findViewById(R.id.tracking_protection_inner_container);
+
+            ViewHelper.setTranslationY(containerView, 500);
+            ViewHelper.setAlpha(containerView, 0);
+
+            final Animator translateAnimator = ObjectAnimator.ofFloat(containerView, "translationY", 0);
+            translateAnimator.setDuration(400);
+
+            final Animator alphaAnimator = ObjectAnimator.ofFloat(containerView, "alpha", 1);
+            alphaAnimator.setStartDelay(200);
+            alphaAnimator.setDuration(600);
+
+            final AnimatorSet set = new AnimatorSet();
+            set.playTogether(alphaAnimator, translateAnimator);
+            set.setStartDelay(400);
+            TransitionsTracker.track(set);
+
+            set.start();
+        }
+
+        @Override
+        public void finish() {
+            super.finish();
+
+            // Don't perform an activity-dismiss animation.
+            overridePendingTransition(0, 0);
+        }
+
+        private void onConfirmButtonPressed() {
+            slideOut();
+        }
+
+        /**
+         * Slide the overlay down off the screen and destroy it.
+         */
+        private void slideOut() {
+            if (isAnimating) {
+                return;
+            }
+
+            isAnimating = true;
+
+            ObjectAnimator animator = ObjectAnimator.ofFloat(containerView, "translationY", containerView.getHeight());
+            animator.addListener(new AnimatorListenerAdapter() {
+
+                @Override
+                public void onAnimationEnd(Animator animation) {
+                    finish();
+                }
+
+            });
+            animator.start();
+        }
+
+        /**
+         * Close the dialog if back is pressed.
+         */
+        @Override
+        public void onBackPressed() {
+            slideOut();
+        }
+
+        /**
+         * Close the dialog if the anything that isn't a button is tapped.
+         */
+        @Override
+        public boolean onTouchEvent(MotionEvent event) {
+            slideOut();
+            return true;
+        }
+    }
--- a/mobile/android/tests/browser/robocop/PixelTest.java
+++ b/mobile/android/tests/browser/robocop/PixelTest.java
@@ -49,23 +49,30 @@ abstract class PixelTest extends BaseTes
     protected final void reloadAndPaint() {
         PaintedSurface painted = reloadAndGetPainted();
         painted.close();
     }
 
     public void addTab(String url, String title, boolean isPrivate) {
         Actions.EventExpecter tabEventExpecter = mActions.expectGeckoEvent("Tab:Added");
         Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded");
+
         if (isPrivate) {
             selectMenuItem(mStringHelper.NEW_PRIVATE_TAB_LABEL);
         } else {
             selectMenuItem(mStringHelper.NEW_TAB_LABEL);
         }
         tabEventExpecter.blockForEvent();
         contentEventExpecter.blockForEvent();
+
+        if (isPrivate) {
+            waitForText(mStringHelper.TRACKING_PROTECTION_PROMPT_TITLE);
+            mSolo.clickOnText(mStringHelper.TRACKING_PROTECTION_PROMPT_BUTTON);
+        }
+
         waitForText(mStringHelper.TITLE_PLACE_HOLDER);
         loadAndPaint(url);
         tabEventExpecter.unregisterListener();
         contentEventExpecter.unregisterListener();
     }
 
     protected final PaintedSurface waitForPaint(Actions.RepeatedEventExpecter expecter) {
         expecter.blockUntilClear(PAINT_CLEAR_DELAY);
--- a/mobile/android/tests/browser/robocop/StringHelper.java
+++ b/mobile/android/tests/browser/robocop/StringHelper.java
@@ -139,16 +139,18 @@ public class StringHelper {
     public final String PLUGINS_LABEL;
 
     // Title bar
     public final String SHOW_PAGE_TITLE_LABEL = "Show page title";
     public final String SHOW_PAGE_ADDRESS_LABEL = "Show page address";
 
     // Privacy
     public final String TRACKING_PROTECTION_LABEL;
+    public final String TRACKING_PROTECTION_PROMPT_TITLE;
+    public final String TRACKING_PROTECTION_PROMPT_BUTTON;
     public final String DNT_LABEL;
     public final String COOKIES_LABEL;
     public final String REMEMBER_LOGINS_LABEL;
     public final String MANAGE_LOGINS_LABEL;
     public final String MASTER_PASSWORD_LABEL;
     public final String CLEAR_PRIVATE_DATA_LABEL;
 
     // Mozilla
@@ -322,16 +324,18 @@ public class StringHelper {
         VOICE_INPUT_TITLE_LABEL = res.getString(R.string.pref_voice_input);
         VOICE_INPUT_SUMMARY_LABEL = res.getString(R.string.pref_voice_input_summary);
         TEXT_REFLOW_LABEL = res.getString(R.string.pref_reflow_on_zoom);
         CHARACTER_ENCODING_LABEL = res.getString(R.string.pref_char_encoding);
         PLUGINS_LABEL = res.getString(R.string.pref_plugins);
 
         // Privacy
         TRACKING_PROTECTION_LABEL = res.getString(R.string.pref_tracking_protection_title);
+        TRACKING_PROTECTION_PROMPT_TITLE = res.getString(R.string.tracking_protection_prompt_title);
+        TRACKING_PROTECTION_PROMPT_BUTTON = res.getString(R.string.tracking_protection_prompt_action_button);
         DNT_LABEL = res.getString(R.string.pref_donottrack_title);
         COOKIES_LABEL = res.getString(R.string.pref_cookies_menu);
         REMEMBER_LOGINS_LABEL = res.getString(R.string.pref_remember_signons);
         MANAGE_LOGINS_LABEL = res.getString(R.string.pref_manage_logins);
         MASTER_PASSWORD_LABEL = res.getString(R.string.pref_use_master_password);
         CLEAR_PRIVATE_DATA_LABEL = res.getString(R.string.pref_clear_private_data);
 
         // Mozilla
--- a/testing/mozharness/mozharness.json
+++ b/testing/mozharness/mozharness.json
@@ -1,4 +1,4 @@
 {
     "repo": "https://hg.mozilla.org/build/mozharness",
-    "revision": "4a31e6739409"
+    "revision": "94d72bb2ba9b"
 }
deleted file mode 100644
--- a/toolkit/devtools/server/actors/tracer.js
+++ /dev/null
@@ -1,709 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const { Cu } = require("chrome");
-const { DebuggerServer } = require("devtools/server/main");
-const { DevToolsUtils } = Cu.import("resource://gre/modules/devtools/DevToolsUtils.jsm", {});
-const Debugger = require("Debugger");
-const { GeneratedLocation, getOffsetColumn } = require("devtools/server/actors/common");
-const promise = require("promise");
-
-Cu.import("resource://gre/modules/Task.jsm");
-
-// TODO bug 943125: remove this polyfill and use Debugger.Frame.prototype.depth
-// once it is implemented.
-function getFrameDepth(frame) {
-  if (typeof(frame.depth) != "number") {
-    if (!frame.older) {
-      frame.depth = 0;
-    } else {
-      frame.depth = getFrameDepth(frame.older) + 1;
-    }
-  }
-
-  return frame.depth;
-}
-
-const { setTimeout } = require("sdk/timers");
-
-/**
- * The number of milliseconds we should buffer frame enter/exit packets before
- * sending.
- */
-const BUFFER_SEND_DELAY = 50;
-
-/**
- * The maximum number of arguments we will send for any single function call.
- */
-const MAX_ARGUMENTS = 3;
-
-/**
- * The maximum number of an object's properties we will serialize.
- */
-const MAX_PROPERTIES = 3;
-
-/**
- * The complete set of trace types supported.
- */
-const TRACE_TYPES = new Set([
-  "time",
-  "return",
-  "throw",
-  "yield",
-  "name",
-  "location",
-  "hitCount",
-  "callsite",
-  "parameterNames",
-  "arguments",
-  "depth"
-]);
-
-/**
- * Creates a TracerActor. TracerActor provides a stream of function
- * call/return packets to a remote client gathering a full trace.
- */
-function TracerActor(aConn, aParent)
-{
-  this._dbg = null;
-  this._parent = aParent;
-  this._attached = false;
-  this._activeTraces = new MapStack();
-  this._totalTraces = 0;
-  this._startTime = 0;
-  this._sequence = 0;
-  this._bufferSendTimer = null;
-  this._buffer = [];
-  this._hitCounts = new WeakMap();
-  this._packetScheduler = new JobScheduler();
-
-  // Keep track of how many different trace requests have requested what kind of
-  // tracing info. This way we can minimize the amount of data we are collecting
-  // at any given time.
-  this._requestsForTraceType = Object.create(null);
-  for (let type of TRACE_TYPES) {
-    this._requestsForTraceType[type] = 0;
-  }
-
-  this.onEnterFrame = this.onEnterFrame.bind(this);
-  this.onExitFrame = this.onExitFrame.bind(this);
-}
-
-TracerActor.prototype = {
-  actorPrefix: "trace",
-
-  get attached() { return this._attached; },
-  get idle()     { return this._attached && this._activeTraces.size === 0; },
-  get tracing()  { return this._attached && this._activeTraces.size > 0; },
-
-  get dbg() {
-    if (!this._dbg) {
-      this._dbg = this._parent.makeDebugger();
-    }
-    return this._dbg;
-  },
-
-  /**
-   * Buffer traces and only send them every BUFFER_SEND_DELAY milliseconds.
-   */
-  _send: function(aPacket) {
-    this._buffer.push(aPacket);
-    if (this._bufferSendTimer === null) {
-      this._bufferSendTimer = setTimeout(() => {
-        this.conn.send({
-          from: this.actorID,
-          type: "traces",
-          traces: this._buffer.splice(0, this._buffer.length)
-        });
-        this._bufferSendTimer = null;
-      }, BUFFER_SEND_DELAY);
-    }
-  },
-
-  /**
-   * Handle a protocol request to attach to the trace actor.
-   *
-   * @param aRequest object
-   *        The protocol request object.
-   */
-  onAttach: function(aRequest) {
-    if (this.attached) {
-      return {
-        error: "wrongState",
-        message: "Already attached to a client"
-      };
-    }
-
-    this.dbg.addDebuggees();
-    this._attached = true;
-
-    return {
-      type: "attached",
-      traceTypes: Object.keys(this._requestsForTraceType)
-        .filter(k => !!this._requestsForTraceType[k])
-    };
-  },
-
-  /**
-   * Handle a protocol request to detach from the trace actor.
-   *
-   * @param aRequest object
-   *        The protocol request object.
-   */
-  onDetach: function() {
-    while (this.tracing) {
-      this.onStopTrace();
-    }
-
-    this._dbg = null;
-    this._attached = false;
-
-    return {
-      type: "detached"
-    };
-  },
-
-  /**
-   * Handle a protocol request to start a new trace.
-   *
-   * @param aRequest object
-   *        The protocol request object.
-   */
-  onStartTrace: function(aRequest) {
-    for (let traceType of aRequest.trace) {
-      if (!TRACE_TYPES.has(traceType)) {
-        return {
-          error: "badParameterType",
-          message: "No such trace type: " + traceType
-        };
-      }
-    }
-
-    if (this.idle) {
-      this.dbg.onEnterFrame = this.onEnterFrame;
-      this.dbg.enabled = true;
-      this._sequence = 0;
-      this._startTime = Date.now();
-    }
-
-    // Start recording all requested trace types.
-    for (let traceType of aRequest.trace) {
-      this._requestsForTraceType[traceType]++;
-    }
-
-    this._totalTraces++;
-    let name = aRequest.name || "Trace " + this._totalTraces;
-    this._activeTraces.push(name, aRequest.trace);
-
-    return { type: "startedTrace", why: "requested", name: name };
-  },
-
-  /**
-   * Handle a protocol request to end a trace.
-   *
-   * @param aRequest object
-   *        The protocol request object.
-   */
-  onStopTrace: function(aRequest) {
-    if (!this.tracing) {
-      return {
-        error: "wrongState",
-        message: "No active traces"
-      };
-    }
-
-    let stoppedTraceTypes, name;
-    if (aRequest && aRequest.name) {
-      name = aRequest.name;
-      if (!this._activeTraces.has(name)) {
-        return {
-          error: "noSuchTrace",
-          message: "No active trace with name: " + name
-        };
-      }
-      stoppedTraceTypes = this._activeTraces.delete(name);
-    } else {
-      name = this._activeTraces.peekKey();
-      stoppedTraceTypes = this._activeTraces.pop();
-    }
-
-    for (let traceType of stoppedTraceTypes) {
-      this._requestsForTraceType[traceType]--;
-    }
-
-    // Clear hit counts if no trace is requesting them.
-    if (!this._requestsForTraceType.hitCount) {
-      this._hitCounts.clear();
-    }
-
-    if (this.idle) {
-      this._dbg.onEnterFrame = undefined;
-      this.dbg.enabled = false;
-    }
-
-    return {
-      type: "stoppedTrace",
-      why: "requested",
-      name
-    };
-  },
-
-  // JS Debugger API hooks.
-
-  /**
-   * Called by the engine when a frame is entered. Sends an unsolicited packet
-   * to the client carrying requested trace information.
-   *
-   * @param aFrame Debugger.Frame
-   *        The stack frame that was entered.
-   */
-  onEnterFrame: function(aFrame) {
-    Task.spawn(function*() {
-      // This function might request original (i.e. source-mapped) location,
-      // which is asynchronous. We need to ensure that packets are sent out
-      // in the correct order.
-      let runInOrder = this._packetScheduler.schedule();
-
-      let packet = {
-        type: "enteredFrame",
-        sequence: this._sequence++
-      };
-
-      if (this._requestsForTraceType.hitCount) {
-        if (aFrame.script) {
-          // Increment hit count.
-          let previousHitCount = this._hitCounts.get(aFrame.script) || 0;
-          this._hitCounts.set(aFrame.script, previousHitCount + 1);
-
-          packet.hitCount = this._hitCounts.get(aFrame.script);
-        }
-      }
-
-      if (this._parent.threadActor && aFrame.script) {
-        packet.blackBoxed = this._parent.threadActor.sources.isBlackBoxed(aFrame.script.url);
-      } else {
-        packet.blackBoxed = false;
-      }
-
-      if (this._requestsForTraceType.callsite) {
-        if (aFrame.older && aFrame.older.script) {
-          let older = aFrame.older;
-          packet.callsite = {
-            url: older.script.url,
-            line: older.script.getOffsetLine(older.offset),
-            column: getOffsetColumn(older.offset, older.script)
-          };
-        }
-      }
-
-      if (this._requestsForTraceType.time) {
-        packet.time = Date.now() - this._startTime;
-      }
-
-      if (this._requestsForTraceType.parameterNames && aFrame.callee) {
-        packet.parameterNames = aFrame.callee.parameterNames;
-      }
-
-      if (this._requestsForTraceType.arguments && aFrame.arguments) {
-        packet.arguments = [];
-        let i = 0;
-        for (let arg of aFrame.arguments) {
-          if (i++ > MAX_ARGUMENTS) {
-            break;
-          }
-          packet.arguments.push(createValueSnapshot(arg, true));
-        }
-      }
-
-      if (this._requestsForTraceType.depth) {
-        packet.depth = getFrameDepth(aFrame);
-      }
-
-      const onExitFrame = this.onExitFrame;
-      aFrame.onPop = function (aCompletion) {
-        onExitFrame(this, aCompletion);
-      };
-
-      // Async work is done below that doesn't depend on the frame
-      // being live
-
-      let name = aFrame.callee
-          ? aFrame.callee.displayName || "(anonymous function)"
-          : "(" + aFrame.type + ")";
-      let sourceMappedLocation;
-
-      if (this._requestsForTraceType.name || this._requestsForTraceType.location) {
-        if (aFrame.script) {
-          let sources = this._parent.threadActor.sources;
-
-          sourceMappedLocation = yield sources.getOriginalLocation(new GeneratedLocation(
-            sources.createNonSourceMappedActor(aFrame.script.source),
-            aFrame.script.startLine,
-            // We should return the location of the start of the script, but
-            // Debugger.Script does not provide complete start locations (bug
-            // 901138). Instead, return the current offset (the location of the
-            // first statement in the function).
-            getOffsetColumn(aFrame.offset, aFrame.script)
-          ));
-        }
-      }
-
-      if (this._requestsForTraceType.name) {
-        if (sourceMappedLocation && sourceMappedLocation.originalName) {
-          packet.name = sourceMappedLocation.originalName;
-        } else {
-          packet.name = name;
-        }
-        packet.name = name;
-      }
-
-      if (this._requestsForTraceType.location) {
-        if (sourceMappedLocation) {
-          // Don't copy sourceMappedLocation directly because it
-          // contains a reference to the source actor
-          packet.location = {
-            url: sourceMappedLocation.originalUrl,
-            line: sourceMappedLocation.originalLine,
-            column: sourceMappedLocation.originalColumn
-          };
-        }
-      }
-
-      runInOrder(() => this._send(packet));
-    }.bind(this));
-  },
-
-  /**
-   * Called by the engine when a frame is exited. Sends an unsolicited packet to
-   * the client carrying requested trace information.
-   *
-   * @param Debugger.Frame aFrame
-   *        The Debugger.Frame that was just exited.
-   * @param aCompletion object
-   *        The debugger completion value for the frame.
-   */
-  onExitFrame: function(aFrame, aCompletion) {
-    let runInOrder = this._packetScheduler.schedule();
-
-    let packet = {
-      type: "exitedFrame",
-      sequence: this._sequence++,
-    };
-
-    if (!aCompletion) {
-      packet.why = "terminated";
-    } else if (aCompletion.hasOwnProperty("return")) {
-      packet.why = "return";
-    } else if (aCompletion.hasOwnProperty("yield")) {
-      packet.why = "yield";
-    } else {
-      packet.why = "throw";
-    }
-
-    if (this._requestsForTraceType.time) {
-      packet.time = Date.now() - this._startTime;
-    }
-
-    if (this._requestsForTraceType.depth) {
-      packet.depth = getFrameDepth(aFrame);
-    }
-
-    if (aCompletion) {
-      if (this._requestsForTraceType.return && "return" in aCompletion) {
-        packet.return = createValueSnapshot(aCompletion.return, true);
-      }
-
-      else if (this._requestsForTraceType.throw && "throw" in aCompletion) {
-        packet.throw = createValueSnapshot(aCompletion.throw, true);
-      }
-
-      else if (this._requestsForTraceType.yield && "yield" in aCompletion) {
-        packet.yield = createValueSnapshot(aCompletion.yield, true);
-      }
-    }
-
-    runInOrder(() => this._send(packet));
-  }
-};
-
-/**
- * The request types this actor can handle.
- */
-TracerActor.prototype.requestTypes = {
-  "attach": TracerActor.prototype.onAttach,
-  "detach": TracerActor.prototype.onDetach,
-  "startTrace": TracerActor.prototype.onStartTrace,
-  "stopTrace": TracerActor.prototype.onStopTrace
-};
-
-exports.TracerActor = TracerActor;
-
-/**
- * MapStack is a collection of key/value pairs with stack ordering,
- * where keys are strings and values are any JS value. In addition to
- * the push and pop stack operations, supports a "delete" operation,
- * which removes the value associated with a given key from any
- * location in the stack.
- */
-function MapStack()
-{
-  // Essentially a MapStack is just sugar-coating around a standard JS
-  // object, plus the _stack array to track ordering.
-  this._stack = [];
-  this._map = Object.create(null);
-}
-
-MapStack.prototype = {
-  get size() { return this._stack.length; },
-
-  /**
-   * Return the key for the value on the top of the stack, or
-   * undefined if the stack is empty.
-   */
-  peekKey: function() {
-    return this._stack[this.size - 1];
-  },
-
-  /**
-   * Return true iff a value has been associated with the given key.
-   *
-   * @param aKey string
-   *        The key whose presence is to be tested.
-   */
-  has: function(aKey) {
-    return Object.prototype.hasOwnProperty.call(this._map, aKey);
-  },
-
-  /**
-   * Return the value associated with the given key, or undefined if
-   * no value is associated with the key.
-   *
-   * @param aKey string
-   *        The key whose associated value is to be returned.
-   */
-  get: function(aKey) {
-    return this._map[aKey] || undefined;
-  },
-
-  /**
-   * Push a new value onto the stack. If another value with the same
-   * key is already on the stack, it will be removed before the new
-   * value is pushed onto the top of the stack.
-   *
-   * @param aKey string
-   *        The key of the object to push onto the stack.
-   *
-   * @param aValue
-   *        The value to push onto the stack.
-   */
-  push: function(aKey, aValue) {
-    this.delete(aKey);
-    this._stack.push(aKey);
-    this._map[aKey] = aValue;
-  },
-
-  /**
-   * Remove the value from the top of the stack and return it.
-   * Returns undefined if the stack is empty.
-   */
-  pop: function() {
-    let key = this.peekKey();
-    let value = this.get(key);
-    this._stack.pop();
-    delete this._map[key];
-    return value;
-  },
-
-  /**
-   * Remove the value associated with the given key from the stack and
-   * return it. Returns undefined if no value is associated with the
-   * given key.
-   *
-   * @param aKey string
-   *        The key for the value to remove from the stack.
-   */
-  delete: function(aKey) {
-    let value = this.get(aKey);
-    if (this.has(aKey)) {
-      let keyIndex = this._stack.lastIndexOf(aKey);
-      this._stack.splice(keyIndex, 1);
-      delete this._map[aKey];
-    }
-    return value;
-  }
-};
-
-// Serialization helper functions. Largely copied from script.js and modified
-// for use in serialization rather than object actor requests.
-
-/**
- * Create a grip for the given debuggee value.
- *
- * @param aValue Debugger.Object|primitive
- *        The value to describe with the created grip.
- *
- * @param aDetailed boolean
- *        If true, capture slightly more detailed information, like some
- *        properties on an object.
- *
- * @return Object
- *         A primitive value or a snapshot of an object.
- */
-function createValueSnapshot(aValue, aDetailed=false) {
-  switch (typeof aValue) {
-    case "boolean":
-      return aValue;
-    case "string":
-      if (aValue.length >= DebuggerServer.LONG_STRING_LENGTH) {
-        return {
-          type: "longString",
-          initial: aValue.substring(0, DebuggerServer.LONG_STRING_INITIAL_LENGTH),
-          length: aValue.length
-        };
-      }
-      return aValue;
-    case "number":
-      if (aValue === Infinity) {
-        return { type: "Infinity" };
-      } else if (aValue === -Infinity) {
-        return { type: "-Infinity" };
-      } else if (Number.isNaN(aValue)) {
-        return { type: "NaN" };
-      } else if (!aValue && 1 / aValue === -Infinity) {
-        return { type: "-0" };
-      }
-      return aValue;
-    case "undefined":
-      return { type: "undefined" };
-    case "object":
-      if (aValue === null) {
-        return { type: "null" };
-      }
-      return aDetailed
-        ? detailedObjectSnapshot(aValue)
-        : objectSnapshot(aValue);
-    default:
-      DevToolsUtils.reportException("TracerActor",
-                      new Error("Failed to provide a grip for: " + aValue));
-      return null;
-  }
-}
-
-/**
- * Create a very minimal snapshot of the given debuggee object.
- *
- * @param aObject Debugger.Object
- *        The object to describe with the created grip.
- */
-function objectSnapshot(aObject) {
-  return {
-    "type": "object",
-    "class": aObject.class,
-  };
-}
-
-/**
- * Create a (slightly more) detailed snapshot of the given debuggee object.
- *
- * @param aObject Debugger.Object
- *        The object to describe with the created descriptor.
- */
-function detailedObjectSnapshot(aObject) {
-  let desc = objectSnapshot(aObject);
-  let ownProperties = desc.ownProperties = Object.create(null);
-
-  if (aObject.class == "DeadObject") {
-    return desc;
-  }
-
-  let i = 0;
-  for (let name of aObject.getOwnPropertyNames()) {
-    if (i++ > MAX_PROPERTIES) {
-      break;
-    }
-    let desc = propertySnapshot(name, aObject);
-    if (desc) {
-      ownProperties[name] = desc;
-    }
-  }
-
-  return desc;
-}
-
-/**
- * A helper method that creates a snapshot of the object's |aName| property.
- *
- * @param aName string
- *        The property of which the snapshot is taken.
- *
- * @param aObject Debugger.Object
- *        The object whose property the snapshot is taken of.
- *
- * @return Object
- *         The snapshot of the property.
- */
-function propertySnapshot(aName, aObject) {
-  let desc;
-  try {
-    desc = aObject.getOwnPropertyDescriptor(aName);
-  } catch (e) {
-    // Calling getOwnPropertyDescriptor on wrapped native prototypes is not
-    // allowed (bug 560072). Inform the user with a bogus, but hopefully
-    // explanatory, descriptor.
-    return {
-      configurable: false,
-      writable: false,
-      enumerable: false,
-      value: e.name
-    };
-  }
-
-  // Only create descriptors for simple values. We skip objects and properties
-  // that have getters and setters; ain't nobody got time for that!
-  if (!desc
-      || typeof desc.value == "object" && desc.value !== null
-      || !("value" in desc)) {
-    return undefined;
-  }
-
-  return {
-    configurable: desc.configurable,
-    enumerable: desc.enumerable,
-    writable: desc.writable,
-    value: createValueSnapshot(desc.value)
-  };
-}
-
-/**
- * Scheduler for jobs to be run in the same order as in which they were
- * scheduled.
- */
-function JobScheduler()
-{
-  this._lastScheduledJob = promise.resolve();
-}
-
-JobScheduler.prototype = {
-  /**
-   * Schedule a new job.
-   *
-   * @return A function that can be called anytime with a job as a parameter.
-   *         Job won't be run until all previously scheduled jobs were run.
-   */
-  schedule: function() {
-    let deferred = promise.defer();
-    let previousJob = this._lastScheduledJob;
-    this._lastScheduledJob = deferred.promise;
-    return function runInOrder(aJob) {
-      previousJob.then(() => {
-        aJob();
-        deferred.resolve();
-      });
-    };
-  }
-};
-
-exports.JobScheduler = JobScheduler;
--- a/toolkit/devtools/server/main.js
+++ b/toolkit/devtools/server/main.js
@@ -483,21 +483,16 @@ var DebuggerServer = {
       constructor: "StorageActor",
       type: { tab: true }
     });
     this.registerModule("devtools/server/actors/gcli", {
       prefix: "gcli",
       constructor: "GcliActor",
       type: { tab: true }
     });
-    this.registerModule("devtools/server/actors/tracer", {
-      prefix: "trace",
-      constructor: "TracerActor",
-      type: { tab: true }
-    });
     this.registerModule("devtools/server/actors/memory", {
       prefix: "memory",
       constructor: "MemoryActor",
       type: { tab: true }
     });
     this.registerModule("devtools/server/actors/framerate", {
       prefix: "framerate",
       constructor: "FramerateActor",
--- a/toolkit/devtools/server/moz.build
+++ b/toolkit/devtools/server/moz.build
@@ -83,17 +83,16 @@ EXTRA_JS_MODULES.devtools.server.actors 
     'actors/script.js',
     'actors/settings.js',
     'actors/storage.js',
     'actors/string.js',
     'actors/styleeditor.js',
     'actors/styles.js',
     'actors/stylesheets.js',
     'actors/timeline.js',
-    'actors/tracer.js',
     'actors/webapps.js',
     'actors/webaudio.js',
     'actors/webbrowser.js',
     'actors/webconsole.js',
     'actors/webgl.js',
     'actors/worker.js',
 ]
 
--- a/toolkit/devtools/server/tests/unit/head_dbg.js
+++ b/toolkit/devtools/server/tests/unit/head_dbg.js
@@ -310,28 +310,16 @@ function startTestDebuggerServer(title, 
   DebuggerServer.addTabActors();
 
   let transport = DebuggerServer.connectPipe();
   let client = new DebuggerClient(transport);
 
   return connect(client).then(() => client);
 }
 
-function initTestTracerServer(aServer = DebuggerServer)
-{
-  aServer.registerModule("xpcshell-test/testactors");
-  aServer.registerModule("devtools/server/actors/tracer", {
-    prefix: "trace",
-    constructor: "TracerActor",
-    type: { global: true, tab: true }
-  });
-  // Allow incoming connections.
-  aServer.init(function () { return true; });
-}
-
 function finishClient(aClient)
 {
   aClient.close(function() {
     do_test_finished();
   });
 }
 
 // Create a server, connect to it and fetch tab actors for the parent process;
--- a/toolkit/devtools/server/tests/unit/test_breakpoint-20.js
+++ b/toolkit/devtools/server/tests/unit/test_breakpoint-20.js
@@ -10,17 +10,17 @@ var gDebuggee;
 var gClient;
 var gTraceClient;
 var gThreadClient;
 
 Components.utils.import('resource:///modules/devtools/SourceMap.jsm');
 
 function run_test()
 {
-  initTestTracerServer();
+  initTestDebuggerServer();
   gDebuggee = addTestGlobal("test-breakpoints");
   gClient = new DebuggerClient(DebuggerServer.connectPipe());
   gClient.connect(function() {
     attachTestThread(gClient, "test-breakpoints", testBreakpoint);
   });
   do_test_pending();
 }
 
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_sourcemaps-14.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Check that tracer links to a correct (source-mapped) location.
- */
-
-var gDebuggee;
-var gClient;
-var gTraceClient;
-var gThreadClient;
-
-Components.utils.import('resource:///modules/devtools/SourceMap.jsm');
-
-function run_test() {
-  initTestTracerServer();
-  gDebuggee = addTestGlobal("test-source-map");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect(function() {
-    attachTestThread(gClient, "test-source-map",
-      function(aResponse, aTabClient, aThreadClient, aTabResponse) {
-      gThreadClient = aThreadClient;
-      gThreadClient.resume(function (aResponse) {
-        gClient.attachTracer(aTabResponse.traceActor, function(aResponse, aTraceClient) {
-          gTraceClient = aTraceClient;
-          testSourceMaps();
-        });
-      });
-    });
-  });
-  do_test_pending();
-}
-
-const testSourceMaps = Task.async(function* () {
-  const tracesStopped = promise.defer();
-  gClient.addListener("traces", (aEvent, { traces }) => {
-    for (let t of traces) {
-      checkTrace(t);
-    }
-    tracesStopped.resolve();
-  });
-
-  yield startTrace();
-
-  yield executeOnNextTickAndWaitForPause(evalCode, gClient);
-  yield resume(gThreadClient);
-
-  yield tracesStopped.promise;
-  yield stopTrace();
-
-  finishClient(gClient);
-});
-
-function startTrace()
-{
-  let deferred = promise.defer();
-  gTraceClient.startTrace(["depth", "name", "location"], null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function evalCode()
-{
-  let { code, map } = (new SourceNode(null, null, null, [
-    new SourceNode(10, 0, "a.js", "function fnOuter() {\n"),
-    new SourceNode(20, 0, "a.js", "  fnInner();\n"),
-    new SourceNode(30, 0, "a.js", "}\n"),
-    new SourceNode(10, 0, "b.js", "function fnInner() {\n"),
-    new SourceNode(20, 0, "b.js", "  [1].forEach(function noop() {\n"),
-    new SourceNode(30, 0, "b.js", "    debugger;\n"),
-    new SourceNode(40, 0, "b.js", "  });\n"),
-    new SourceNode(50, 0, "b.js", "}\n"),
-    new SourceNode(60, 0, "b.js", "fnOuter();\n"),
-  ])).toStringWithSourceMap({
-    file: "abc.js",
-    sourceRoot: "http://example.com/"
-  });
-
-  code += "//# sourceMappingURL=data:text/json," + map.toString();
-
-  Components.utils.evalInSandbox(code, gDebuggee, "1.8", "http://example.com/abc.js", 1);
-}
-
-
-function checkTrace({ type, sequence, depth, name, location, blackBoxed })
-{
-  switch(sequence) {
-  // First packet comes from evalInSandbox in evalCode.
-  case 0:
-    do_check_eq(name, "(global)");
-    break;
-
-  case 1:
-    do_check_eq(name, "fnOuter");
-    do_check_eq(location.url, "http://example.com/a.js");
-    do_check_eq(location.line, 10);
-    break;
-
-  case 2:
-    do_check_eq(name, "fnInner");
-    do_check_eq(location.url, "http://example.com/b.js");
-    do_check_eq(location.line, 10);
-    break;
-
-  case 3:
-    do_check_eq(name, "noop");
-    do_check_eq(location.url, "http://example.com/b.js");
-    do_check_eq(location.line, 20);
-    break;
-
-  case 4:
-  case 5:
-  case 6:
-  case 7:
-    do_check_eq(type, "exitedFrame");
-    break;
-
-  default:
-    // Should have covered all sequences.
-    do_check_true(false);
-  }
-}
-
-function stopTrace()
-{
-  let deferred = promise.defer();
-  gTraceClient.stopTrace(null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
\ No newline at end of file
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_sourcemaps-15.js
+++ /dev/null
@@ -1,159 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Create 2 sources, A and B, B is source-mapped. When calling functions A->B->A,
- * verify that traces are in a proper order.
- */
-
-var gDebuggee;
-var gClient;
-var gTraceClient;
-var gThreadClient;
-
-Components.utils.import('resource:///modules/devtools/SourceMap.jsm');
-
-function run_test()
-{
-  initTestTracerServer();
-  gDebuggee = addTestGlobal("test-tracer-actor");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect(function() {
-    attachTestThread(gClient, "test-tracer-actor",
-      function(aResponse, aTabClient, aThreadClient, aTabResponse) {
-      gThreadClient = aThreadClient;
-      gThreadClient.resume(function (aResponse) {
-        gClient.attachTracer(aTabResponse.traceActor,
-          function(aResponse, aTraceClient) {
-          gTraceClient = aTraceClient;
-          testTraces();
-        });
-      });
-    });
-  });
-  do_test_pending();
-}
-
-const testTraces = Task.async(function* () {
-  // Read traces
-  const tracesStopped = promise.defer();
-  gClient.addListener("traces", (aEvent, { traces }) => {
-    for (let t of traces) {
-      check_trace(t);
-    }
-    tracesStopped.resolve();
-  });
-
-  yield startTrace();
-
-  yield executeOnNextTickAndWaitForPause(evalSourceMapSetup, gClient);
-  yield resume(gThreadClient);
-
-  evalSetup();
-
-  evalTestCode();
-
-  yield tracesStopped.promise;
-  yield stopTrace();
-
-  finishClient(gClient);
-});
-
-function startTrace()
-{
-  let deferred = promise.defer();
-  gTraceClient.startTrace(["depth", "name", "location"], null,
-    function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function evalSourceMapSetup() {
-  let { code, map } = (new SourceNode(null, null, null, [
-    new SourceNode(1, 0, "b_original.js", "" + function fnSourceMapped() {
-      fnInner();
-    } + "\n debugger;")
-  ])).toStringWithSourceMap({
-    file: "b.js",
-    sourceRoot: "http://example.com/"
-  });
-  code += "//# sourceMappingURL=data:text/json," + map.toString();
-  Components.utils.evalInSandbox(code, gDebuggee, "1.8", "http://example.com/b.js");
-}
-
-function evalSetup()
-{
-  Components.utils.evalInSandbox(
-    "" + function fnOuter() {
-      fnSourceMapped();
-    } + "\n" +
-    "" + function fnInner() {
-      [1].forEach(function noop() {});
-    },
-    gDebuggee,
-    "1.8",
-    "http://example.com/a.js",
-    1
-  );
-}
-
-function evalTestCode()
-{
-  Components.utils.evalInSandbox(
-    "fnOuter();",
-    gDebuggee,
-    "1.8",
-    "http://example.com/a.js",
-    1
-  );
-}
-
-function stopTrace()
-{
-  let deferred = promise.defer();
-  gTraceClient.stopTrace(null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function check_trace({ type, sequence, depth, name, location, blackBoxed })
-{
-  switch(sequence) {
-  // First two packets come from evalInSandbox in evalSetup
-  // The third packet comes from evalInSandbox in evalTestCode
-  case 0:
-  case 2:
-  case 4:
-    do_check_eq(name, "(global)");
-    do_check_eq(type, "enteredFrame");
-    break;
-
-  case 5:
-    do_check_eq(name, "fnOuter");
-    break;
-
-  case 6:
-    do_check_eq(name, "fnSourceMapped");
-    break;
-
-  case 7:
-    do_check_eq(name, "fnInner");
-    break;
-
-  case 8:
-    do_check_eq(name, "noop");
-    break;
-
-  case 1: // evalInSandbox
-  case 3: // evalInSandbox
-  case 9: // noop
-  case 10: // fnInner
-  case 11: // fnSourceMapped
-  case 12: // fnOuter
-  case 13: // evalInSandbox
-    do_check_eq(type, "exitedFrame");
-    break;
-
-  default:
-    // Should have covered all sequences.
-    do_check_true(false);
-  }
-}
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_trace_actor-01.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that TraceActor is available and returns correct responses to
- * startTrace and stopTrace requests.
- */
-
-var gDebuggee;
-var gClient;
-var gTraceClient;
-
-function run_test()
-{
-  initTestTracerServer();
-  gDebuggee = addTestGlobal("test-tracer-actor");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect(function() {
-    attachTestTab(gClient, "test-tracer-actor", function(aResponse, aTabClient) {
-      do_check_true(!!aResponse.traceActor, "TraceActor should be visible in tab");
-      gClient.attachTracer(aResponse.traceActor, function(aResponse, aTraceClient) {
-        gTraceClient = aTraceClient;
-        test_start_stop_response();
-      });
-    });
-  });
-  do_test_pending();
-}
-
-function test_start_stop_response()
-{
-  do_check_true(!gTraceClient.tracing, "TraceClient should start in idle state");
-  gTraceClient.startTrace([], null, function(aResponse) {
-    do_check_true(!!gTraceClient.tracing, "TraceClient should be in tracing state");
-    do_check_true(!aResponse.error,
-                  'startTrace should not respond with error: ' + aResponse.error);
-    do_check_eq(aResponse.type, "startedTrace",
-                'startTrace response should have "type":"startedTrace" property');
-    do_check_eq(aResponse.why, "requested",
-                'startTrace response should have "why":"requested" property');
-
-    gTraceClient.stopTrace(null, function(aResponse) {
-      do_check_true(!gTraceClient.tracing, "TraceClient should be in idle state");
-      do_check_true(!aResponse.error,
-                   'stopTrace should not respond with error: ' + aResponse.error);
-      do_check_eq(aResponse.type, "stoppedTrace",
-                  'stopTrace response should have "type":"stoppedTrace" property');
-      do_check_eq(aResponse.why, "requested",
-                  'stopTrace response should have "why":"requested" property');
-
-      finishClient(gClient);
-    });
-  });
-}
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_trace_actor-02.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests re-entrant startTrace/stopTrace calls on TraceActor.  Tests
- * that stopTrace ends the most recently started trace when not
- * provided with a name. Tests that starting a trace with the same
- * name twice results in only one trace being collected for that name.
- */
-
-var gDebuggee;
-var gClient;
-var gTraceClient;
-
-function run_test()
-{
-  initTestTracerServer();
-  gDebuggee = addTestGlobal("test-tracer-actor");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect(function() {
-    attachTestTab(gClient, "test-tracer-actor", function(aResponse, aTabClient) {
-      gClient.attachTracer(aResponse.traceActor, function(aResponse, aTraceClient) {
-        gTraceClient = aTraceClient;
-        test_start_stop_reentrant();
-      });
-    });
-  });
-  do_test_pending();
-}
-
-function test_start_stop_reentrant()
-{
-  do_check_true(!gTraceClient.tracing, "TraceClient should start in idle state");
-
-  start_named_trace("foo")
-    .then(start_named_trace.bind(null, "foo"))
-    .then(start_named_trace.bind(null, "bar"))
-    .then(start_named_trace.bind(null, "baz"))
-    .then(stop_trace.bind(null, "bar", "bar"))
-    .then(stop_trace.bind(null, null, "baz"))
-    .then(stop_trace.bind(null, null, "foo"))
-    .then(function() {
-      do_check_true(!gTraceClient.tracing, "TraceClient should finish in idle state");
-      finishClient(gClient);
-    });
-}
-
-function start_named_trace(aName)
-{
-  let deferred = promise.defer();
-  gTraceClient.startTrace([], aName, function(aResponse) {
-    do_check_true(!!gTraceClient.tracing, "TraceClient should be in tracing state");
-    do_check_true(!aResponse.error,
-                  'startTrace should not respond with error: ' + aResponse.error);
-    do_check_eq(aResponse.type, "startedTrace",
-                'startTrace response should have "type":"startedTrace" property');
-    do_check_eq(aResponse.why, "requested",
-                'startTrace response should have "why":"requested" property');
-    do_check_eq(aResponse.name, aName,
-                'startTrace response should have the given name');
-    deferred.resolve();
-  });
-  return deferred.promise;
-}
-
-function stop_trace(aName, aExpectedName)
-{
-  let deferred = promise.defer();
-  gTraceClient.stopTrace(aName, function(aResponse) {
-    do_check_true(!aResponse.error,
-                  'stopTrace should not respond with error: ' + aResponse.error);
-    do_check_true(aResponse.type === "stoppedTrace",
-                  'stopTrace response should have "type":"stoppedTrace" property');
-    do_check_true(aResponse.why === "requested",
-                  'stopTrace response should have "why":"requested" property');
-    do_check_true(aResponse.name === aExpectedName,
-                  'stopTrace response should have name "' + aExpectedName
-                  + '", but had "' + aResponse.name + '"');
-    deferred.resolve();
-  });
-  return deferred.promise;
-}
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_trace_actor-03.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that automatically generated names for traces are unique.
- */
-
-var gDebuggee;
-var gClient;
-var gTraceClient;
-
-function run_test()
-{
-  initTestTracerServer();
-  gDebuggee = addTestGlobal("test-tracer-actor");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect(function() {
-    attachTestTab(gClient, "test-tracer-actor", function(aResponse, aTabClient) {
-      gClient.attachTracer(aResponse.traceActor, function(aResponse, aTraceClient) {
-        gTraceClient = aTraceClient;
-        test_unique_generated_trace_names();
-      });
-    });
-  });
-  do_test_pending();
-}
-
-function test_unique_generated_trace_names()
-{
-  let deferred = promise.defer();
-  deferred.resolve([]);
-
-  let p = deferred.promise, traces = 50;
-  for (let i = 0; i < traces; i++)
-    p = p.then(start_trace);
-  for (let i = 0; i < traces; i++)
-    p = p.then(stop_trace);
-
-  p = p.then(function() {
-    finishClient(gClient);
-  });
-}
-
-function start_trace(aTraceNames)
-{
-  let deferred = promise.defer();
-  gTraceClient.startTrace([], null, function(aResponse) {
-    let hasDuplicates = aTraceNames.some(name => name === aResponse.name);
-    do_check_true(!hasDuplicates, "Generated trace names should be unique");
-    aTraceNames.push(aResponse.name);
-    deferred.resolve(aTraceNames);
-  });
-  return deferred.promise;
-}
-
-function stop_trace(aTraceNames)
-{
-  let deferred = promise.defer();
-  gTraceClient.stopTrace(null, function(aResponse) {
-    do_check_eq(aTraceNames.pop(), aResponse.name,
-                "Stopped trace should be most recently started trace");
-    let hasDuplicates = aTraceNames.some(name => name === aResponse.name);
-    do_check_true(!hasDuplicates, "Generated trace names should be unique");
-    deferred.resolve(aTraceNames);
-  });
-  return deferred.promise;
-}
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_trace_actor-04.js
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that enteredFrame packets are sent on frame entry and
- * exitedFrame packets are sent on frame exit. Tests that the "name"
- * trace type works for function declarations.
- */
-
-var gDebuggee;
-var gClient;
-var gTraceClient;
-
-function run_test()
-{
-  initTestTracerServer();
-  gDebuggee = addTestGlobal("test-tracer-actor");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect(function() {
-    attachTestTab(gClient, "test-tracer-actor", function(aResponse, aTabClient) {
-      gClient.attachTracer(aResponse.traceActor, function(aResponse, aTraceClient) {
-        gTraceClient = aTraceClient;
-        test_enter_exit_frame();
-      });
-    });
-  });
-  do_test_pending();
-}
-
-function test_enter_exit_frame()
-{
-  let tracesSeen = 0;
-  let traceNames = [];
-  let traceStopped = promise.defer();
-
-  gClient.addListener("traces", function onTraces(aEvent, { traces }) {
-    for (let t of traces) {
-      tracesSeen++;
-
-      if (t.type == "enteredFrame") {
-        do_check_eq(t.type, "enteredFrame",
-                    'enteredFrame response should have type "enteredFrame"');
-        do_check_eq(typeof t.sequence, "number",
-                    'enteredFrame response should have sequence number');
-        do_check_true(!isNaN(t.sequence),
-                      'enteredFrame sequence should be a number');
-        do_check_eq(typeof t.name, "string",
-                    'enteredFrame response should have function name');
-        traceNames[t.sequence] = t.name;
-      } else {
-        do_check_eq(t.type, "exitedFrame",
-                    'exitedFrame response should have type "exitedFrame"');
-        do_check_eq(typeof t.sequence, "number",
-                    'exitedFrame response should have sequence number');
-        do_check_true(!isNaN(t.sequence),
-                      'exitedFrame sequence should be a number');
-      }
-
-      if (tracesSeen == 10) {
-        gClient.removeListener("traces", onTraces);
-        traceStopped.resolve();
-      }
-    }
-  });
-
-  start_trace()
-    .then(eval_code)
-    .then(() => traceStopped.promise)
-    .then(stop_trace)
-    .then(function() {
-      do_check_eq(traceNames[2], "baz",
-                  'Should have entered "baz" frame in third packet');
-      do_check_eq(traceNames[3], "bar",
-                  'Should have entered "bar" frame in fourth packet');
-      do_check_eq(traceNames[4], "foo",
-                  'Should have entered "foo" frame in fifth packet');
-      finishClient(gClient);
-    })
-    .then(null, e => DevToolsUtils.reportException("test_trace_actor-04.js",
-                                                   e));
-}
-
-function start_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.startTrace(["name"], null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function eval_code()
-{
-  gDebuggee.eval("(" + function() {
-    function foo() {
-      return;
-    }
-    function bar() {
-      return foo();
-    }
-    function baz() {
-      return bar();
-    }
-    baz();
-  } + ")()");
-}
-
-function stop_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.stopTrace(null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_trace_actor-05.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Simple tests for "location", "callsite", "time", "parameterNames",
- * "arguments", and "return" trace types.
- */
-
-var gDebuggee;
-var gClient;
-var gTraceClient;
-
-function run_test()
-{
-  initTestTracerServer();
-  gDebuggee = addTestGlobal("test-tracer-actor");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect(function() {
-    attachTestTab(gClient, "test-tracer-actor", function(aResponse, aTabClient) {
-      gClient.attachTracer(aResponse.traceActor, function(aResponse, aTraceClient) {
-        gTraceClient = aTraceClient;
-        test_enter_exit_frame();
-      });
-    });
-  });
-  do_test_pending();
-}
-
-function check_number(value)
-{
-  do_check_eq(typeof value, "number");
-  do_check_true(!isNaN(value));
-}
-
-function check_location(actual, expected)
-{
-  do_check_eq(typeof actual, "object");
-
-  check_number(actual.line);
-  check_number(actual.column);
-
-  do_check_eq(actual.url, expected.url);
-  do_check_eq(actual.line, expected.line);
-  do_check_eq(actual.column, expected.column);
-
-}
-
-function test_enter_exit_frame()
-{
-  let traces = [];
-  let traceStopped = promise.defer();
-
-  gClient.addListener("traces", function(aEvent, aPacket) {
-    for (let t of aPacket.traces) {
-      if (t.type == "enteredFrame") {
-        do_check_eq(typeof t.name, "string");
-        do_check_eq(typeof t.location, "object");
-
-        check_number(t.sequence);
-        check_number(t.time);
-        check_number(t.location.line);
-        check_number(t.location.column);
-        if (t.callsite) {
-          check_number(t.callsite.line);
-          check_number(t.callsite.column);
-        }
-      } else {
-        check_number(t.sequence);
-        check_number(t.time);
-      }
-
-      traces[t.sequence] = t;
-      if (traces.length === 4) {
-        traceStopped.resolve();
-      }
-    }
-  });
-
-  start_trace()
-    .then(eval_code)
-    .then(() => traceStopped.promise)
-    .then(stop_trace)
-    .then(function() {
-      let url = getFileUrl("tracerlocations.js");
-
-      check_location(traces[0].location, { url: url, line: 1, column: 0 });
-
-      do_check_eq(traces[1].name, "foo");
-
-      // XXX: foo's definition is at tracerlocations.js:3:0, but Debugger.Script
-      // does not provide complete definition locations (bug 901138). Therefore,
-      // we use the first statement in the function (tracerlocations.js:4:2) for
-      // a column approximation.
-      check_location(traces[1].location, { url: url, line: 3, column: 2 });
-      check_location(traces[1].callsite, { url: url, line: 8, column: 0 });
-
-      do_check_eq(typeof traces[1].parameterNames, "object");
-      do_check_eq(traces[1].parameterNames.length, 1);
-      do_check_eq(traces[1].parameterNames[0], "x");
-
-      do_check_eq(typeof traces[1].arguments, "object");
-      do_check_true(Array.isArray(traces[1].arguments));
-      do_check_eq(traces[1].arguments.length, 1);
-      do_check_eq(traces[1].arguments[0], 42);
-
-      do_check_eq(typeof traces[2].return, "string");
-      do_check_eq(traces[2].return, "bar");
-
-      finishClient(gClient);
-    }, error => {
-      DevToolsUtils.reportException("test_trace_actor-05.js", error);
-      do_check_true(false);
-    });
-}
-
-function start_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.startTrace(
-    ["name", "location", "callsite", "time", "parameterNames", "arguments", "return"],
-    null,
-    function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function eval_code()
-{
-  let code = readFile("tracerlocations.js");
-  Components.utils.evalInSandbox(code, gDebuggee, "1.8",
-                                getFileUrl("tracerlocations.js"), 1);
-}
-
-function stop_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.stopTrace(null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_trace_actor-06.js
+++ /dev/null
@@ -1,234 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that values are correctly serialized and sent in enteredFrame
- * and exitedFrame packets.
- */
-
-var gDebuggee;
-var gClient;
-var gTraceClient;
-
-function run_test()
-{
-  initTestTracerServer();
-  gDebuggee = addTestGlobal("test-tracer-actor");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect(function() {
-    attachTestTab(gClient, "test-tracer-actor", function(aResponse, aTabClient) {
-      gClient.attachTracer(aResponse.traceActor, function(aResponse, aTraceClient) {
-        gTraceClient = aTraceClient;
-        test_enter_exit_frame();
-      });
-    });
-  });
-  do_test_pending();
-}
-
-function test_enter_exit_frame()
-{
-  const traceStopped = promise.defer();
-
-  gClient.addListener("traces", (aEvent, { traces }) => {
-    for (let t of traces) {
-      check_trace(t);
-      if (t.sequence === 27) {
-        traceStopped.resolve();
-      }
-    }
-  });
-
-  start_trace()
-    .then(eval_code)
-    .then(() => traceStopped.promise)
-    .then(stop_trace)
-    .then(function() {
-      finishClient(gClient);
-    });
-}
-
-function start_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.startTrace(["arguments", "return"], null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function eval_code()
-{
-  gDebuggee.eval("(" + function() {
-    function identity(x) {
-      return x;
-    }
-
-    let circular = {};
-    circular.self = circular;
-
-    // Make sure there is only 3 properties per object because that is the value
-    // of MAX_PROPERTIES in the server.
-    let obj = {
-      num: 0,
-      str: "foo",
-      bool: false,
-    };
-    let obj2 = {
-      undef: undefined,
-      nil: null,
-      inf: Infinity
-    };
-    let obj3 = {
-      ninf: -Infinity,
-      nan: NaN,
-      nzero: -0
-    };
-    let obj4 = {
-      obj: circular,
-      arr: [1,2,3,4,5]
-    };
-
-    identity();
-    identity(0);
-    identity("");
-    identity(false);
-    identity(undefined);
-    identity(null);
-    identity(Infinity);
-    identity(-Infinity);
-    identity(NaN);
-    identity(-0);
-    identity(obj);
-    identity(obj2);
-    identity(obj3);
-    identity(obj4);
-  } + ")()");
-}
-
-function stop_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.stopTrace(null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function check_trace(aTrace)
-{
-  let value = (aTrace.type === "enteredFrame" && aTrace.arguments)
-        ? aTrace.arguments[0]
-        : aTrace.return;
-  switch(aTrace.sequence) {
-  case 2:
-    do_check_eq(typeof aTrace.arguments, "object");
-    do_check_eq(aTrace.arguments.length, 0);
-    break;
-  case 3:
-    check_value(value, "object", "undefined");
-    break;
-  case 4:
-  case 5:
-    check_value(value, "number", 0);
-    break;
-  case 6:
-  case 7:
-    check_value(value, "string", "");
-    break;
-  case 8:
-  case 9:
-    check_value(value, "boolean", false);
-    break;
-  case 10:
-  case 11:
-    check_value(value, "object", "undefined");
-    break;
-  case 12:
-  case 13:
-    check_value(value, "object", "null");
-    break;
-  case 14:
-  case 15:
-    check_value(value, "object", "Infinity");
-    break;
-  case 16:
-  case 17:
-    check_value(value, "object", "-Infinity");
-    break;
-  case 18:
-  case 19:
-    check_value(value, "object", "NaN");
-    break;
-  case 20:
-  case 21:
-    check_value(value, "object", "-0");
-    break;
-  case 22:
-  case 23:
-    check_obj(aTrace.type, value);
-    break;
-  case 24:
-  case 25:
-    check_obj2(aTrace.type, value);
-    break;
-  case 26:
-  case 27:
-    check_obj3(aTrace.type, value);
-    break;
-  case 28:
-  case 29:
-    check_obj4(aTrace.type, value);
-    break;
-  }
-}
-
-function check_value(aActual, aExpectedType, aExpectedValue)
-{
-  do_check_eq(typeof aActual, aExpectedType);
-  do_check_eq(aExpectedType === "object" ? aActual.type : aActual, aExpectedValue);
-}
-
-function check_obj(aType, aObj) {
-  do_check_eq(typeof aObj, "object");
-  do_check_eq(typeof aObj.ownProperties, "object");
-
-  do_check_eq(typeof aObj.ownProperties.num, "object");
-  do_check_eq(aObj.ownProperties.num.value, 0);
-
-  do_check_eq(typeof aObj.ownProperties.str, "object");
-  do_check_eq(aObj.ownProperties.str.value, "foo");
-
-  do_check_eq(typeof aObj.ownProperties.bool, "object");
-  do_check_eq(aObj.ownProperties.bool.value, false);
-}
-
-function check_obj2(aType, aObj) {
-  do_check_eq(typeof aObj.ownProperties.undef, "object");
-  do_check_eq(typeof aObj.ownProperties.undef.value, "object");
-  do_check_eq(aObj.ownProperties.undef.value.type, "undefined");
-
-  do_check_eq(typeof aObj.ownProperties.nil, "object");
-  do_check_eq(typeof aObj.ownProperties.nil.value, "object");
-  do_check_eq(aObj.ownProperties.nil.value.type, "null");
-
-  do_check_eq(typeof aObj.ownProperties.inf, "object");
-  do_check_eq(typeof aObj.ownProperties.inf.value, "object");
-  do_check_eq(aObj.ownProperties.inf.value.type, "Infinity");
-}
-
-function check_obj3(aType, aObj) {
-  do_check_eq(typeof aObj.ownProperties.ninf, "object");
-  do_check_eq(typeof aObj.ownProperties.ninf.value, "object");
-  do_check_eq(aObj.ownProperties.ninf.value.type, "-Infinity");
-
-  do_check_eq(typeof aObj.ownProperties.nan, "object");
-  do_check_eq(typeof aObj.ownProperties.nan.value, "object");
-  do_check_eq(aObj.ownProperties.nan.value.type, "NaN");
-
-  do_check_eq(typeof aObj.ownProperties.nzero, "object");
-  do_check_eq(typeof aObj.ownProperties.nzero.value, "object");
-  do_check_eq(aObj.ownProperties.nzero.value.type, "-0");
-}
-
-function check_obj4(aType, aObj) {
-  // Sub-objects aren't added.
-  do_check_eq(typeof aObj.ownProperties.obj, "undefined");
-  do_check_eq(typeof aObj.ownProperties.arr, "undefined");
-}
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_trace_actor-07.js
+++ /dev/null
@@ -1,100 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that the exit frame packets get the correct `why` value.
- */
-
-var gDebuggee;
-var gClient;
-var gTraceClient;
-
-function run_test()
-{
-  initTestTracerServer();
-  gDebuggee = addTestGlobal("test-tracer-actor");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect(function() {
-    attachTestTab(gClient, "test-tracer-actor", function(aResponse, aTabClient) {
-      gClient.attachTracer(aResponse.traceActor, function(aResponse, aTraceClient) {
-        gTraceClient = aTraceClient;
-        test_exit_frame_whys();
-      });
-    });
-  });
-  do_test_pending();
-}
-
-function test_exit_frame_whys()
-{
-  gClient.addListener("traces", (aEvent, { traces }) => {
-    for (let t of traces) {
-      if (t.type == "exitedFrame") {
-        check_trace(t);
-      }
-    }
-  });
-
-  start_trace()
-    .then(eval_code)
-    .then(stop_trace)
-    .then(function() {
-      finishClient(gClient);
-    }).then(null, error => {
-      do_check_true(false, "Should not get an error, got: " + error);
-    });
-}
-
-function start_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.startTrace(["name"], null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function eval_code()
-{
-  gDebuggee.eval("(" + function() {
-    function thrower() {
-      throw new Error();
-    }
-
-    function* yielder() {
-      yield 1;
-    }
-
-    function returner() {
-      return 1;
-    }
-
-    try {
-      thrower();
-    } catch(e) {}
-
-    // XXX bug 923729: Can't test yielding yet.
-    // for (let x of yielder()) {
-    //   break;
-    // }
-
-    returner();
-  } + ")()");
-}
-
-function stop_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.stopTrace(null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function check_trace(aEvent, { sequence, why })
-{
-  switch(sequence) {
-  case 3:
-    do_check_eq(why, "throw");
-    break;
-  case 5:
-    do_check_eq(why, "return");
-    break;
-  }
-}
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_trace_actor-08.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test the "depth" trace type.
- */
-
-var gDebuggee;
-var gClient;
-var gTraceClient;
-
-function run_test()
-{
-  initTestTracerServer();
-  gDebuggee = addTestGlobal("test-tracer-actor");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect(function() {
-    attachTestTab(gClient, "test-tracer-actor", function(aResponse, aTabClient) {
-      gClient.attachTracer(aResponse.traceActor, function(aResponse, aTraceClient) {
-        gTraceClient = aTraceClient;
-        test_frame_depths();
-      });
-    });
-  });
-  do_test_pending();
-}
-
-function test_frame_depths()
-{
-  const tracesStopped = promise.defer();
-  gClient.addListener("traces", (aEvent, { traces }) => {
-    for (let t of traces) {
-      check_trace(t);
-    }
-    tracesStopped.resolve();
-  });
-
-  start_trace()
-    .then(eval_code)
-    .then(() => tracesStopped.promise)
-    .then(stop_trace)
-    .then(function() {
-      finishClient(gClient);
-    }).then(null, error => {
-      do_check_true(false, "Should not get an error, got: " + error);
-    });
-}
-
-function start_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.startTrace(["depth", "name"], null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function eval_code()
-{
-  gDebuggee.eval("(" + function iife() {
-    function first() {
-      second();
-    }
-
-    function second() {
-      third();
-    }
-
-    function third() {
-    }
-
-    first();
-  } + ")()");
-}
-
-function stop_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.stopTrace(null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function check_trace({ sequence, depth, name })
-{
-  switch(sequence) {
-  case 0:
-    do_check_eq(name, "(eval)");
-    // Fall through
-  case 9:
-    do_check_eq(depth, 0);
-    break;
-
-  case 1:
-    do_check_eq(name, "iife");
-    // Fall through
-  case 8:
-    do_check_eq(depth, 1);
-    break;
-
-  case 2:
-    do_check_eq(name, "first");
-    // Fall through
-  case 7:
-    do_check_eq(depth, 2);
-    break;
-
-  case 3:
-    do_check_eq(name, "second");
-    // Fall through
-  case 6:
-    do_check_eq(depth, 3);
-    break;
-
-  case 4:
-    do_check_eq(name, "third");
-    // Fall through
-  case 5:
-    do_check_eq(depth, 4);
-    break;
-
-  default:
-    // Should have covered all sequences.
-    do_check_true(false);
-  }
-}
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_trace_actor-09.js
+++ /dev/null
@@ -1,100 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that self-hosted functions aren't traced and don't add depth.
- */
-
-var gDebuggee;
-var gClient;
-var gTraceClient;
-
-function run_test()
-{
-  initTestTracerServer();
-  gDebuggee = addTestGlobal("test-tracer-actor");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect(function() {
-    attachTestTab(gClient, "test-tracer-actor", function(aResponse, aTabClient) {
-      gClient.attachTracer(aResponse.traceActor, function(aResponse, aTraceClient) {
-        gTraceClient = aTraceClient;
-        test_frame_depths();
-      });
-    });
-  });
-  do_test_pending();
-}
-
-function test_frame_depths()
-{
-  const tracesStopped = promise.defer();
-  gClient.addListener("traces", (aEvent, { traces }) => {
-    for (let t of traces) {
-      check_trace(t);
-    }
-    tracesStopped.resolve();
-  });
-
-  start_trace()
-    .then(eval_code)
-    .then(() => tracesStopped.promise)
-    .then(stop_trace)
-    .then(function() {
-      finishClient(gClient);
-    }).then(null, error => {
-      do_check_true(false, "Should not get an error, got: " + DevToolsUtils.safeErrorString(error));
-    });
-}
-
-function start_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.startTrace(["depth", "name", "location"], null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function eval_code()
-{
-  gDebuggee.eval("(" + function iife() {
-    [1].forEach(function noop() {});
-    for (let x of [1]) {}
-  } + ")()");
-}
-
-function stop_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.stopTrace(null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function check_trace({ sequence, depth, name, location })
-{
-  if (location) {
-    do_check_true(location.url !== "self-hosted");
-  }
-
-  switch(sequence) {
-  case 0:
-    do_check_eq(name, "(eval)");
-  case 5:
-    do_check_eq(depth, 0);
-    break;
-
-  case 1:
-    do_check_eq(name, "iife");
-  case 4:
-    do_check_eq(depth, 1);
-    break;
-
-  case 2:
-    do_check_eq(name, "noop");
-  case 3:
-    do_check_eq(depth, 2);
-    break;
-
-  default:
-    // Should have covered all sequences.
-    do_check_true(false);
-  }
-}
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_trace_actor-10.js
+++ /dev/null
@@ -1,167 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Create 2 sources, A and B, B is black boxed. When calling functions A->B->A,
- * verify that only traces from source B are black boxed.
- */
-
-var gDebuggee;
-var gClient;
-var gTraceClient;
-var gThreadClient;
-
-function run_test()
-{
-  initTestTracerServer();
-  gDebuggee = addTestGlobal("test-tracer-actor");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect(function() {
-    attachTestThread(gClient, "test-tracer-actor",
-      function(aResponse, aTabClient, aThreadClient, aTabResponse) {
-      gThreadClient = aThreadClient;
-      gThreadClient.resume(function (aResponse) {
-        gClient.attachTracer(aTabResponse.traceActor,
-          function(aResponse, aTraceClient) {
-          gTraceClient = aTraceClient;
-          testTraces();
-        });
-      });
-    });
-  });
-  do_test_pending();
-}
-
-const BLACK_BOXED_URL = "http://example.com/blackboxme.js";
-const SOURCE_URL = "http://example.com/source.js";
-
-const testTraces = Task.async(function* () {
-  // Read traces
-  const tracesStopped = promise.defer();
-  gClient.addListener("traces", (aEvent, { traces }) => {
-    for (let t of traces) {
-      check_trace(t);
-    }
-    tracesStopped.resolve();
-  });
-
-  yield startTrace();
-
-  evalSetup();
-
-  // Blackbox source
-  const { sources } = yield getSources(gThreadClient);
-  let sourceClient = gThreadClient.source(
-    sources.filter(s => s.url == BLACK_BOXED_URL)[0]);
-  do_check_true(!sourceClient.isBlackBoxed,
-    "By default the source is not black boxed.");
-  yield blackBox(sourceClient);
-  do_check_true(sourceClient.isBlackBoxed);
-
-  evalTestCode();
-
-  yield tracesStopped.promise;
-  yield stopTrace();
-
-  finishClient(gClient);
-});
-
-function startTrace()
-{
-  let deferred = promise.defer();
-  gTraceClient.startTrace(["depth", "name", "location"], null,
-    function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function evalSetup()
-{
-  Components.utils.evalInSandbox(
-    "" + function fnBlackBoxed(k) {
-      fnInner();
-    },
-    gDebuggee,
-    "1.8",
-    BLACK_BOXED_URL,
-    1
-  );
-
-  Components.utils.evalInSandbox(
-    "" + function fnOuter() {
-      fnBlackBoxed();
-    } + "\n" +
-    "" + function fnInner() {
-      [1].forEach(function noop() {});
-    },
-    gDebuggee,
-    "1.8",
-    SOURCE_URL,
-    1
-  );
-}
-
-function evalTestCode()
-{
-  Components.utils.evalInSandbox(
-    "fnOuter();",
-    gDebuggee,
-    "1.8",
-    SOURCE_URL,
-    1
-  );
-}
-
-function stopTrace()
-{
-  let deferred = promise.defer();
-  gTraceClient.stopTrace(null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function check_trace({ type, sequence, depth, name, location, blackBoxed })
-{
-  switch(sequence) {
-  // First two packets come from evalInSandbox in evalSetup
-  // The third packet comes from evalInSandbox in evalTestCode
-  case 0:
-  case 2:
-  case 4:
-    do_check_eq(name, "(global)");
-    do_check_eq(type, "enteredFrame");
-    break;
-
-  case 5:
-    do_check_eq(blackBoxed, false);
-    do_check_eq(name, "fnOuter");
-    break;
-
-  case 6:
-    do_check_eq(blackBoxed, true);
-    do_check_eq(name, "fnBlackBoxed");
-    break;
-
-  case 7:
-    do_check_eq(blackBoxed, false);
-    do_check_eq(name, "fnInner");
-    break;
-
-  case 8:
-    do_check_eq(blackBoxed, false);
-    do_check_eq(name, "noop");
-    break;
-
-  case 1: // evalInSandbox
-  case 3: // evalInSandbox
-  case 9: // noop
-  case 10: // fnInner
-  case 11: // fnBlackBoxed
-  case 12: // fnOuter
-  case 13: // evalInSandbox
-    do_check_eq(type, "exitedFrame");
-    break;
-
-  default:
-    // Should have covered all sequences.
-    do_check_true(false);
-  }
-}
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_trace_actor-11.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that hit counts from tracer count function frames correctly, even after
- * restarting the trace.
- */
-
-var gDebuggee;
-var gClient;
-var gTraceClient;
-
-function run_test()
-{
-  initTestTracerServer();
-  gDebuggee = addTestGlobal("test-tracer-actor");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect(function() {
-    attachTestTab(gClient, "test-tracer-actor", function(aResponse, aTabClient) {
-      gClient.attachTracer(aResponse.traceActor, function(aResponse, aTraceClient) {
-        gTraceClient = aTraceClient;
-        test_hit_counts();
-      });
-    });
-  });
-  do_test_pending();
-}
-
-function test_hit_counts()
-{
-  start_trace()
-    .then(eval_code)
-    .then(listen_to_traces)
-    .then(stop_trace)
-    .then(start_trace) // Restart tracing.
-    .then(eval_code)
-    .then(listen_to_traces)
-    .then(stop_trace)
-    .then(function() {
-      finishClient(gClient);
-    }).then(null, error => {
-      do_check_true(false, "Should not get an error, got: " + DevToolsUtils.safeErrorString(error));
-    });
-}
-
-function listen_to_traces() {
-  const tracesStopped = promise.defer();
-  gClient.addListener("traces", (aEvent, { traces }) => {
-    for (let t of traces) {
-      check_trace(t);
-    }
-    tracesStopped.resolve();
-  });
-  return tracesStopped.promise;
-}
-
-function start_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.startTrace(["depth", "name", "location", "hitCount"], null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function eval_code()
-{
-  gDebuggee.eval("(" + function iife() {
-    [1, 2, 3].forEach(function noop() {
-      for (let x of [1]) {}
-    });
-  } + ")()");
-}
-
-function stop_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.stopTrace(null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function check_trace({ type, sequence, depth, name, location, hitCount })
-{
-  if (location) {
-    do_check_true(location.url !== "self-hosted");
-  }
-
-  switch(sequence) {
-  case 0:
-    do_check_eq(name, "(eval)");
-    do_check_eq(hitCount, 1);
-    break;
-
-  case 1:
-    do_check_eq(name, "iife");
-    do_check_eq(hitCount, 1);
-    break;
-
-  case 2:
-    do_check_eq(hitCount, 1);
-    do_check_eq(name, "noop");
-    break;
-
-  case 4:
-    do_check_eq(hitCount, 2);
-    do_check_eq(name, "noop");
-    break;
-
-  case 6:
-    do_check_eq(hitCount, 3);
-    do_check_eq(name, "noop");
-    break;
-
-  case 3:
-  case 5:
-  case 7:
-  case 8:
-  case 9:
-    do_check_eq(type, "exitedFrame");
-    break;
-
-  default:
-    // Should have covered all sequences.
-    do_check_true(false);
-  }
-}
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_trace_actor-12.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that hit counts are correct even if we start tracing other things first
- * and then start tracing hit counts.
- */
-
-var gDebuggee;
-var gClient;
-var gTraceClient;
-
-function run_test()
-{
-  initTestTracerServer();
-  gDebuggee = addTestGlobal("test-tracer-actor");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect(function() {
-    attachTestTab(gClient, "test-tracer-actor", function(aResponse, aTabClient) {
-      gClient.attachTracer(aResponse.traceActor, function(aResponse, aTraceClient) {
-        gTraceClient = aTraceClient;
-        test_hit_counts();
-      });
-    });
-  });
-  do_test_pending();
-}
-
-function test_hit_counts()
-{
-  const tracesStopped = promise.defer();
-  gClient.addListener("traces", (aEvent, { traces }) => {
-    for (let t of traces) {
-      check_trace(t);
-    }
-    tracesStopped.resolve();
-  });
-
-  start_trace_without_hit_counts()
-    .then(eval_code)
-    .then(start_trace_hit_counts)
-    .then(eval_code)
-    .then(() => tracesStopped.promise)
-    .then(stop_trace)
-    .then(function() {
-      finishClient(gClient);
-    }).then(null, error => {
-      do_check_true(false,
-        "Should not get an error, got: " + DevToolsUtils.safeErrorString(error));
-    });
-}
-
-function listen_to_traces() {
-  const tracesStopped = promise.defer();
-  gClient.addListener("traces", (aEvent, { traces }) => {
-    for (let t of traces) {
-      check_trace(t);
-    }
-    tracesStopped.resolve();
-  });
-  return tracesStopped;
-}
-
-function start_trace_without_hit_counts()
-{
-  let deferred = promise.defer();
-  gTraceClient.startTrace(["depth", "name", "location"], null,
-    function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function start_trace_hit_counts()
-{
-  let deferred = promise.defer();
-  gTraceClient.startTrace(["hitCount"], null,
-    function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function eval_code()
-{
-  gDebuggee.eval("(" + function iife() {
-    [1, 2, 3].forEach(function noop() {
-      for (let x of [1]) {}
-    });
-  } + ")()");
-}
-
-function stop_trace()
-{
-  let deferred = promise.defer();
-  gTraceClient.stopTrace(null, function() { deferred.resolve(); });
-  return deferred.promise;
-}
-
-function check_trace({ type, sequence, depth, name, location, hitCount })
-{
-  if (location) {
-    do_check_true(location.url !== "self-hosted");
-  }
-
-  switch(sequence) {
-
-  // First evaluation (before tracing hit counts).
-  case 0:
-  case 1:
-  case 2:
-  case 4:
-  case 6:
-    do_check_eq(hitCount, undefined);
-    break;
-
-  // Second evaluation (after tracing hit counts).
-  case 10:
-    do_check_eq(name, "(eval)");
-    do_check_eq(hitCount, 1);
-    break;
-
-  case 11:
-    do_check_eq(name, "iife");
-    do_check_eq(hitCount, 1);
-    break;
-
-  case 12:
-    do_check_eq(hitCount, 1);
-    do_check_eq(name, "noop");
-    break;
-
-  case 14:
-    do_check_eq(hitCount, 2);
-    do_check_eq(name, "noop");
-    break;
-
-  case 16:
-    do_check_eq(hitCount, 3);
-    do_check_eq(name, "noop");
-    break;
-
-  case 3:
-  case 5:
-  case 7:
-  case 8:
-  case 9:
-  case 13:
-  case 15:
-  case 17:
-  case 18:
-  case 19:
-    do_check_eq(type, "exitedFrame");
-    break;
-
-  default:
-    // Should have covered all sequences.
-    do_check_true(false);
-  }
-}
deleted file mode 100644
--- a/toolkit/devtools/server/tests/unit/test_trace_actor-13.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that job scheduler orders the jobs correctly.
- */
-
-let { JobScheduler } = devtools.require("devtools/server/actors/tracer");
-
-function run_test()
-{
-  do_test_pending();
-
-  test_in_order();
-  test_shuffled();
-
-  do_timeout(0, do_test_finished);
-}
-
-function test_in_order() {
-  let jobScheduler = new JobScheduler();
-  let testArray = [0];
-
-  let first = jobScheduler.schedule();
-  let second = jobScheduler.schedule();
-  let third = jobScheduler.schedule();
-
-  first(() => testArray.push(1));
-  second(() => testArray.push(2));
-  third(() => testArray.push(3));
-
-  do_timeout(0, () => {
-    do_check_eq(testArray[0], 0);
-    do_check_eq(testArray[1], 1);
-    do_check_eq(testArray[2], 2);
-    do_check_eq(testArray[3], 3);
-  });
-}
-
-function test_shuffled() {
-  let jobScheduler = new JobScheduler();
-  let testArray = [0];
-
-  let first = jobScheduler.schedule();
-  let second = jobScheduler.schedule();
-  let third = jobScheduler.schedule();
-
-  third(() => testArray.push(3));
-  first(() => testArray.push(1));
-  second(() => testArray.push(2));
-
-  do_timeout(0, () => {
-    do_check_eq(testArray[0], 0);
-    do_check_eq(testArray[1], 1);
-    do_check_eq(testArray[2], 2);
-    do_check_eq(testArray[3], 3);
-  });
-}
--- a/toolkit/devtools/server/tests/unit/xpcshell.ini
+++ b/toolkit/devtools/server/tests/unit/xpcshell.ini
@@ -12,17 +12,16 @@ support-files =
   post_init_tab_actors.js
   pre_init_global_actors.js
   pre_init_tab_actors.js
   registertestactors-01.js
   registertestactors-02.js
   registertestactors-03.js
   sourcemapped.js
   testactors.js
-  tracerlocations.js
   heap-snapshot-worker.js
   hello-actor.js
   setBreakpoint-on-column.js
   setBreakpoint-on-column-in-gcd-script.js
   setBreakpoint-on-column-with-no-offsets.js
   setBreakpoint-on-column-with-no-offsets-at-end-of-line.js
   setBreakpoint-on-column-with-no-offsets-at-end-of-script.js
   setBreakpoint-on-column-with-no-offsets-in-gcd-script.js
@@ -175,18 +174,16 @@ reason = bug 820380
 skip-if = toolkit == "gonk"
 reason = bug 820380
 [test_sourcemaps-08.js]
 [test_sourcemaps-09.js]
 [test_sourcemaps-10.js]
 [test_sourcemaps-11.js]
 [test_sourcemaps-12.js]
 [test_sourcemaps-13.js]
-[test_sourcemaps-14.js]
-[test_sourcemaps-15.js]
 [test_sourcemaps-16.js]
 [test_objectgrips-01.js]
 [test_objectgrips-02.js]
 [test_objectgrips-03.js]
 [test_objectgrips-04.js]
 [test_objectgrips-05.js]
 [test_objectgrips-06.js]
 [test_objectgrips-07.js]
@@ -231,29 +228,16 @@ reason = bug 820380
 [test_profiler_close.js]
 [test_profiler_data.js]
 [test_profiler_events-01.js]
 [test_profiler_getbufferinfo.js]
 [test_profiler_getfeatures.js]
 [test_profiler_getsharedlibraryinformation.js]
 [test_unsafeDereference.js]
 [test_add_actors.js]
-[test_trace_actor-01.js]
-[test_trace_actor-02.js]
-[test_trace_actor-03.js]
-[test_trace_actor-04.js]
-[test_trace_actor-05.js]
-[test_trace_actor-06.js]
-[test_trace_actor-07.js]
-[test_trace_actor-08.js]
-[test_trace_actor-09.js]
-[test_trace_actor-10.js]
-[test_trace_actor-11.js]
-[test_trace_actor-12.js]
-[test_trace_actor-13.js]
 [test_ignore_caught_exceptions.js]
 [test_requestTypes.js]
 reason = bug 937197
 [test_layout-reflows-observer.js]
 [test_protocolSpec.js]
 [test_registerClient.js]
 [test_client_request.js]
 [test_monitor_actor.js]
--- a/tools/mercurial/mach_commands.py
+++ b/tools/mercurial/mach_commands.py
@@ -44,18 +44,22 @@ class VersionControlCommands(object):
             config_paths.insert(0, '~/mercurial.ini')
         config_paths = map(os.path.expanduser, config_paths)
 
         # Touch a file so we can periodically prompt to update extensions.
         #
         # We put this before main command logic because the command can
         # persistently fail and we want people to get credit for the
         # intention, not whether the command is bug free.
-        state_path = os.path.join(self._context.state_dir,
-            'mercurial/setup.lastcheck')
+        state_dir = os.path.join(self._context.state_dir, 'mercurial')
+        if not os.path.isdir(state_dir):
+            os.makedirs(state_dir)
+
+        state_path = os.path.join(state_dir, 'setup.lastcheck')
+
         with open(state_path, 'a'):
             os.utime(state_path, None)
 
         if update_only:
             from hgsetup.update import MercurialUpdater
             updater = MercurialUpdater(self._context.state_dir)
             result = updater.update_all(map(os.path.expanduser, config_paths))
         else:
--- a/widget/PluginWidgetProxy.cpp
+++ b/widget/PluginWidgetProxy.cpp
@@ -30,18 +30,17 @@ NS_IMPL_ISUPPORTS_INHERITED(PluginWidget
     NS_WARNING("called on an invalid channel.");              \
     return NS_ERROR_FAILURE;                                  \
   }                                                           \
 } while (0)
 
 PluginWidgetProxy::PluginWidgetProxy(dom::TabChild* aTabChild,
                                      mozilla::plugins::PluginWidgetChild* aActor) :
   PuppetWidget(aTabChild),
-  mActor(aActor),
-  mCachedPluginPort(0)
+  mActor(aActor)
 {
   // See ChannelDestroyed() in the header
   mActor->SetWidget(this);
 }
 
 PluginWidgetProxy::~PluginWidgetProxy()
 {
   PWLOG("PluginWidgetProxy::~PluginWidgetProxy()\n");
@@ -70,25 +69,26 @@ PluginWidgetProxy::Create(nsIWidget*    
   mVisible = true;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 PluginWidgetProxy::SetParent(nsIWidget* aNewParent)
 {
+  mParent = aNewParent;
+
   nsCOMPtr<nsIWidget> kungFuDeathGrip(this);
   nsIWidget* parent = GetParent();
   if (parent) {
     parent->RemoveChild(this);
   }
   if (aNewParent) {
     aNewParent->AddChild(this);
   }
-  mParent = aNewParent;
   return NS_OK;
 }
 
 nsIWidget*
 PluginWidgetProxy::GetParent(void)
 {
   return mParent.get();
 }
@@ -130,24 +130,20 @@ PluginWidgetProxy::GetNativeData(uint32_
     case NS_NATIVE_PLUGIN_PORT:
     case NS_NATIVE_WINDOW:
     case NS_NATIVE_SHAREABLE_WINDOW:
       break;
     default:
       NS_WARNING("PluginWidgetProxy::GetNativeData received request for unsupported data type.");
       return nullptr;
   }
-  // The parent side window handle or xid never changes so we can
-  // cache this for our lifetime.
-  if (mCachedPluginPort) {
-    return (void*)mCachedPluginPort;
-  }
-  mActor->SendGetNativePluginPort(&mCachedPluginPort);
-  PWLOG("PluginWidgetProxy::GetNativeData %p\n", (void*)mCachedPluginPort);
-  return (void*)mCachedPluginPort;
+  uintptr_t value = 0;
+  mActor->SendGetNativePluginPort(&value);
+  PWLOG("PluginWidgetProxy::GetNativeData %p\n", (void*)value);
+  return (void*)value;
 }
 
 #if defined(XP_WIN)
 void
 PluginWidgetProxy::SetNativeData(uint32_t aDataType, uintptr_t aVal)
 {
   if (!mActor) {
     return;
--- a/widget/PluginWidgetProxy.h
+++ b/widget/PluginWidgetProxy.h
@@ -61,15 +61,14 @@ public:
   void ChannelDestroyed() { mActor = nullptr; }
 
 private:
   // Our connection with the chrome widget, created on PBrowser.
   mozilla::plugins::PluginWidgetChild* mActor;
   // PuppetWidget does not implement parent apis, but we need
   // them for plugin widgets.
   nsCOMPtr<nsIWidget> mParent;
-  uintptr_t mCachedPluginPort;
 };
 
 } // namespace widget
 } // namespace mozilla
 
 #endif
--- a/widget/PuppetWidget.cpp
+++ b/widget/PuppetWidget.cpp
@@ -981,17 +981,18 @@ NS_IMETHODIMP
 PuppetWidget::MemoryPressureObserver::Observe(nsISupports* aSubject,
                                               const char* aTopic,
                                               const char16_t* aData)
 {
   if (!mWidget) {
     return NS_OK;
   }
 
-  if (strcmp("memory-pressure", aTopic) == 0) {
+  if (strcmp("memory-pressure", aTopic) == 0 &&
+      !NS_LITERAL_STRING("lowering-priority").Equals(aData)) {
     if (!mWidget->mVisible && mWidget->mLayerManager &&
         XRE_IsContentProcess()) {
       mWidget->mLayerManager->ClearCachedResources();
     }
   }
   return NS_OK;
 }
 
--- a/xpcom/base/nsIMemory.idl
+++ b/xpcom/base/nsIMemory.idl
@@ -13,17 +13,17 @@
  * The frozen exported symbols moz_xmalloc, moz_xrealloc, and free
  * provide a more efficient way to access XPCOM memory allocation. Using
  * those symbols is preferred to using the methods on this interface.
  *
  * A client that wishes to be notified of low memory situations (for
  * example, because the client maintains a large memory cache that
  * could be released when memory is tight) should register with the
  * observer service (see nsIObserverService) using the topic 
- * "memory-pressure". There are three specific types of notications 
+ * "memory-pressure".  There are specific types of notications 
  * that can occur.  These types will be passed as the |aData| 
  * parameter of the of the "memory-pressure" notification: 
  * 
  * "low-memory"
  * This will be passed as the extra data when the pressure 
  * observer is being asked to flush for low-memory conditions.
  *
  * "low-memory-ongoing"
@@ -40,16 +40,22 @@
  * This will be passed as the extra data when the pressure 
  * observer is being asked to flush because of a heap minimize 
  * call.
  *
  * "alloc-failure"
  * This will be passed as the extra data when the pressure 
  * observer has been asked to flush because a malloc() or 
  * realloc() has failed.
+ *
+ * "lowering-priority"
+ * This will be passed as the extra data when the priority of a child
+ * process is lowered. The pressure observers could take the chance to
+ * clear caches that could be easily regenerated. This type of
+ * notification only appears in child processes.
  */
 
 [scriptable, uuid(1e004834-6d8f-425a-bc9c-a2812ed43bb7)]
 interface nsIMemory : nsISupports
 {
     /**
      * Attempts to shrink the heap.
      * @param immediate - if true, heap minimization will occur