Bug 1532567 - remove unused eval method from threadClient and threadActor; r=bhackett
authoryulia <ystartsev@mozilla.com>
Tue, 12 Mar 2019 15:03:47 +0000
changeset 521859 252240cd6878
parent 521858 bfb30a402bce
child 521860 14c61ee043c8
push id10870
push usernbeleuzu@mozilla.com
push dateFri, 15 Mar 2019 20:00:07 +0000
treeherdermozilla-beta@c594aee5b7a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs1532567
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1532567 - remove unused eval method from threadClient and threadActor; r=bhackett Differential Revision: https://phabricator.services.mozilla.com/D21700
devtools/client/debugger/new/test/mochitest/browser_dbg-scroll-run-to-completion.js
devtools/client/debugger/new/test/mochitest/helpers.js
devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-01.js
devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-02.js
devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-03.js
devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-04.js
devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-05.js
devtools/client/webreplay/mochitest/browser_dbg_rr_console_warp-01.js
devtools/client/webreplay/mochitest/browser_dbg_rr_logpoint-01.js
devtools/client/webreplay/mochitest/browser_dbg_rr_recovery-01.js
devtools/client/webreplay/mochitest/browser_dbg_rr_replay-01.js
devtools/client/webreplay/mochitest/browser_dbg_rr_replay-02.js
devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-01.js
devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-02.js
devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-03.js
devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-04.js
devtools/client/webreplay/mochitest/head.js
devtools/server/actors/thread.js
devtools/server/tests/unit/test_blackboxing-02.js
devtools/server/tests/unit/test_blackboxing-04.js
devtools/server/tests/unit/test_breakpoint-08.js
devtools/server/tests/unit/test_eval-01.js
devtools/server/tests/unit/test_eval-02.js
devtools/server/tests/unit/test_eval-03.js
devtools/server/tests/unit/test_eval-04.js
devtools/server/tests/unit/test_eval-05.js
devtools/server/tests/unit/test_new_source-02.js
devtools/server/tests/unit/testactors.js
devtools/server/tests/unit/xpcshell.ini
devtools/shared/client/thread-client.js
--- a/devtools/client/debugger/new/test/mochitest/browser_dbg-scroll-run-to-completion.js
+++ b/devtools/client/debugger/new/test/mochitest/browser_dbg-scroll-run-to-completion.js
@@ -3,17 +3,17 @@
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
 add_task(async function() {
   const dbg = await initDebugger("doc-scroll-run-to-completion.html");
   invokeInTab("pauseOnce", "doc-scroll-run-to-completion.html");
   await waitForPaused(dbg);
   assertPausedLocation(dbg);
 
-  const threadClient = dbg.toolbox.threadClient;
-  await checkEvaluateInTopFrame(threadClient, 'window.scrollBy(0, 10);', undefined);
+  const target = dbg.toolbox.target;
+  await checkEvaluateInTopFrame(target, 'window.scrollBy(0, 10);', undefined);
 
   // checkEvaluateInTopFrame does an implicit resume for some reason.
   await waitForPaused(dbg);
 
   resume(dbg);
   await once(Services.ppmm, "test passed");
 });
--- a/devtools/client/debugger/new/test/mochitest/helpers.js
+++ b/devtools/client/debugger/new/test/mochitest/helpers.js
@@ -1593,32 +1593,24 @@ function hideConsoleContextMenu(hud) {
 
   const onPopupHidden = once(popup, "popuphidden");
   popup.hidePopup();
   return onPopupHidden;
 }
 
 // Return a promise that resolves with the result of a thread evaluating a
 // string in the topmost frame.
