Backed out changeset c65681e3492c (bug 1625814) for causing debugger failure CLOSED TREE
authorCiure Andrei <aciure@mozilla.com>
Wed, 01 Apr 2020 21:09:19 +0300
changeset 521670 80c61ca1429b683f62a2e9eb7339be14d13519fb
parent 521669 52c711dbc6f86783c4c47622e06a3577bf99e634
child 521671 011ad9ff26088e341b0aebecd4424523b7759e88
push id111772
push useraciure@mozilla.com
push dateWed, 01 Apr 2020 18:12:34 +0000
treeherderautoland@011ad9ff2608 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1625814
milestone76.0a1
backs outc65681e3492c2cd01dcb918658ced807621b07ae
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 c65681e3492c (bug 1625814) for causing debugger failure CLOSED TREE
devtools/client/debugger/src/components/Editor/Breakpoint.js
devtools/client/debugger/src/components/Editor/DebugLine.js
devtools/client/debugger/src/components/Editor/EmptyLines.js
devtools/client/debugger/src/components/Editor/HighlightLine.js
devtools/client/debugger/src/components/Editor/HighlightLines.js
devtools/client/debugger/src/utils/editor/index.js
--- a/devtools/client/debugger/src/components/Editor/Breakpoint.js
+++ b/devtools/client/debugger/src/components/Editor/Breakpoint.js
@@ -129,29 +129,29 @@ class Breakpoint extends PureComponent<P
     }
 
     const sourceId = selectedSource.id;
     const line = toEditorLine(sourceId, selectedLocation.line);
     const doc = getDocument(sourceId);
 
     doc.setGutterMarker(line, "breakpoints", this.makeMarker());
 
-    editor.codeMirror.addLineClass(line, "wrapClass", "new-breakpoint");
-    editor.codeMirror.removeLineClass(line, "wrapClass", "breakpoint-disabled");
-    editor.codeMirror.removeLineClass(line, "wrapClass", "has-condition");
-    editor.codeMirror.removeLineClass(line, "wrapClass", "has-log");
+    editor.codeMirror.addLineClass(line, "line", "new-breakpoint");
+    editor.codeMirror.removeLineClass(line, "line", "breakpoint-disabled");
+    editor.codeMirror.removeLineClass(line, "line", "has-condition");
+    editor.codeMirror.removeLineClass(line, "line", "has-log");
 
     if (breakpoint.disabled) {
-      editor.codeMirror.addLineClass(line, "wrapClass", "breakpoint-disabled");
+      editor.codeMirror.addLineClass(line, "line", "breakpoint-disabled");
     }
 
     if (breakpoint.options.logValue) {
-      editor.codeMirror.addLineClass(line, "wrapClass", "has-log");
+      editor.codeMirror.addLineClass(line, "line", "has-log");
     } else if (breakpoint.options.condition) {
-      editor.codeMirror.addLineClass(line, "wrapClass", "has-condition");
+      editor.codeMirror.addLineClass(line, "line", "has-condition");
     }
   }
 
   removeBreakpoint(props: Props) {
     const { selectedSource, breakpoint } = props;
     if (!selectedSource) {
       return;
     }
@@ -162,20 +162,20 @@ class Breakpoint extends PureComponent<P
     if (!doc) {
       return;
     }
 
     const selectedLocation = getSelectedLocation(breakpoint, selectedSource);
     const line = toEditorLine(sourceId, selectedLocation.line);
 
     doc.setGutterMarker(line, "breakpoints", null);
-    doc.removeLineClass(line, "wrapClass", "new-breakpoint");
-    doc.removeLineClass(line, "wrapClass", "breakpoint-disabled");
-    doc.removeLineClass(line, "wrapClass", "has-condition");
-    doc.removeLineClass(line, "wrapClass", "has-log");
+    doc.removeLineClass(line, "line", "new-breakpoint");
+    doc.removeLineClass(line, "line", "breakpoint-disabled");
+    doc.removeLineClass(line, "line", "has-condition");
+    doc.removeLineClass(line, "line", "has-log");
   }
 
   render() {
     return null;
   }
 }
 
 export default Breakpoint;
--- a/devtools/client/debugger/src/components/Editor/DebugLine.js
+++ b/devtools/client/debugger/src/components/Editor/DebugLine.js
@@ -74,17 +74,17 @@ export class DebugLine extends PureCompo
     if (!location || !isDocumentReady(source, location)) {
       return;
     }
     const { sourceId } = location;
     const doc = getDocument(sourceId);
 
     let { line, column } = toEditorPosition(location);
     let { markTextClass, lineClass } = this.getTextClasses(why);
-    doc.addLineClass(line, "wrapClass", lineClass);
+    doc.addLineClass(line, "line", lineClass);
 
     const lineText = doc.getLine(line);
     column = Math.max(column, getIndentation(lineText));
 
     // If component updates because user clicks on
     // another source tab, codeMirror will be null.
     const columnEnd = doc.cm ? getTokenEnd(doc.cm, line, column) : null;
 
@@ -110,17 +110,17 @@ export class DebugLine extends PureCompo
 
     if (this.debugExpression) {
       this.debugExpression.clear();
     }
 
     const { line } = toEditorPosition(location);
     const doc = getDocument(location.sourceId);
     const { lineClass } = this.getTextClasses(why);
