diff --git a/devtools/client/debugger/src/client/firefox/types.js b/devtools/client/debugger/src/client/firefox/types.js index 4a803c79d868..65b088957174 100644 --- a/devtools/client/debugger/src/client/firefox/types.js +++ b/devtools/client/debugger/src/client/firefox/types.js @@ -231,9 +231,9 @@ export type Target = { isContentProcess: boolean, isWorkerTarget: boolean, traits: Object, - chrome: boolean, + chrome: Boolean, url: string, - isAddon: boolean, + isAddon: Boolean, }; /** diff --git a/devtools/client/debugger/src/components/Editor/Breakpoint.js b/devtools/client/debugger/src/components/Editor/Breakpoint.js index 70e6549e987c..8336957a0752 100644 --- a/devtools/client/debugger/src/components/Editor/Breakpoint.js +++ b/devtools/client/debugger/src/components/Editor/Breakpoint.js @@ -32,7 +32,6 @@ type Props = { editor: Object, breakpointActions: BreakpointItemActions, editorActions: EditorItemActions, - canRewind: boolean, }; class Breakpoint extends PureComponent { @@ -119,7 +118,7 @@ class Breakpoint extends PureComponent { }; addBreakpoint(props: Props) { - const { breakpoint, editor, selectedSource, canRewind } = props; + const { breakpoint, editor, selectedSource } = props; const selectedLocation = getSelectedLocation(breakpoint, selectedSource); // Hidden Breakpoints are never rendered on the client @@ -146,11 +145,7 @@ class Breakpoint extends PureComponent { editor.codeMirror.addLineClass(line, "line", "breakpoint-disabled"); } - const isLogPoint = canRewind - ? breakpoint.options.logValue != "displayName" - : breakpoint.options.logValue; - - if (isLogPoint) { + if (breakpoint.options.logValue) { editor.codeMirror.addLineClass(line, "line", "has-log"); } else if (breakpoint.options.condition) { editor.codeMirror.addLineClass(line, "line", "has-condition"); diff --git a/devtools/client/debugger/src/components/Editor/Breakpoints.js b/devtools/client/debugger/src/components/Editor/Breakpoints.js index be9b552078c8..94335d659915 100644 --- a/devtools/client/debugger/src/components/Editor/Breakpoints.js +++ b/devtools/client/debugger/src/components/Editor/Breakpoints.js @@ -6,11 +6,7 @@ import React, { Component } from "react"; import Breakpoint from "./Breakpoint"; -import { - getSelectedSource, - getFirstVisibleBreakpoints, - getCanRewind, -} from "../../selectors"; +import { getSelectedSource, getFirstVisibleBreakpoints } from "../../selectors"; import { makeBreakpointId } from "../../utils/breakpoint"; import { connect } from "../../utils/connect"; import { breakpointItemActions } from "./menus/breakpoints"; @@ -35,7 +31,6 @@ type Props = { editor: Object, breakpointActions: BreakpointItemActions, editorActions: EditorItemActions, - canRewind: boolean, }; class Breakpoints extends Component { @@ -47,7 +42,6 @@ class Breakpoints extends Component { editor, breakpointActions, editorActions, - canRewind, } = this.props; if (!selectedSource || !breakpoints || selectedSource.isBlackBoxed) { @@ -66,7 +60,6 @@ class Breakpoints extends Component { editor={editor} breakpointActions={breakpointActions} editorActions={editorActions} - canRewind={canRewind} /> ); })} @@ -81,7 +74,6 @@ export default connect( // breakpoint marker represents only the first breakpoint breakpoints: getFirstVisibleBreakpoints(state), selectedSource: getSelectedSource(state), - canRewind: getCanRewind(state), }), dispatch => ({ breakpointActions: breakpointItemActions(dispatch), diff --git a/devtools/client/debugger/src/components/Editor/ColumnBreakpoint.js b/devtools/client/debugger/src/components/Editor/ColumnBreakpoint.js index 931798e22d13..f39c391f7d20 100644 --- a/devtools/client/debugger/src/components/Editor/ColumnBreakpoint.js +++ b/devtools/client/debugger/src/components/Editor/ColumnBreakpoint.js @@ -26,14 +26,13 @@ type Props = { source: Source, columnBreakpoint: ColumnBreakpointType, breakpointActions: BreakpointItemActions, - canRewind: boolean, }; const breakpointButton = document.createElement("button"); breakpointButton.innerHTML = ''; -function makeBookmark({ breakpoint }, { onClick, onContextMenu, canRewind }) { +function makeBookmark({ breakpoint }, { onClick, onContextMenu }) { const bp = breakpointButton.cloneNode(true); const isActive = breakpoint && !breakpoint.disabled; @@ -41,11 +40,9 @@ function makeBookmark({ breakpoint }, { onClick, onContextMenu, canRewind }) { const condition = breakpoint && breakpoint.options.condition; const logValue = breakpoint && breakpoint.options.logValue; - const isLogPoint = canRewind ? logValue != "displayName" : logValue; - bp.className = classnames("column-breakpoint", { "has-condition": condition, - "has-log": isLogPoint, + "has-log": logValue, active: isActive, disabled: isDisabled, }); @@ -64,7 +61,7 @@ export default class ColumnBreakpoint extends PureComponent { bookmark: ?Bookmark; addColumnBreakpoint = (nextProps: ?Props) => { - const { columnBreakpoint, source, canRewind } = nextProps || this.props; + const { columnBreakpoint, source } = nextProps || this.props; const sourceId = source.id; const doc = getDocument(sourceId); @@ -76,7 +73,6 @@ export default class ColumnBreakpoint extends PureComponent { const widget = makeBookmark(columnBreakpoint, { onClick: this.onClick, onContextMenu: this.onContextMenu, - canRewind, }); this.bookmark = doc.setBookmark({ line: line - 1, ch: column }, { widget }); diff --git a/devtools/client/debugger/src/components/Editor/ColumnBreakpoints.js b/devtools/client/debugger/src/components/Editor/ColumnBreakpoints.js index a3003e45f114..7a34037ce223 100644 --- a/devtools/client/debugger/src/components/Editor/ColumnBreakpoints.js +++ b/devtools/client/debugger/src/components/Editor/ColumnBreakpoints.js @@ -12,7 +12,6 @@ import { getSelectedSource, visibleColumnBreakpoints, getContext, - getCanRewind, } from "../../selectors"; import { connect } from "../../utils/connect"; import { makeBreakpointId } from "../../utils/breakpoint"; @@ -32,7 +31,6 @@ type Props = { selectedSource: ?Source, columnBreakpoints: ColumnBreakpointType[], breakpointActions: BreakpointItemActions, - canRewind: boolean, }; class ColumnBreakpoints extends Component { @@ -45,7 +43,6 @@ class ColumnBreakpoints extends Component { columnBreakpoints, selectedSource, breakpointActions, - canRewind, } = this.props; if ( @@ -66,7 +63,6 @@ class ColumnBreakpoints extends Component { editor={editor} source={selectedSource} breakpointActions={breakpointActions} - canRewind={canRewind} /> )); }); @@ -78,7 +74,6 @@ const mapStateToProps = state => ({ cx: getContext(state), selectedSource: getSelectedSource(state), columnBreakpoints: visibleColumnBreakpoints(state), - canRewind: getCanRewind(state), }); export default connect( diff --git a/devtools/client/debugger/src/components/Editor/index.js b/devtools/client/debugger/src/components/Editor/index.js index 6ef43d3bc5da..00a1bf7bc98e 100644 --- a/devtools/client/debugger/src/components/Editor/index.js +++ b/devtools/client/debugger/src/components/Editor/index.js @@ -32,7 +32,6 @@ import { getActiveSearch, getSelectedLocation, getSelectedSourceWithContent, - getCanRewind, getConditionalPanelLocation, getSymbols, getIsPaused, @@ -111,7 +110,6 @@ export type Props = { isPaused: boolean, skipPausing: boolean, inlinePreviewEnabled: boolean, - canRewind: boolean, // Actions openConditionalPanel: typeof actions.openConditionalPanel, @@ -425,7 +423,6 @@ class Editor extends PureComponent { const { cx, selectedSource, - canRewind, conditionalPanelLocation, closeConditionalPanel, addBreakpointAtLine, @@ -460,9 +457,7 @@ class Editor extends PureComponent { return continueToHere(cx, sourceLine); } - const shouldLog = ev.altKey || canRewind; - - return addBreakpointAtLine(cx, sourceLine, shouldLog, ev.shiftKey); + return addBreakpointAtLine(cx, sourceLine, ev.altKey, ev.shiftKey); }; onGutterContextMenu = (event: MouseEvent) => { @@ -696,7 +691,6 @@ const mapStateToProps = state => { isPaused: getIsPaused(state, getCurrentThread(state)), skipPausing: getSkipPausing(state), inlinePreviewEnabled: getInlinePreview(state), - canRewind: getCanRewind(state), }; }; diff --git a/devtools/client/debugger/src/workers/parser/getSymbols.js b/devtools/client/debugger/src/workers/parser/getSymbols.js index dbdd4fcb814b..28164b7c76b6 100644 --- a/devtools/client/debugger/src/workers/parser/getSymbols.js +++ b/devtools/client/debugger/src/workers/parser/getSymbols.js @@ -54,7 +54,7 @@ export type CallDeclaration = SymbolDeclaration & { }; export type MemberDeclaration = SymbolDeclaration & { - computed: boolean, + computed: Boolean, expression: string, }; diff --git a/devtools/server/actors/breakpoint.js b/devtools/server/actors/breakpoint.js index 63b872aea291..bd081fc29d87 100644 --- a/devtools/server/actors/breakpoint.js +++ b/devtools/server/actors/breakpoint.js @@ -118,11 +118,7 @@ BreakpointActor.prototype = { } ); } - - // Treat `displayName` breakpoints as standard breakpoints - if (options.logValue != "displayName") { - return; - } + return; } // In all other cases, this is used as a script breakpoint handler. @@ -224,8 +220,7 @@ BreakpointActor.prototype = { } } - // Replay logpoints are handled in _newOffsetsOrOptions - if (logValue && !this.threadActor.dbg.replaying) { + if (logValue) { return logEvent({ threadActor: this.threadActor, frame,