Backed out changeset 36ada63cb9fb (bug 1541355) for failing browser_webconsole_network_messages_stacktrace_console_initiated_request.js CLOSED TREE
authorMihai Alexandru Michis <malexandru@mozilla.com>
Mon, 20 May 2019 18:33:53 +0300
changeset 474543 ef49ccf4f815928da7a64f045188a1696a26804d
parent 474542 c4437f124150333c460bd9c261f84dfcf7de6e87
child 474544 307d9921bdf21a8943f26ebba9a3b0c08ebc3cf9
push id36042
push userdvarga@mozilla.com
push dateTue, 21 May 2019 04:19:40 +0000
treeherdermozilla-central@ca560ff55451 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1541355
milestone69.0a1
backs out36ada63cb9fb9ff56e7556cfc1db8cfad2c46a2d
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
Backed out changeset 36ada63cb9fb (bug 1541355) for failing browser_webconsole_network_messages_stacktrace_console_initiated_request.js CLOSED TREE
devtools/client/shared/components/StackTrace.js
devtools/client/webconsole/test/mochitest/browser.ini
devtools/client/webconsole/test/mochitest/browser_webconsole_network_messages_stacktrace_console_initiated_request.js
devtools/client/webconsole/webconsole-connection-proxy.js
devtools/server/actors/network-monitor/stack-trace-collector.js
--- a/devtools/client/shared/components/StackTrace.js
+++ b/devtools/client/shared/components/StackTrace.js
@@ -43,20 +43,16 @@ class StackTrace extends Component {
   render() {
     const {
       stacktrace,
       onViewSourceInDebugger,
       onViewSourceInScratchpad,
       sourceMapService,
     } = this.props;
 
-    if (!stacktrace) {
-      return null;
-    }
-
     const frames = [];
     stacktrace.forEach((s, i) => {
       if (s.asyncCause) {
         frames.push("\t", AsyncFrame({
           key: `${i}-asyncframe`,
           asyncCause: s.asyncCause,
         }), "\n");
       }
--- a/devtools/client/webconsole/test/mochitest/browser.ini
+++ b/devtools/client/webconsole/test/mochitest/browser.ini
@@ -336,17 +336,16 @@ skip-if = true #	Bug 1404382
 [browser_webconsole_multiple_windows_and_tabs.js]
 [browser_webconsole_network_attach.js]
 [browser_webconsole_network_exceptions.js]
 [browser_webconsole_network_messages_expand.js]
 skip-if = true  # Bug 1438979
 [browser_webconsole_network_message_ctrl_click.js]
 [browser_webconsole_network_messages_openinnet.js]
 [browser_webconsole_network_messages_resend_request.js]
-[browser_webconsole_network_messages_stacktrace_console_initiated_request.js]
 [browser_webconsole_network_messages_status_code.js]
 [browser_webconsole_network_requests_from_chrome.js]
 [browser_webconsole_network_reset_filter.js]
 [browser_webconsole_nodes_highlight.js]
 [browser_webconsole_nodes_select.js]
 [browser_webconsole_non_javascript_mime_warning.js]
 [browser_webconsole_non_javascript_mime_worker_error.js]
 [browser_webconsole_object_ctrl_click.js]
deleted file mode 100644
--- a/devtools/client/webconsole/test/mochitest/browser_webconsole_network_messages_stacktrace_console_initiated_request.js
+++ /dev/null
@@ -1,63 +0,0 @@
-
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-const TEST_FILE = "test-network-request.html";
-const TEST_PATH = "https://example.com/browser/devtools/client/webconsole/" +
-                  "test/mochitest/";
-const TEST_URI = TEST_PATH + TEST_FILE;
-
-pushPref("devtools.webconsole.filter.netxhr", true);
-
-add_task(async function task() {
-  const hud = await openNewTabAndConsole(TEST_URI);
-
-  const xhrUrl = TEST_PATH + "sjs_slow-response-test-server.sjs";
-  const onRequestUpdates = waitForRequestUpdates(hud);
-  const onPayloadReady = waitForPayloadReady(hud);
-
-  info("Fire an XHR POST request from the console.");
-  const { node: messageNode } = await executeAndWaitForMessage(hud, `
-    xhrConsole = () => testXhrPostSlowResponse();
-    xhrConsole();
-  `, xhrUrl);
-
-  ok(messageNode, "Network message found.");
-
-  await onRequestUpdates;
-
-  info("Expand the network message");
-  await expandXhrMessage(messageNode);
-
-  await onPayloadReady;
-
-  const stackTraceTab = messageNode.querySelector("#stack-trace-tab");
-  ok(stackTraceTab, "StackTrace tab is available");
-
-  stackTraceTab.click();
-  const selector = "#stack-trace-panel .frame-link";
-  await waitFor(() => messageNode.querySelector(selector));
-  const frames = [...messageNode.querySelectorAll(selector)];
-
-  is(frames.length, 4, "There's the expected frames");
-  const functionNames = frames.map(f =>
-    f.querySelector(".frame-link-function-display-name").textContent);
-  is(functionNames.join("|"), "makeXhr|testXhrPostSlowResponse|xhrConsole|<anonymous>",
-    "The stacktrace does not have devtools' internal frames");
-});
-
-async function waitForPayloadReady(hud) {
-  return hud.ui.once("network-request-payload-ready");
-}
-
-async function waitForRequestUpdates(hud) {
-  return hud.ui.once("network-message-updated");
-}
-
-function expandXhrMessage(node) {
-  info("Click on XHR message and wait for the network detail panel to be displayed");
-  node.querySelector(".url").click();
-  return waitFor(() => node.querySelector(".network-info"));
-}
--- a/devtools/client/webconsole/webconsole-connection-proxy.js
+++ b/devtools/client/webconsole/webconsole-connection-proxy.js
@@ -214,29 +214,20 @@ WebConsoleConnectionProxy.prototype = {
   dispatchMessagesAdd: function(packets) {
     this.webConsoleUI.wrapper.dispatchMessagesAdd(packets);
   },
 
   /**
    * Dispatch a message event on the new frontend and emit an event for tests.
    */
   dispatchMessageUpdate: function(networkInfo, response) {
-    // Some message might try to update while we are closing the toolbox.
-    if (!this.webConsoleUI) {
-      return;
-    }
     this.webConsoleUI.wrapper.dispatchMessageUpdate(networkInfo, response);
   },
 
   dispatchRequestUpdate: function(id, data) {
-    // Some request might try to update while we are closing the toolbox.
-    if (!this.webConsoleUI) {
-      return;
-    }
-
     this.webConsoleUI.wrapper.dispatchRequestUpdate(id, data);
   },
 
   /**
    * The "cachedMessages" response handler.
    *
    * @private
    * @param object response
--- a/devtools/server/actors/network-monitor/stack-trace-collector.js
+++ b/devtools/server/actors/network-monitor/stack-trace-collector.js
@@ -10,18 +10,16 @@ const {Ci, components} = require("chrome
 const Services = require("Services");
 
 loader.lazyRequireGetter(this, "ChannelEventSinkFactory",
                          "devtools/server/actors/network-monitor/channel-event-sink",
                          true);
 loader.lazyRequireGetter(this, "matchRequest",
                          "devtools/server/actors/network-monitor/network-observer",
                          true);
-loader.lazyRequireGetter(this, "WebConsoleUtils",
-                         "devtools/server/actors/webconsole/utils", true);
 
 function StackTraceCollector(filters, netmonitors) {
   this.filters = filters;
   this.stacktracesById = new Map();
   this.netmonitors = netmonitors;
 }
 
 StackTraceCollector.prototype = {
@@ -153,17 +151,17 @@ StackTraceCollector.prototype = {
     if (stacktrace) {
       this._saveStackTrace(newChannel.channelId, stacktrace);
     }
   },
 
   getStackTrace(channelId) {
     const trace = this.stacktracesById.get(channelId);
     this.stacktracesById.delete(channelId);
-    return WebConsoleUtils.removeFramesAboveDebuggerEval(trace);
+    return trace;
   },
 
   onGetStack(msg) {
     const messageManager = msg.target;
     const channelId = msg.data;
     const stack = this.getStackTrace(channelId);
     messageManager.sendAsyncMessage("debug:request-stack:response", {
       channelId,