-    doc.removeLineClass(line, "wrapClass", lineClass);
+    doc.removeLineClass(line, "line", lineClass);
   }
 
   getTextClasses(why: ?Why): TextClasses {
     if (why && isException(why)) {
       return {
         markTextClass: "debug-expression-error",
         lineClass: "new-debug-line-error",
       };
--- a/devtools/client/debugger/src/components/Editor/EmptyLines.js
+++ b/devtools/client/debugger/src/components/Editor/EmptyLines.js
@@ -28,43 +28,35 @@ class EmptyLines extends Component<Props
     this.disableEmptyLines();
   }
 
   componentWillUnmount() {
     const { editor } = this.props;
 
     editor.codeMirror.operation(() => {
       editor.codeMirror.eachLine(lineHandle => {
-        editor.codeMirror.removeLineClass(
-          lineHandle,
-          "wrapClass",
-          "empty-line"
-        );
+        editor.codeMirror.removeLineClass(lineHandle, "line", "empty-line");
       });
     });
   }
 
   disableEmptyLines() {
     const { breakableLines, selectedSource, editor } = this.props;
 
     editor.codeMirror.operation(() => {
       editor.codeMirror.eachLine(lineHandle => {
         const line = fromEditorLine(
           selectedSource.id,
           editor.codeMirror.getLineNumber(lineHandle)
         );
 
         if (breakableLines.has(line)) {
-          editor.codeMirror.removeLineClass(
-            lineHandle,
-            "wrapClass",
-            "empty-line"
-          );
+          editor.codeMirror.removeLineClass(lineHandle, "line", "empty-line");
         } else {
-          editor.codeMirror.addLineClass(lineHandle, "wrapClass", "empty-line");
+          editor.codeMirror.addLineClass(lineHandle, "line", "empty-line");
         }
       });
     });
   }
 
   render() {
     return null;
   }
--- a/devtools/client/debugger/src/components/Editor/HighlightLine.js
+++ b/devtools/client/debugger/src/components/Editor/HighlightLine.js
@@ -129,17 +129,17 @@ export class HighlightLine extends Compo
     const editorLine = toEditorLine(sourceId, line);
     this.previousEditorLine = editorLine;
 
     if (!line || isDebugLine(selectedFrame, selectedLocation)) {
       return;
     }
 
     const doc = getDocument(sourceId);
-    doc.addLineClass(editorLine, "wrapClass", "highlight-line");
+    doc.addLineClass(editorLine, "line", "highlight-line");
     this.resetHighlightLine(doc, editorLine);
   }
 
   resetHighlightLine(doc: SourceDocuments, editorLine: number) {
     const editorWrapper: HTMLElement | null = document.querySelector(
       ".editor-wrapper"
     );
 
@@ -150,34 +150,33 @@ export class HighlightLine extends Compo
     const duration = parseInt(
       getComputedStyle(editorWrapper).getPropertyValue(
         "--highlight-line-duration"
       ),
       10
     );
 
     setTimeout(
-      () =>
-        doc && doc.removeLineClass(editorLine, "wrapClass", "highlight-line"),
+      () => doc && doc.removeLineClass(editorLine, "line", "highlight-line"),
       duration
     );
   }
 
   clearHighlightLine(
     selectedLocation: SourceLocation,
     selectedSource: ?SourceWithContent
   ) {
     if (!isDocumentReady(selectedSource, selectedLocation)) {
       return;
     }
 
     const { line, sourceId } = selectedLocation;
     const editorLine = toEditorLine(sourceId, line);
     const doc = getDocument(sourceId);
-    doc.removeLineClass(editorLine, "wrapClass", "highlight-line");
+    doc.removeLineClass(editorLine, "line", "highlight-line");
   }
 
   render() {
     return null;
   }
 }
 
 export default connect<Props, OwnProps, _, _, _, _>(state => {
--- a/devtools/client/debugger/src/components/Editor/HighlightLines.js
+++ b/devtools/client/debugger/src/components/Editor/HighlightLines.js
@@ -42,17 +42,17 @@ class HighlightLines extends Component<P
 
     if (isEmpty(highlightedLineRange) || !codeMirror) {
       return;
     }
 
     const { start, end } = highlightedLineRange;
     codeMirror.operation(() => {
       range(start - 1, end).forEach(line => {
-        codeMirror.removeLineClass(line, "wrapClass", "highlight-lines");
+        codeMirror.removeLineClass(line, "line", "highlight-lines");
       });
     });
   }
 
   highlightLineRange = () => {
     const { highlightedLineRange, editor } = this.props;
 
     const { codeMirror } = editor;
@@ -62,17 +62,17 @@ class HighlightLines extends Component<P
     }
 
     const { start, end } = highlightedLineRange;
 
     codeMirror.operation(() => {
       editor.alignLine(start);
 
       range(start - 1, end).forEach(line => {
-        codeMirror.addLineClass(line, "wrapClass", "highlight-lines");
+        codeMirror.addLineClass(line, "line", "highlight-lines");
       });
     });
   };
 
   render() {
     return null;
   }
 }
--- a/devtools/client/debugger/src/utils/editor/index.js
+++ b/devtools/client/debugger/src/utils/editor/index.js
@@ -242,17 +242,17 @@ export function forEachLine(codeMirror: 
   });
 }
 
 export function removeLineClass(
   codeMirror: Object,
   line: number,
   className: string
 ) {
-  codeMirror.removeLineClass(line, "wrapClass", className);
+  codeMirror.removeLineClass(line, "line", className);
 }
 
 export function clearLineClass(codeMirror: Object, className: string) {
   forEachLine(codeMirror, line => {
     removeLineClass(codeMirror, line, className);
   });
 }