-async function evaluateInTopFrame(threadClient, text) {
+async function evaluateInTopFrame(target, text) {
+  const threadClient = target.threadClient;
+  const consoleFront = await target.getFront("console");
   const { frames } = await threadClient.getFrames(0, 1);
   ok(frames.length == 1, "Got one frame");
-  const response = await threadClient.eval(frames[0].actor, text);
-  ok(response.type == "resumed", "Got resume response from eval");
-  let rval;
-  await threadClient.addOneTimeListener("paused", function(event, packet) {
-    ok(
-      packet.type == "paused" &&
-        packet.why.type == "clientEvaluated" &&
-        "return" in packet.why.frameFinished,
-      "Eval returned a value"
-    );
-    rval = packet.why.frameFinished.return;
-  });
-  return rval.type == "undefined" ? undefined : rval;
+  const options = { thread: threadClient.actor, frameActor: frames[0].actor };
+  const response = await consoleFront.evaluateJS(text, options);
+  return response.result.type == "undefined" ? undefined : response.result;
 }
 
 // Return a promise that resolves when a thread evaluates a string in the
 // topmost frame, ensuring the result matches the expected value.
-async function checkEvaluateInTopFrame(threadClient, text, expected) {
-  const rval = await evaluateInTopFrame(threadClient, text);
+async function checkEvaluateInTopFrame(target, text, expected) {
+  const rval = await evaluateInTopFrame(target, text);
   ok(rval == expected, `Eval returned ${expected}`);
 }
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-01.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-01.js
@@ -7,37 +7,37 @@
 "use strict";
 
 // Test basic breakpoint functionality in web replay.
 add_task(async function() {
   const dbg = await attachRecordingDebugger(
     "doc_rr_basic.html",
     { waitForRecording: true }
   );
-  const {threadClient, tab, toolbox} = dbg;
+  const {threadClient, tab, toolbox, target} = dbg;
 
   const bp = await setBreakpoint(threadClient, "doc_rr_basic.html", 21);
 
   // Visit a lot of breakpoints so that we are sure we have crossed major
   // checkpoint boundaries.
   await rewindToLine(threadClient, 21);
-  await checkEvaluateInTopFrame(threadClient, "number", 10);
+  await checkEvaluateInTopFrame(target, "number", 10);
   await rewindToLine(threadClient, 21);
-  await checkEvaluateInTopFrame(threadClient, "number", 9);
+  await checkEvaluateInTopFrame(target, "number", 9);
   await rewindToLine(threadClient, 21);
-  await checkEvaluateInTopFrame(threadClient, "number", 8);
+  await checkEvaluateInTopFrame(target, "number", 8);
   await rewindToLine(threadClient, 21);
-  await checkEvaluateInTopFrame(threadClient, "number", 7);
+  await checkEvaluateInTopFrame(target, "number", 7);
   await rewindToLine(threadClient, 21);
-  await checkEvaluateInTopFrame(threadClient, "number", 6);
+  await checkEvaluateInTopFrame(target, "number", 6);
   await resumeToLine(threadClient, 21);
-  await checkEvaluateInTopFrame(threadClient, "number", 7);
+  await checkEvaluateInTopFrame(target, "number", 7);
   await resumeToLine(threadClient, 21);
-  await checkEvaluateInTopFrame(threadClient, "number", 8);
+  await checkEvaluateInTopFrame(target, "number", 8);
   await resumeToLine(threadClient, 21);
-  await checkEvaluateInTopFrame(threadClient, "number", 9);
+  await checkEvaluateInTopFrame(target, "number", 9);
   await resumeToLine(threadClient, 21);
-  await checkEvaluateInTopFrame(threadClient, "number", 10);
+  await checkEvaluateInTopFrame(target, "number", 10);
 
   await threadClient.removeBreakpoint(bp);
   await toolbox.closeToolbox();
   await gBrowser.removeTab(tab);
 });
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-02.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-02.js
@@ -5,23 +5,23 @@
 /* eslint-disable no-undef */
 
 "use strict";
 
 // Test unhandled divergence while evaluating at a breakpoint with Web Replay.
 add_task(async function() {
   const dbg = await attachRecordingDebugger("doc_rr_basic.html",
                                             { waitForRecording: true });
-  const {threadClient, tab, toolbox} = dbg;
+  const {threadClient, tab, toolbox, target} = dbg;
 
   const bp = await setBreakpoint(threadClient, "doc_rr_basic.html", 21);
   await rewindToLine(threadClient, 21);
-  await checkEvaluateInTopFrame(threadClient, "number", 10);
-  await checkEvaluateInTopFrameThrows(threadClient, "window.alert(3)");
-  await checkEvaluateInTopFrame(threadClient, "number", 10);
-  await checkEvaluateInTopFrameThrows(threadClient, "window.alert(3)");
-  await checkEvaluateInTopFrame(threadClient, "number", 10);
-  await checkEvaluateInTopFrame(threadClient, "testStepping2()", undefined);
+  await checkEvaluateInTopFrame(target, "number", 10);
+  await checkEvaluateInTopFrameThrows(target, "window.alert(3)");
+  await checkEvaluateInTopFrame(target, "number", 10);
+  await checkEvaluateInTopFrameThrows(target, "window.alert(3)");
+  await checkEvaluateInTopFrame(target, "number", 10);
+  await checkEvaluateInTopFrame(target, "testStepping2()", undefined);
 
   await threadClient.removeBreakpoint(bp);
   await toolbox.destroy();
   await gBrowser.removeTab(tab);
 });
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-03.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-03.js
@@ -4,23 +4,23 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 /* eslint-disable no-undef */
 
 "use strict";
 
 // Test some issues when stepping around after hitting a breakpoint while recording.
 add_task(async function() {
   const dbg = await attachRecordingDebugger("doc_rr_continuous.html");
-  const {threadClient, tab, toolbox} = dbg;
+  const {threadClient, tab, toolbox, target} = dbg;
 
   await threadClient.interrupt();
   const bp1 = await setBreakpoint(threadClient, "doc_rr_continuous.html", 19);
   await resumeToLine(threadClient, 19);
   await reverseStepOverToLine(threadClient, 18);
-  await checkEvaluateInTopFrame(threadClient,
+  await checkEvaluateInTopFrame(target,
     "SpecialPowers.Cu.recordReplayDirective(/* AlwaysTakeTemporarySnapshots */ 3)",
     undefined);
   await stepInToLine(threadClient, 22);
   const bp2 = await setBreakpoint(threadClient, "doc_rr_continuous.html", 24);
   await resumeToLine(threadClient, 24);
   const bp3 = await setBreakpoint(threadClient, "doc_rr_continuous.html", 22);
   await rewindToLine(threadClient, 22);
 
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-04.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-04.js
@@ -5,30 +5,30 @@
 /* eslint-disable no-undef */
 
 "use strict";
 
 // Test navigating back to earlier breakpoints while recording, then resuming
 // recording.
 add_task(async function() {
   const dbg = await attachRecordingDebugger("doc_rr_continuous.html");
-  const {threadClient, tab, toolbox} = dbg;
+  const {threadClient, tab, toolbox, target} = dbg;
 
   const bp = await setBreakpoint(threadClient, "doc_rr_continuous.html", 14);
   await resumeToLine(threadClient, 14);
-  const value = await evaluateInTopFrame(threadClient, "number");
+  const value = await evaluateInTopFrame(target, "number");
   await resumeToLine(threadClient, 14);
-  await checkEvaluateInTopFrame(threadClient, "number", value + 1);
+  await checkEvaluateInTopFrame(target, "number", value + 1);
   await rewindToLine(threadClient, 14);
-  await checkEvaluateInTopFrame(threadClient, "number", value);
+  await checkEvaluateInTopFrame(target, "number", value);
   await resumeToLine(threadClient, 14);
-  await checkEvaluateInTopFrame(threadClient, "number", value + 1);
+  await checkEvaluateInTopFrame(target, "number", value + 1);
   await resumeToLine(threadClient, 14);
-  await checkEvaluateInTopFrame(threadClient, "number", value + 2);
+  await checkEvaluateInTopFrame(target, "number", value + 2);
   await resumeToLine(threadClient, 14);
-  await checkEvaluateInTopFrame(threadClient, "number", value + 3);
+  await checkEvaluateInTopFrame(target, "number", value + 3);
   await rewindToLine(threadClient, 14);
-  await checkEvaluateInTopFrame(threadClient, "number", value + 2);
+  await checkEvaluateInTopFrame(target, "number", value + 2);
 
   await threadClient.removeBreakpoint(bp);
   await toolbox.destroy();
   await gBrowser.removeTab(tab);
 });
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-05.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_breakpoints-05.js
@@ -9,23 +9,23 @@
 // Test hitting breakpoints when rewinding past the point where the breakpoint
 // script was created.
 add_task(async function() {
   const dbg = await attachRecordingDebugger(
     "doc_rr_basic.html",
     { waitForRecording: true }
   );
 
-  const {threadClient, tab, toolbox} = dbg;
+  const {threadClient, tab, toolbox, target} = dbg;
 
   // Rewind to the beginning of the recording.
   await rewindToLine(threadClient, undefined);
 
   const bp = await setBreakpoint(threadClient, "doc_rr_basic.html", 21);
   await resumeToLine(threadClient, 21);
-  await checkEvaluateInTopFrame(threadClient, "number", 1);
+  await checkEvaluateInTopFrame(target, "number", 1);
   await resumeToLine(threadClient, 21);
-  await checkEvaluateInTopFrame(threadClient, "number", 2);
+  await checkEvaluateInTopFrame(target, "number", 2);
 
   await threadClient.removeBreakpoint(bp);
   await toolbox.destroy();
   await gBrowser.removeTab(tab);
 });
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_console_warp-01.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_console_warp-01.js
@@ -8,31 +8,31 @@
 
 // Test basic console time warping functionality in web replay.
 add_task(async function() {
   const dbg = await attachRecordingDebugger(
     "doc_rr_error.html",
     { waitForRecording: true }
   );
 
-  const {tab, toolbox, threadClient} = dbg;
+  const {tab, toolbox, threadClient, target} = dbg;
   const console = await getDebuggerSplitConsole(dbg);
   const hud = console.hud;
 
   await warpToMessage(hud, dbg, "Number 5");
   await threadClient.interrupt();
 
-  await checkEvaluateInTopFrame(threadClient, "number", 5);
+  await checkEvaluateInTopFrame(target, "number", 5);
 
   // Initially we are paused inside the 'new Error()' call on line 19. The
   // first reverse step takes us to the start of that line.
   await reverseStepOverToLine(threadClient, 19);
   await reverseStepOverToLine(threadClient, 18);
   const bp = await setBreakpoint(threadClient, "doc_rr_error.html", 12);
   await rewindToLine(threadClient, 12);
-  await checkEvaluateInTopFrame(threadClient, "number", 4);
+  await checkEvaluateInTopFrame(target, "number", 4);
   await resumeToLine(threadClient, 12);
-  await checkEvaluateInTopFrame(threadClient, "number", 5);
+  await checkEvaluateInTopFrame(target, "number", 5);
 
   await threadClient.removeBreakpoint(bp);
   await toolbox.destroy();
   await gBrowser.removeTab(tab);
 });
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_logpoint-01.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_logpoint-01.js
@@ -9,17 +9,17 @@
 // Test basic logpoint functionality in web replay. When logpoints are added,
 // new messages should appear in the correct order and allow time warping.
 add_task(async function() {
   const dbg = await attachRecordingDebugger(
     "doc_rr_basic.html",
     { waitForRecording: true }
   );
 
-  const {tab, toolbox, threadClient} = dbg;
+  const {tab, toolbox, threadClient, target} = dbg;
   const console = await getDebuggerSplitConsole(dbg);
   const hud = console.hud;
 
   const bp1 = await setBreakpoint(threadClient, "doc_rr_basic.html", 21,
                                   { logValue: `"Logpoint Number " + number` });
   const bp2 = await setBreakpoint(threadClient, "doc_rr_basic.html", 6,
                                   { logValue: `"Logpoint Beginning"` });
   const bp3 = await setBreakpoint(threadClient, "doc_rr_basic.html", 8,
@@ -30,17 +30,17 @@ add_task(async function() {
   for (let i = 1; i <= 10; i++) {
     ok(messages[i].textContent.includes("Number " + i));
   }
   ok(messages[11].textContent.includes("Ending"));
 
   await warpToMessage(hud, dbg, "Number 5");
   await threadClient.interrupt();
 
-  await checkEvaluateInTopFrame(threadClient, "number", 5);
+  await checkEvaluateInTopFrame(target, "number", 5);
   await reverseStepOverToLine(threadClient, 20);
 
   await threadClient.removeBreakpoint(bp1);
   await threadClient.removeBreakpoint(bp2);
   await threadClient.removeBreakpoint(bp3);
   await toolbox.destroy();
   await gBrowser.removeTab(tab);
 });
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_recovery-01.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_recovery-01.js
@@ -8,24 +8,24 @@
 
 // Test basic recovery of crashed child processes in web replay.
 add_task(async function() {
   const tab = BrowserTestUtils.addTab(gBrowser, null, { recordExecution: "*" });
   gBrowser.selectedTab = tab;
   openTrustedLinkIn(EXAMPLE_URL + "doc_rr_recovery.html", "current");
   await once(Services.ppmm, "RecordingFinished");
 
-  const toolbox = await attachDebugger(tab), client = toolbox.threadClient;
+  const { target, toolbox } = await attachDebugger(tab), client = toolbox.threadClient;
   await client.interrupt();
   await setBreakpoint(client, "doc_rr_recovery.html", 21);
   await rewindToLine(client, 21);
   await checkEvaluateInTopFrame(client,
     "SpecialPowers.Cu.recordReplayDirective(/* CrashSoon */ 1)",
     undefined);
   await stepOverToLine(client, 22);
   await stepOverToLine(client, 23);
-  await checkEvaluateInTopFrame(client,
+  await checkEvaluateInTopFrame(target,
     "SpecialPowers.Cu.recordReplayDirective(/* CrashSoon */ 1); " +
     "SpecialPowers.Cu.recordReplayDirective(/* MaybeCrash */ 2)",
     undefined);
   await toolbox.destroy();
   await gBrowser.removeTab(tab);
 });
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_replay-01.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_replay-01.js
@@ -20,23 +20,24 @@ add_task(async function() {
   ok(tabParent.saveRecording(recordingFile), "Saved recording");
   await once(Services.ppmm, "SaveRecordingFinished");
 
   const replayingTab = BrowserTestUtils.addTab(gBrowser, null,
                                                { replayExecution: recordingFile });
   gBrowser.selectedTab = replayingTab;
   await once(Services.ppmm, "HitRecordingEndpoint");
 
-  const toolbox = await attachDebugger(replayingTab), client = toolbox.threadClient;
+  const { target, toolbox } = await attachDebugger(replayingTab);
+  const client = toolbox.threadClient;
   await client.interrupt();
   const bp = await setBreakpoint(client, "doc_rr_basic.html", 21);
   await rewindToLine(client, 21);
-  await checkEvaluateInTopFrame(client, "number", 10);
+  await checkEvaluateInTopFrame(target, "number", 10);
   await rewindToLine(client, 21);
-  await checkEvaluateInTopFrame(client, "number", 9);
+  await checkEvaluateInTopFrame(target, "number", 9);
   await resumeToLine(client, 21);
-  await checkEvaluateInTopFrame(client, "number", 10);
+  await checkEvaluateInTopFrame(target, "number", 10);
 
   await client.removeBreakpoint(bp);
   await toolbox.destroy();
   await gBrowser.removeTab(recordingTab);
   await gBrowser.removeTab(replayingTab);
 });
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_replay-02.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_replay-02.js
@@ -10,45 +10,50 @@
 add_task(async function() {
   waitForExplicitFinish();
 
   const recordingFile = newRecordingFile();
   const recordingTab = BrowserTestUtils.addTab(gBrowser, null, { recordExecution: "*" });
   gBrowser.selectedTab = recordingTab;
   openTrustedLinkIn(EXAMPLE_URL + "doc_rr_continuous.html", "current");
 
-  let toolbox = await attachDebugger(recordingTab), client = toolbox.threadClient;
+  const firstTab = await attachDebugger(recordingTab);
+  let toolbox = firstTab.toolbox;
+  let target = firstTab.target;
+  let client = toolbox.threadClient;
   await client.interrupt();
   let bp = await setBreakpoint(client, "doc_rr_continuous.html", 14);
   await resumeToLine(client, 14);
   await resumeToLine(client, 14);
   await reverseStepOverToLine(client, 13);
-  const lastNumberValue = await evaluateInTopFrame(client, "number");
+  const lastNumberValue = await evaluateInTopFrame(target, "number");
 
   const tabParent = recordingTab.linkedBrowser.frameLoader.tabParent;
   ok(tabParent, "Found recording tab parent");
   ok(tabParent.saveRecording(recordingFile), "Saved recording");
   await once(Services.ppmm, "SaveRecordingFinished");
 
   await client.removeBreakpoint(bp);
   await toolbox.destroy();
   await gBrowser.removeTab(recordingTab);
 
   const replayingTab = BrowserTestUtils.addTab(gBrowser, null,
                                                { replayExecution: recordingFile });
   gBrowser.selectedTab = replayingTab;
   await once(Services.ppmm, "HitRecordingEndpoint");
 
-  toolbox = await attachDebugger(replayingTab);
+  const rplyTab = await attachDebugger(replayingTab);
+  toolbox = rplyTab.toolbox;
+  target = rplyTab.target;
   client = toolbox.threadClient;
   await client.interrupt();
-  await checkEvaluateInTopFrame(client, "number", lastNumberValue);
+  await checkEvaluateInTopFrame(target, "number", lastNumberValue);
   await reverseStepOverToLine(client, 13);
   bp = await setBreakpoint(client, "doc_rr_continuous.html", 14);
   await rewindToLine(client, 14);
-  await checkEvaluateInTopFrame(client, "number", lastNumberValue - 1);
+  await checkEvaluateInTopFrame(target, "number", lastNumberValue - 1);
   await resumeToLine(client, 14);
-  await checkEvaluateInTopFrame(client, "number", lastNumberValue);
+  await checkEvaluateInTopFrame(target, "number", lastNumberValue);
 
   await client.removeBreakpoint(bp);
   await toolbox.destroy();
   await gBrowser.removeTab(replayingTab);
 });
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-01.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-01.js
@@ -8,23 +8,23 @@
 
 // Test basic step-over/back functionality in web replay.
 add_task(async function() {
   const tab = BrowserTestUtils.addTab(gBrowser, null, { recordExecution: "*" });
   gBrowser.selectedTab = tab;
   openTrustedLinkIn(EXAMPLE_URL + "doc_rr_basic.html", "current");
   await once(Services.ppmm, "RecordingFinished");
 
-  const toolbox = await attachDebugger(tab), client = toolbox.threadClient;
+  const { target, toolbox } = await attachDebugger(tab), client = toolbox.threadClient;
   await client.interrupt();
   const bp = await setBreakpoint(client, "doc_rr_basic.html", 21);
   await rewindToLine(client, 21);
-  await checkEvaluateInTopFrame(client, "number", 10);
+  await checkEvaluateInTopFrame(target, "number", 10);
   await reverseStepOverToLine(client, 20);
-  await checkEvaluateInTopFrame(client, "number", 9);
-  await checkEvaluateInTopFrameThrows(client, "window.alert(3)");
+  await checkEvaluateInTopFrame(target, "number", 9);
+  await checkEvaluateInTopFrameThrows(target, "window.alert(3)");
   await stepOverToLine(client, 21);
-  await checkEvaluateInTopFrame(client, "number", 10);
+  await checkEvaluateInTopFrame(target, "number", 10);
 
   await client.removeBreakpoint(bp);
   await toolbox.destroy();
   await gBrowser.removeTab(tab);
 });
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-02.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-02.js
@@ -8,17 +8,17 @@
 
 // Test fixes for some simple stepping bugs.
 add_task(async function() {
   const tab = BrowserTestUtils.addTab(gBrowser, null, { recordExecution: "*" });
   gBrowser.selectedTab = tab;
   openTrustedLinkIn(EXAMPLE_URL + "doc_rr_basic.html", "current");
   await once(Services.ppmm, "RecordingFinished");
 
-  const toolbox = await attachDebugger(tab), client = toolbox.threadClient;
+  const { toolbox } = await attachDebugger(tab), client = toolbox.threadClient;
   await client.interrupt();
   const bp = await setBreakpoint(client, "doc_rr_basic.html", 22);
   await rewindToLine(client, 22);
   await stepInToLine(client, 25);
   await stepOverToLine(client, 26);
   await stepOverToLine(client, 27);
   await reverseStepInToLine(client, 33);
   await reverseStepOverToLine(client, 32);
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-03.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-03.js
@@ -7,23 +7,24 @@
 "use strict";
 
 // Test stepping back while recording, then resuming recording.
 add_task(async function() {
   const tab = BrowserTestUtils.addTab(gBrowser, null, { recordExecution: "*" });
   gBrowser.selectedTab = tab;
   openTrustedLinkIn(EXAMPLE_URL + "doc_rr_continuous.html", "current");
 
-  const toolbox = await attachDebugger(tab), client = toolbox.threadClient;
+  const { toolbox, target } = await attachDebugger(tab);
+  const client = toolbox.threadClient;
   await client.interrupt();
   const bp = await setBreakpoint(client, "doc_rr_continuous.html", 13);
   await resumeToLine(client, 13);
-  const value = await evaluateInTopFrame(client, "number");
+  const value = await evaluateInTopFrame(target, "number");
   await reverseStepOverToLine(client, 12);
-  await checkEvaluateInTopFrame(client, "number", value - 1);
+  await checkEvaluateInTopFrame(target, "number", value - 1);
   await resumeToLine(client, 13);
   await resumeToLine(client, 13);
-  await checkEvaluateInTopFrame(client, "number", value + 1);
+  await checkEvaluateInTopFrame(target, "number", value + 1);
 
   await client.removeBreakpoint(bp);
   await toolbox.destroy();
   await gBrowser.removeTab(tab);
 });
--- a/devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-04.js
+++ b/devtools/client/webreplay/mochitest/browser_dbg_rr_stepping-04.js
@@ -8,36 +8,36 @@
 
 // Stepping past the beginning or end of a frame should act like a step-out.
 add_task(async function() {
   const tab = BrowserTestUtils.addTab(gBrowser, null, { recordExecution: "*" });
   gBrowser.selectedTab = tab;
   openTrustedLinkIn(EXAMPLE_URL + "doc_rr_basic.html", "current");
   await once(Services.ppmm, "RecordingFinished");
 
-  const toolbox = await attachDebugger(tab), client = toolbox.threadClient;
+  const { target, toolbox } = await attachDebugger(tab), client = toolbox.threadClient;
   await client.interrupt();
   const bp = await setBreakpoint(client, "doc_rr_basic.html", 21);
   await rewindToLine(client, 21);
-  await checkEvaluateInTopFrame(client, "number", 10);
+  await checkEvaluateInTopFrame(target, "number", 10);
   await reverseStepOverToLine(client, 20);
   await reverseStepOverToLine(client, 12);
 
   // After reverse-stepping out of the topmost frame we should rewind to the
   // last breakpoint hit.
   await reverseStepOverToLine(client, 21);
-  await checkEvaluateInTopFrame(client, "number", 9);
+  await checkEvaluateInTopFrame(target, "number", 9);
 
   await stepOverToLine(client, 22);
   await stepOverToLine(client, 23);
   await stepOverToLine(client, 13);
   await stepOverToLine(client, 17);
   await stepOverToLine(client, 18);
 
   // After forward-stepping out of the topmost frame we should run forward to
   // the next breakpoint hit.
   await stepOverToLine(client, 21);
-  await checkEvaluateInTopFrame(client, "number", 10);
+  await checkEvaluateInTopFrame(target, "number", 10);
 
   await client.removeBreakpoint(bp);
   await toolbox.destroy();
   await gBrowser.removeTab(tab);
 });
--- a/devtools/client/webreplay/mochitest/head.js
+++ b/devtools/client/webreplay/mochitest/head.js
@@ -19,34 +19,34 @@ Services.scriptloader.loadSubScript(
 const EXAMPLE_URL =
   "http://example.com/browser/devtools/client/webreplay/mochitest/examples/";
 
 // Attach a debugger to a tab, returning a promise that resolves with the
 // debugger's toolbox.
 async function attachDebugger(tab) {
   const target = await TargetFactory.forTab(tab);
   const toolbox = await gDevTools.showToolbox(target, "jsdebugger");
-  return toolbox;
+  return { toolbox, target };
 }
 
 async function attachRecordingDebugger(url,
     { waitForRecording } = { waitForRecording: false }) {
   const tab = BrowserTestUtils.addTab(gBrowser, null, { recordExecution: "*" });
   gBrowser.selectedTab = tab;
   openTrustedLinkIn(EXAMPLE_URL + url, "current");
 
   if (waitForRecording) {
     await once(Services.ppmm, "RecordingFinished");
   }
-  const toolbox = await attachDebugger(tab);
+  const { target, toolbox } = await attachDebugger(tab);
   const dbg = createDebuggerContext(toolbox);
   const threadClient = dbg.toolbox.threadClient;
 
   await threadClient.interrupt();
-  return {...dbg, tab, threadClient};
+  return {...dbg, tab, threadClient, target};
 }
 
 // Return a promise that resolves when a breakpoint has been set.
 async function setBreakpoint(threadClient, expectedFile, lineno, options = {}) {
   const {sources} = await threadClient.getSources();
   ok(sources.length == 1, "Got one source");
   ok(RegExp(expectedFile).test(sources[0].url), "Source is " + expectedFile);
   const location = { sourceUrl: sources[0].url, line: lineno };
@@ -73,26 +73,24 @@ var reverseStepOverToLine = resumeThenPa
 var stepOverToLine = resumeThenPauseAtLineFunctionFactory("stepOver");
 var reverseStepInToLine = resumeThenPauseAtLineFunctionFactory("reverseStepIn");
 var stepInToLine = resumeThenPauseAtLineFunctionFactory("stepIn");
 var reverseStepOutToLine = resumeThenPauseAtLineFunctionFactory("reverseStepOut");
 var stepOutToLine = resumeThenPauseAtLineFunctionFactory("stepOut");
 
 // Return a promise that resolves when a thread evaluates a string in the
 // topmost frame, with the result throwing an exception.
-async function checkEvaluateInTopFrameThrows(threadClient, text) {
-  const {frames} = await threadClient.getFrames(0, 1);
+async function checkEvaluateInTopFrameThrows(target, text) {
+  const threadClient = target.threadClient;
+  const consoleFront = await target.getFront("console");
+  const { frames } = await threadClient.getFrames(0, 1);
   ok(frames.length == 1, "Got one frame");
-  const response = await threadClient.eval(frames[0].actor, text);
-  ok(response.type == "resumed", "Got resume response from eval");
-  await threadClient.addOneTimeListener("paused", function(event, packet) {
-    ok(packet.type == "paused" &&
-       packet.why.type == "clientEvaluated" &&
-       "throw" in packet.why.frameFinished, "Eval threw an exception");
-  });
+  const options = { thread: threadClient.actor, frameActor: frames[0].actor };
+  const response = await consoleFront.evaluateJS(text, options);
+  ok(response.exception, "Eval threw an exception");
 }
 
 // Return a pathname that can be used for a new recording file.
 function newRecordingFile() {
   ChromeUtils.import("resource://gre/modules/osfile.jsm", this);
   return OS.Path.join(OS.Constants.Path.tmpDir,
                       "MochitestRecording" + Math.round(Math.random() * 1000000000));
 }
--- a/devtools/server/actors/thread.js
+++ b/devtools/server/actors/thread.js
@@ -1025,52 +1025,16 @@ const ThreadActor = ActorClassWithSpec(t
       rewinding ? (frame.offset == frame.script.mainOffset) : frame.reportedPop;
     const stepFrame = endOfFrame ? frame.older : frame;
     if (!stepFrame || !stepFrame.script) {
       return null;
     }
     return stepFrame;
   },
 
-  onClientEvaluate: function(request) {
-    if (this.state !== "paused") {
-      return { error: "wrongState",
-               message: "Debuggee must be paused to evaluate code." };
-    }
-
-    const frame = this._requestFrame(request.frame);
-    if (!frame) {
-      return { error: "unknownFrame",
-               message: "Evaluation frame not found" };
-    }
-
-    if (!frame.environment) {
-      return { error: "notDebuggee",
-               message: "cannot access the environment of this frame." };
-    }
-
-    const youngest = this.youngestFrame;
-
-    // Put ourselves back in the running state and inform the client.
-    const resumedPacket = this._resumed();
-    this.conn.send(resumedPacket);
-
-    // Run the expression.
-    // XXX: test syntax errors
-    const completion = frame.eval(request.expression);
-
-    // Put ourselves back in the pause state.
-    const packet = this._paused(youngest);
-    packet.why = { type: "clientEvaluated",
-                   frameFinished: this.createProtocolCompletionValue(completion) };
-
-    // Return back to our previous pause's event loop.
-    return packet;
-  },
-
   onFrames: function(request) {
     if (this.state !== "paused") {
       return { error: "wrongState",
                message: "Stack frames are only available while the debuggee is paused."};
     }
 
     const start = request.start ? request.start : 0;
     const count = request.count;
@@ -1738,17 +1702,16 @@ const ThreadActor = ActorClassWithSpec(t
   },
 });
 
 Object.assign(ThreadActor.prototype.requestTypes, {
   "attach": ThreadActor.prototype.onAttach,
   "detach": ThreadActor.prototype.onDetach,
   "reconfigure": ThreadActor.prototype.onReconfigure,
   "resume": ThreadActor.prototype.onResume,
-  "clientEvaluate": ThreadActor.prototype.onClientEvaluate,
   "frames": ThreadActor.prototype.onFrames,
   "interrupt": ThreadActor.prototype.onInterrupt,
   "sources": ThreadActor.prototype.onSources,
   "threadGrips": ThreadActor.prototype.onThreadGrips,
   "skipBreakpoints": ThreadActor.prototype.onSkipBreakpoints,
   "pauseOnExceptions": ThreadActor.prototype.onPauseOnExceptions,
   "dumpThread": ThreadActor.prototype.onDump,
 });
--- a/devtools/server/tests/unit/test_blackboxing-02.js
+++ b/devtools/server/tests/unit/test_blackboxing-02.js
@@ -28,29 +28,19 @@ function run_test() {
   });
   do_test_pending();
 }
 
 const BLACK_BOXED_URL = "http://example.com/blackboxme.js";
 const SOURCE_URL = "http://example.com/source.js";
 
 function test_black_box() {
-  gClient.addOneTimeListener("paused", function(event, packet) {
-    gThreadClient.eval(packet.frame.actor, "doStuff", function(response) {
-      gThreadClient.addOneTimeListener("paused", function(event, packet) {
-        const obj = gThreadClient.pauseGrip(packet.why.frameFinished.return);
-        obj.getDefinitionSite(runWithSource);
-      });
-    });
-
-    function runWithSource(packet) {
-      const source = gThreadClient.source(packet.source);
-      gThreadClient.setBreakpoint({ sourceUrl: source.url, line: 2 }, {});
-      gThreadClient.resume(test_black_box_breakpoint);
-    }
+  gClient.addOneTimeListener("paused", async function(event, packet) {
+    gThreadClient.setBreakpoint({ sourceUrl: BLACK_BOXED_URL, line: 2 }, {});
+    gThreadClient.resume(test_black_box_breakpoint);
   });
 
   /* eslint-disable no-multi-spaces, no-undef */
   Cu.evalInSandbox(
     "" + function doStuff(k) { // line 1
       const arg = 15;            // line 2 - Break here
       k(arg);                  // line 3
     },                         // line 4
--- a/devtools/server/tests/unit/test_blackboxing-04.js
+++ b/devtools/server/tests/unit/test_blackboxing-04.js
@@ -26,28 +26,18 @@ function run_test() {
   do_test_pending();
 }
 
 const BLACK_BOXED_URL = "http://example.com/blackboxme.js";
 const SOURCE_URL = "http://example.com/source.js";
 
 function test_black_box() {
   gClient.addOneTimeListener("paused", function(event, packet) {
-    gThreadClient.eval(packet.frame.actor, "doStuff", function(response) {
-      gThreadClient.addOneTimeListener("paused", function(event, packet) {
-        const obj = gThreadClient.pauseGrip(packet.why.frameFinished.return);
-        obj.getDefinitionSite(runWithSource);
-      });
-    });
-
-    function runWithSource(packet) {
-      const source = gThreadClient.source(packet.source);
-      gThreadClient.setBreakpoint({ sourceUrl: source.url, line: 2 }, {});
-      test_black_box_paused();
-    }
+    gThreadClient.setBreakpoint({ sourceUrl: BLACK_BOXED_URL, line: 2 }, {});
+    test_black_box_paused();
   });
 
   /* eslint-disable no-multi-spaces, no-undef */
   Cu.evalInSandbox(
     "" + function doStuff(k) { // line 1
       debugger;                // line 2
       k(100);                  // line 3
     },                         // line 4
--- a/devtools/server/tests/unit/test_breakpoint-08.js
+++ b/devtools/server/tests/unit/test_breakpoint-08.js
@@ -6,55 +6,49 @@
 
 /**
  * Check that setting a breakpoint in a line without code in a child script
  * will skip forward, in a file with two scripts.
  */
 
 add_task(threadClientTest(({ threadClient, debuggee }) => {
   return new Promise(resolve => {
-    threadClient.addOneTimeListener("paused", function(event, packet) {
-      threadClient.eval(packet.frame.actor, "foo", function(response) {
-        threadClient.addOneTimeListener("paused", async function(event, packet) {
-          const obj = threadClient.pauseGrip(packet.why.frameFinished.return);
-          const site = await obj.getDefinitionSite();
+    threadClient.addOneTimeListener("paused", async function(event, packet) {
+      const line = debuggee.line0 + 3;
+      const source = await getSourceById(
+        threadClient,
+        packet.frame.where.actor
+      );
 
-          const location = { line: debuggee.line0 + 3 };
-          const source = await getSourceById(
-            threadClient,
-            site.source.actor
-          );
-
-          source.setBreakpoint(location).then(function([response, bpClient]) {
-            // Check that the breakpoint has properly skipped forward one line.
-            Assert.equal(response.actualLocation.source.actor, source.actor);
-            Assert.equal(response.actualLocation.line, location.line + 1);
+      // this test has been disabled for a long time so the functionality doesn't work
+      const response = await threadClient
+        .setBreakpoint({ sourceUrl: source.url, line: line }, {});
+      // check that the breakpoint has properly skipped forward one line.
+      assert.equal(response.actuallocation.source.actor, source.actor);
+      Assert.equal(response.actualLocation.line, location.line + 1);
 
-            threadClient.addOneTimeListener("paused", function(event, packet) {
-              // Check the return value.
-              Assert.equal(packet.type, "paused");
-              Assert.equal(packet.frame.where.actor, source.actor);
-              Assert.equal(packet.frame.where.line, location.line + 1);
-              Assert.equal(packet.why.type, "breakpoint");
-              Assert.equal(packet.why.actors[0], bpClient.actor);
-              // Check that the breakpoint worked.
-              Assert.equal(debuggee.a, 1);
-              Assert.equal(debuggee.b, undefined);
+      threadClient.addOneTimeListener("paused", function(event, packet) {
+        // Check the return value.
+        Assert.equal(packet.type, "paused");
+        Assert.equal(packet.frame.where.actor, source.actor);
+        Assert.equal(packet.frame.where.line, location.line + 1);
+        Assert.equal(packet.why.type, "breakpoint");
+        Assert.equal(packet.why.actors[0], response.bpClient.actor);
+        // Check that the breakpoint worked.
+        Assert.equal(debuggee.a, 1);
+        Assert.equal(debuggee.b, undefined);
 
-              // Remove the breakpoint.
-              bpClient.remove(function(response) {
-                threadClient.resume(resolve);
-              });
-            });
-
-            // Continue until the breakpoint is hit.
-            threadClient.resume();
-          });
+        // Remove the breakpoint.
+        response.bpClient.remove(function(response) {
+          threadClient.resume(resolve);
         });
       });
+
+      // Continue until the breakpoint is hit.
+      threadClient.resume();
     });
 
     /* eslint-disable */
     Cu.evalInSandbox("var line0 = Error().lineNumber;\n" +
                      "function foo() {\n" + // line0 + 1
                      "  this.a = 1;\n" +    // line0 + 2
                      "  // A comment.\n" +  // line0 + 3
                      "  this.b = 2;\n" +    // line0 + 4
deleted file mode 100644
--- a/devtools/server/tests/unit/test_eval-01.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-/* eslint-disable no-shadow, max-nested-callbacks */
-
-"use strict";
-
-/**
- * Check basic eval resume/re-pause
- */
-
-var gDebuggee;
-var gClient;
-var gThreadClient;
-
-function run_test() {
-  Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
-  registerCleanupFunction(() => {
-    Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
-  });
-  initTestDebuggerServer();
-  gDebuggee = addTestGlobal("test-stack");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect().then(function() {
-    attachTestTabAndResume(gClient, "test-stack",
-                           function(response, targetFront, threadClient) {
-                             gThreadClient = threadClient;
-                             test_simple_eval();
-                           });
-  });
-  do_test_pending();
-}
-
-function test_simple_eval() {
-  gThreadClient.addOneTimeListener("paused", function(event, packet) {
-    const arg1Actor = packet.frame.arguments[0].actor;
-    gThreadClient.eval(null, "({ obj: true })", function(response) {
-      Assert.equal(response.type, "resumed");
-      // Expect a pause notification immediately.
-      gThreadClient.addOneTimeListener("paused", function(event, packet) {
-        // Check the return value...
-        Assert.equal(packet.type, "paused");
-        Assert.equal(packet.why.type, "clientEvaluated");
-        Assert.equal(packet.why.frameFinished.return.type, "object");
-        Assert.equal(packet.why.frameFinished.return.class, "Object");
-
-        // Make sure the previous pause lifetime was correctly dropped.
-        gClient.request({ to: arg1Actor, type: "bogusRequest" }, function(response) {
-          Assert.equal(response.error, "noSuchActor");
-          gThreadClient.resume(function() {
-            finishClient(gClient);
-          });
-        });
-      });
-    });
-  });
-
-  /* eslint-disable */
-  gDebuggee.eval("(" + function () {
-    function stopMe(arg1) { debugger; }
-    stopMe({obj: true});
-  } + ")()");
-  /* eslint-enable */
-}
deleted file mode 100644
--- a/devtools/server/tests/unit/test_eval-02.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-/* eslint-disable no-shadow, max-nested-callbacks */
-
-"use strict";
-
-/**
- * Check eval resume/re-pause with a throw.
- */
-
-var gDebuggee;
-var gClient;
-var gThreadClient;
-
-function run_test() {
-  Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
-  registerCleanupFunction(() => {
-    Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
-  });
-  initTestDebuggerServer();
-  gDebuggee = addTestGlobal("test-stack");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect().then(function() {
-    attachTestTabAndResume(gClient, "test-stack",
-                           function(response, targetFront, threadClient) {
-                             gThreadClient = threadClient;
-                             test_throw_eval();
-                           });
-  });
-  do_test_pending();
-}
-
-function test_throw_eval() {
-  gThreadClient.addOneTimeListener("paused", function(event, packet) {
-    gThreadClient.eval(null, "throw 'failure'", function(response) {
-      Assert.equal(response.type, "resumed");
-      // Expect a pause notification immediately.
-      gThreadClient.addOneTimeListener("paused", function(event, packet) {
-        // Check the return value...
-        Assert.equal(packet.type, "paused");
-        Assert.equal(packet.why.type, "clientEvaluated");
-        Assert.equal(packet.why.frameFinished.throw, "failure");
-        gThreadClient.resume(function() {
-          finishClient(gClient);
-        });
-      });
-    });
-  });
-
-  /* eslint-disable */
-  gDebuggee.eval("(" + function () {
-    function stopMe(arg1) { debugger; }
-    stopMe({obj: true});
-  } + ")()");
-  /* eslint-enable */
-}
deleted file mode 100644
--- a/devtools/server/tests/unit/test_eval-03.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-/* eslint-disable no-shadow, max-nested-callbacks */
-
-"use strict";
-
-/**
- * Check syntax errors in an eval.
- */
-
-var gDebuggee;
-var gClient;
-var gThreadClient;
-
-function run_test() {
-  Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
-  registerCleanupFunction(() => {
-    Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
-  });
-  initTestDebuggerServer();
-  gDebuggee = addTestGlobal("test-stack");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect().then().then(function() {
-    attachTestTabAndResume(gClient, "test-stack",
-                           function(response, targetFront, threadClient) {
-                             gThreadClient = threadClient;
-                             test_syntax_error_eval();
-                           });
-  });
-  do_test_pending();
-}
-
-function test_syntax_error_eval() {
-  gThreadClient.addOneTimeListener("paused", function(event, packet) {
-    gThreadClient.eval(null, "%$@!@#", function(response) {
-      Assert.equal(response.type, "resumed");
-      // Expect a pause notification immediately.
-      gThreadClient.addOneTimeListener("paused", function(event, packet) {
-        // Check the return value...
-        Assert.equal(packet.type, "paused");
-        Assert.equal(packet.why.type, "clientEvaluated");
-        Assert.equal(packet.why.frameFinished.throw.type, "object");
-        Assert.equal(packet.why.frameFinished.throw.class, "Error");
-
-        gThreadClient.resume(function() {
-          finishClient(gClient);
-        });
-      });
-    });
-  });
-
-  /* eslint-disable */
-  gDebuggee.eval("(" + function () {
-    function stopMe(arg1) { debugger; }
-    stopMe({obj: true});
-  } + ")()");
-  /* eslint-enable */
-}
deleted file mode 100644
--- a/devtools/server/tests/unit/test_eval-04.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-/* eslint-disable no-shadow, max-nested-callbacks */
-
-"use strict";
-
-/**
- * Check evals against different frames.
- */
-
-var gDebuggee;
-var gClient;
-var gThreadClient;
-
-function run_test() {
-  Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
-  registerCleanupFunction(() => {
-    Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
-  });
-  initTestDebuggerServer();
-  gDebuggee = addTestGlobal("test-stack");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect().then(function() {
-    attachTestTabAndResume(gClient, "test-stack",
-                           function(response, targetFront, threadClient) {
-                             gThreadClient = threadClient;
-                             test_different_frames_eval();
-                           });
-  });
-  do_test_pending();
-}
-
-function test_different_frames_eval() {
-  gThreadClient.addOneTimeListener("paused", function(event, packet) {
-    gThreadClient.getFrames(0, 2, function(response) {
-      const frame0 = response.frames[0];
-      const frame1 = response.frames[1];
-
-      // Eval against the top frame...
-      gThreadClient.eval(frame0.actor, "arg", function(response) {
-        Assert.equal(response.type, "resumed");
-        gThreadClient.addOneTimeListener("paused", function(event, packet) {
-          // 'arg' should have been evaluated in frame0
-          Assert.equal(packet.type, "paused");
-          Assert.equal(packet.why.type, "clientEvaluated");
-          Assert.equal(packet.why.frameFinished.return, "arg0");
-
-          // Now eval against the second frame.
-          gThreadClient.eval(frame1.actor, "arg", function(response) {
-            gThreadClient.addOneTimeListener("paused", function(event, packet) {
-              // 'arg' should have been evaluated in frame1
-              Assert.equal(packet.type, "paused");
-              Assert.equal(packet.why.frameFinished.return, "arg1");
-
-              gThreadClient.resume(function() {
-                finishClient(gClient);
-              });
-            });
-          });
-        });
-      });
-    });
-  });
-
-  gDebuggee.eval("(" + function() {
-    function frame0(arg) {
-      debugger;
-    }
-    function frame1(arg) {
-      frame0("arg0");
-    }
-    frame1("arg1");
-  } + ")()");
-}
deleted file mode 100644
--- a/devtools/server/tests/unit/test_eval-05.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-/* eslint-disable no-shadow, max-nested-callbacks */
-
-"use strict";
-
-/**
- * Check pauses within evals.
- */
-
-var gDebuggee;
-var gClient;
-var gThreadClient;
-
-function run_test() {
-  Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
-  registerCleanupFunction(() => {
-    Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
-  });
-  initTestDebuggerServer();
-  gDebuggee = addTestGlobal("test-stack");
-  gClient = new DebuggerClient(DebuggerServer.connectPipe());
-  gClient.connect().then(function() {
-    attachTestTabAndResume(gClient, "test-stack",
-                           function(response, targetFront, threadClient) {
-                             gThreadClient = threadClient;
-                             test_pauses_eval();
-                           });
-  });
-  do_test_pending();
-}
-
-function test_pauses_eval() {
-  gThreadClient.addOneTimeListener("paused", function(event, packet) {
-    gThreadClient.eval(null, "debugger", function(response) {
-      // Expect a resume then a debuggerStatement pause.
-      Assert.equal(response.type, "resumed");
-      gThreadClient.addOneTimeListener("paused", function(event, packet) {
-        Assert.equal(packet.why.type, "debuggerStatement");
-        // Resume from the debugger statement should immediately re-pause
-        // with a clientEvaluated reason.
-        gThreadClient.resume(function(packet) {
-          Assert.equal(packet.type, "resumed");
-          gThreadClient.addOneTimeListener("paused", function(event, packet) {
-            Assert.equal(packet.why.type, "clientEvaluated");
-            gThreadClient.resume(function() {
-              finishClient(gClient);
-            });
-          });
-        });
-      });
-    });
-  });
-  gDebuggee.eval("(" + function() {
-    function stopMe(arg) {
-      debugger;
-    }
-    stopMe();
-  } + ")()");
-}
--- a/devtools/server/tests/unit/test_new_source-02.js
+++ b/devtools/server/tests/unit/test_new_source-02.js
@@ -4,55 +4,59 @@
 "use strict";
 
 /**
  * Check that sourceURL has the correct effect when using gThreadClient.eval.
  */
 
 var gDebuggee;
 var gClient;
+var gTargetFront;
 var gThreadClient;
 
 function run_test() {
   Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
   registerCleanupFunction(() => {
     Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
   });
   initTestDebuggerServer();
   gDebuggee = addTestGlobal("test-stack");
   gClient = new DebuggerClient(DebuggerServer.connectPipe());
   gClient.connect().then(function() {
     attachTestTabAndResume(gClient, "test-stack",
                            function(response, targetFront, threadClient) {
                              gThreadClient = threadClient;
+                             gTargetFront = targetFront;
                              test_simple_new_source();
                            });
   });
   do_test_pending();
 }
 
 function test_simple_new_source() {
   gThreadClient.addOneTimeListener("paused", function() {
-    gThreadClient.addOneTimeListener("newSource", function(event2, packet2) {
+    gThreadClient.addOneTimeListener("newSource", async function(event2, packet2) {
       // The "stopMe" eval source is emitted first.
       Assert.equal(event2, "newSource");
       Assert.equal(packet2.type, "newSource");
       Assert.ok(!!packet2.source);
       Assert.ok(packet2.source.introductionType, "eval");
 
       gThreadClient.addOneTimeListener("newSource", function(event, packet) {
         Assert.equal(event, "newSource");
         Assert.equal(packet.type, "newSource");
         dump(JSON.stringify(packet, null, 2));
         Assert.ok(!!packet.source);
         Assert.ok(!!packet.source.url.match(/example\.com/));
 
         finishClient(gClient);
       });
-      gThreadClient.eval(null, "function f() { }\n//# sourceURL=http://example.com/code.js");
+
+      const consoleFront = await gTargetFront.getFront("console");
+      consoleFront.evaluateJSAsync("function f() { }\n//# sourceURL=http://example.com/code.js");
     });
   });
 
   /* eslint-disable */
   gDebuggee.eval("(" + function () {
     function stopMe(arg1) { debugger; }
     stopMe({obj: true});
   } + ")()");
--- a/devtools/server/tests/unit/testactors.js
+++ b/devtools/server/tests/unit/testactors.js
@@ -68,16 +68,21 @@ function TestTabList(connection) {
 TestTabList.prototype = {
   constructor: TestTabList,
   getList: function() {
     return Promise.resolve([...this._targetActors]);
   },
 };
 
 exports.createRootActor = function createRootActor(connection) {
+  ActorRegistry.registerModule("devtools/server/actors/webconsole", {
+    prefix: "console",
+    constructor: "WebConsoleActor",
+    type: { target: true },
+  });
   const root = new RootActor(connection, {
     tabList: new TestTabList(connection),
     globalActorFactories: ActorRegistry.globalActorFactories,
   });
 
   root.applicationType = "xpcshell-tests";
   return root;
 };
--- a/devtools/server/tests/unit/xpcshell.ini
+++ b/devtools/server/tests/unit/xpcshell.ini
@@ -74,21 +74,16 @@ support-files =
 [test_pauselifetime-04.js]
 [test_threadlifetime-01.js]
 [test_threadlifetime-02.js]
 [test_threadlifetime-04.js]
 [test_functiongrips-01.js]
 [test_front_destroy.js]
 [test_nativewrappers.js]
 [test_nodelistactor.js]
-[test_eval-01.js]
-[test_eval-02.js]
-[test_eval-03.js]
-[test_eval-04.js]
-[test_eval-05.js]
 [test_format_command.js]
 [test_promises_actor_attach.js]
 [test_promises_actor_list_promises.js]
 skip-if = coverage # bug 1336670
 [test_promises_actor_onnewpromise.js]
 [test_promises_actor_onpromisesettled.js]
 [test_promises_client_getdependentpromises.js]
 [test_promises_object_creationtimestamp.js]
--- a/devtools/shared/client/thread-client.js
+++ b/devtools/shared/client/thread-client.js
@@ -264,49 +264,16 @@ ThreadClient.prototype = {
    */
   pauseOnExceptions: DebuggerClient.requester({
     type: "pauseOnExceptions",
     pauseOnExceptions: arg(0),
     ignoreCaughtExceptions: arg(1),
   }),
 
   /**
-   * Send a clientEvaluate packet to the debuggee. Response
-   * will be a resume packet.
-   *
-   * @param string frame
-   *        The actor ID of the frame where the evaluation should take place.
-   * @param string expression
-   *        The expression that will be evaluated in the scope of the frame
-   *        above.
-   * @param function onResponse
-   *        Called with the response packet.
-   */
-  eval: DebuggerClient.requester({
-    type: "clientEvaluate",
-    frame: arg(0),
-    expression: arg(1),
-  }, {
-    before: function(packet) {
-      this._assertPaused("eval");
-      // Put the client in a tentative "resuming" state so we can prevent
-      // further requests that should only be sent in the paused state.
-      this._state = "resuming";
-      return packet;
-    },
-    after: function(response) {
-      if (response.error) {
-        // There was an error resuming, back to paused state.
-        this._state = "paused";
-      }
-      return response;
-    },
-  }),
-
-  /**
    * Detach from the thread actor.
    *
    * @param function onResponse
    *        Called with the response packet.
    */
   detach: DebuggerClient.requester({
     type: "detach",
   }, {