Backed out changeset a8aa7e2af130 (bug 1436151) for xpcshell failures on /test_setBreakpoint-at-the-beginning-of-a-line.js. a=backout
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Fri, 16 Feb 2018 13:08:04 +0200
changeset 404144 941681a0ddc64f46dda9c2e69ea36a78bc307dee
parent 404143 f01d1def46fb53a6523768c6e9188e66b89e664e
child 404145 8cf35a5cc0773e4c0ff0a67f6685dbbbe6b97105
child 404208 799ef07581c3c78e140e96e1084a76094420c25b
push id99942
push usernbeleuzu@mozilla.com
push dateFri, 16 Feb 2018 11:16:06 +0000
treeherdermozilla-inbound@8cf35a5cc077 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1436151
milestone60.0a1
backs outa8aa7e2af130f28442a965188abdf80c30a737aa
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 a8aa7e2af130 (bug 1436151) for xpcshell failures on /test_setBreakpoint-at-the-beginning-of-a-line.js. a=backout
devtools/server/actors/source.js
devtools/server/tests/unit/test_setBreakpoint-at-the-beginning-of-a-line.js
devtools/server/tests/unit/xpcshell.ini
--- a/devtools/server/actors/source.js
+++ b/devtools/server/actors/source.js
@@ -902,56 +902,33 @@ let SourceActor = ActorClassWithSpec(sou
       // This is a line breakpoint, so we are interested in all offsets
       // that correspond to the given line number.
       for (let script of scripts) {
         let offsets = script.getLineOffsets(generatedLine);
         if (offsets.length > 0) {
           entryPoints.push({ script, offsets });
         }
       }
-
-      if (entryPoints.length > 0) {
-        setBreakpointAtEntryPoints(actor, entryPoints);
-        return true;
-      }
-
-      return false;
-    }
-
-    // This is a column breakpoint, so we are interested in all column
-    // offsets that correspond to the given line *and* column number.
-    for (let script of scripts) {
-      let columnToOffsetMap = script.getAllColumnOffsets()
-                                    .filter(({ lineNumber }) => {
-                                      return lineNumber === generatedLine;
-                                    });
-      for (let { columnNumber: column, offset } of columnToOffsetMap) {
-        if (column >= generatedColumn && column <= generatedLastColumn) {
-          entryPoints.push({ script, offsets: [offset] });
-        }
-      }
-    }
-
-    // If we don't find any matching entrypoints, then
-    // we should check to see if the breakpoint is to the left of the first offset.
-    if (entryPoints.length === 0) {
+    } else {
+      // This is a column breakpoint, so we are interested in all column
+      // offsets that correspond to the given line *and* column number.
       for (let script of scripts) {
-        let columnToOffsetMap = script
-          .getAllColumnOffsets()
-          .filter(({ lineNumber }) => {
-            return lineNumber === generatedLine;
-          });
-
-        if (columnToOffsetMap.length > 0) {
-          let { columnNumber: column, offset } = columnToOffsetMap[0];
-          if (generatedColumn < column) {
+        let columnToOffsetMap = script.getAllColumnOffsets()
+                                      .filter(({ lineNumber }) => {
+                                        return lineNumber === generatedLine;
+                                      });
+        for (let { columnNumber: column, offset } of columnToOffsetMap) {
+          if (column >= generatedColumn && column <= generatedLastColumn) {
             entryPoints.push({ script, offsets: [offset] });
           }
         }
       }
     }
 
+    if (entryPoints.length === 0) {
+      return false;
+    }
     setBreakpointAtEntryPoints(actor, entryPoints);
     return true;
   }
 });
 
 exports.SourceActor = SourceActor;
deleted file mode 100644
--- a/devtools/server/tests/unit/test_setBreakpoint-at-the-beginning-of-a-line.js
+++ /dev/null
@@ -1,64 +0,0 @@
-"use strict";
-
-var SOURCE_URL = getFileUrl("setBreakpoint-on-column.js");
-
-function run_test() {
-  return Task.spawn(function* () {
-    do_test_pending();
-
-    DebuggerServer.registerModule("xpcshell-test/testactors");
-    DebuggerServer.init(() => true);
-
-    let global = createTestGlobal("test");
-    DebuggerServer.addTestGlobal(global);
-
-    let client = new DebuggerClient(DebuggerServer.connectPipe());
-    yield connect(client);
-
-    let { tabs } = yield listTabs(client);
-    let tab = findTab(tabs, "test");
-    let [, tabClient] = yield attachTab(client, tab);
-    let [, threadClient] = yield attachThread(tabClient);
-    yield resume(threadClient);
-
-    let promise = waitForNewSource(threadClient, SOURCE_URL);
-    loadSubScript(SOURCE_URL, global);
-    let { source } = yield promise;
-    let sourceClient = threadClient.source(source);
-
-    let location = { line: 4, column: 2 };
-    let [packet, breakpointClient] = yield setBreakpoint(
-      sourceClient,
-      location
-    );
-
-    Assert.ok(!packet.isPending);
-    Assert.equal(false, "actualLocation" in packet);
-
-    packet = yield executeOnNextTickAndWaitForPause(function () {
-      Cu.evalInSandbox("f()", global);
-    }, client);
-
-    Assert.equal(packet.type, "paused");
-    let why = packet.why;
-    Assert.equal(why.type, "breakpoint");
-    Assert.equal(why.actors.length, 1);
-    Assert.equal(why.actors[0], breakpointClient.actor);
-
-    let frame = packet.frame;
-    let where = frame.where;
-    Assert.equal(where.source.actor, source.actor);
-    Assert.equal(where.line, location.line);
-    Assert.equal(where.column, 6);
-
-    let variables = frame.environment.bindings.variables;
-    Assert.equal(variables.a.value.type, "undefined");
-    Assert.equal(variables.b.value.type, "undefined");
-    Assert.equal(variables.c.value.type, "undefined");
-
-    yield resume(threadClient);
-    yield close(client);
-
-    do_test_finished();
-  });
-}
--- a/devtools/server/tests/unit/xpcshell.ini
+++ b/devtools/server/tests/unit/xpcshell.ini
@@ -217,17 +217,16 @@ reason = bug 937197
 [test_registerClient.js]
 [test_client_request.js]
 [test_symbols-01.js]
 [test_symbols-02.js]
 [test_get-executable-lines.js]
 [test_get-executable-lines-source-map.js]
 [test_xpcshell_debugging.js]
 support-files = xpcshell_debugging_script.js
-[test_setBreakpoint-at-the-beginning-of-a-line.js]
 [test_setBreakpoint-on-column.js]
 [test_setBreakpoint-on-column-in-gcd-script.js]
 [test_setBreakpoint-on-column-with-no-offsets-at-end-of-line.js]
 [test_setBreakpoint-on-line.js]
 [test_setBreakpoint-on-line-in-gcd-script.js]
 [test_setBreakpoint-on-line-with-multiple-offsets.js]
 [test_setBreakpoint-on-line-with-multiple-statements.js]
 [test_setBreakpoint-on-line-with-no-offsets.js]