mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
Bug 1581249 - Revert - The timeline should show breakpoint hits. r=bhackett
This reverts commit 34ddff68bdfc54cc61252cd76e708697d1629e86. Differential Revision: https://phabricator.services.mozilla.com/D51331 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
9e558efb0a
commit
cd8222f74c
@ -231,9 +231,9 @@ export type Target = {
|
|||||||
isContentProcess: boolean,
|
isContentProcess: boolean,
|
||||||
isWorkerTarget: boolean,
|
isWorkerTarget: boolean,
|
||||||
traits: Object,
|
traits: Object,
|
||||||
chrome: boolean,
|
chrome: Boolean,
|
||||||
url: string,
|
url: string,
|
||||||
isAddon: boolean,
|
isAddon: Boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,7 +32,6 @@ type Props = {
|
|||||||
editor: Object,
|
editor: Object,
|
||||||
breakpointActions: BreakpointItemActions,
|
breakpointActions: BreakpointItemActions,
|
||||||
editorActions: EditorItemActions,
|
editorActions: EditorItemActions,
|
||||||
canRewind: boolean,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Breakpoint extends PureComponent<Props> {
|
class Breakpoint extends PureComponent<Props> {
|
||||||
@ -119,7 +118,7 @@ class Breakpoint extends PureComponent<Props> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
addBreakpoint(props: Props) {
|
addBreakpoint(props: Props) {
|
||||||
const { breakpoint, editor, selectedSource, canRewind } = props;
|
const { breakpoint, editor, selectedSource } = props;
|
||||||
const selectedLocation = getSelectedLocation(breakpoint, selectedSource);
|
const selectedLocation = getSelectedLocation(breakpoint, selectedSource);
|
||||||
|
|
||||||
// Hidden Breakpoints are never rendered on the client
|
// Hidden Breakpoints are never rendered on the client
|
||||||
@ -146,11 +145,7 @@ class Breakpoint extends PureComponent<Props> {
|
|||||||
editor.codeMirror.addLineClass(line, "line", "breakpoint-disabled");
|
editor.codeMirror.addLineClass(line, "line", "breakpoint-disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
const isLogPoint = canRewind
|
if (breakpoint.options.logValue) {
|
||||||
? breakpoint.options.logValue != "displayName"
|
|
||||||
: breakpoint.options.logValue;
|
|
||||||
|
|
||||||
if (isLogPoint) {
|
|
||||||
editor.codeMirror.addLineClass(line, "line", "has-log");
|
editor.codeMirror.addLineClass(line, "line", "has-log");
|
||||||
} else if (breakpoint.options.condition) {
|
} else if (breakpoint.options.condition) {
|
||||||
editor.codeMirror.addLineClass(line, "line", "has-condition");
|
editor.codeMirror.addLineClass(line, "line", "has-condition");
|
||||||
|
@ -6,11 +6,7 @@
|
|||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import Breakpoint from "./Breakpoint";
|
import Breakpoint from "./Breakpoint";
|
||||||
|
|
||||||
import {
|
import { getSelectedSource, getFirstVisibleBreakpoints } from "../../selectors";
|
||||||
getSelectedSource,
|
|
||||||
getFirstVisibleBreakpoints,
|
|
||||||
getCanRewind,
|
|
||||||
} from "../../selectors";
|
|
||||||
import { makeBreakpointId } from "../../utils/breakpoint";
|
import { makeBreakpointId } from "../../utils/breakpoint";
|
||||||
import { connect } from "../../utils/connect";
|
import { connect } from "../../utils/connect";
|
||||||
import { breakpointItemActions } from "./menus/breakpoints";
|
import { breakpointItemActions } from "./menus/breakpoints";
|
||||||
@ -35,7 +31,6 @@ type Props = {
|
|||||||
editor: Object,
|
editor: Object,
|
||||||
breakpointActions: BreakpointItemActions,
|
breakpointActions: BreakpointItemActions,
|
||||||
editorActions: EditorItemActions,
|
editorActions: EditorItemActions,
|
||||||
canRewind: boolean,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Breakpoints extends Component<Props> {
|
class Breakpoints extends Component<Props> {
|
||||||
@ -47,7 +42,6 @@ class Breakpoints extends Component<Props> {
|
|||||||
editor,
|
editor,
|
||||||
breakpointActions,
|
breakpointActions,
|
||||||
editorActions,
|
editorActions,
|
||||||
canRewind,
|
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
if (!selectedSource || !breakpoints || selectedSource.isBlackBoxed) {
|
if (!selectedSource || !breakpoints || selectedSource.isBlackBoxed) {
|
||||||
@ -66,7 +60,6 @@ class Breakpoints extends Component<Props> {
|
|||||||
editor={editor}
|
editor={editor}
|
||||||
breakpointActions={breakpointActions}
|
breakpointActions={breakpointActions}
|
||||||
editorActions={editorActions}
|
editorActions={editorActions}
|
||||||
canRewind={canRewind}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
@ -81,7 +74,6 @@ export default connect<Props, OwnProps, _, _, _, _>(
|
|||||||
// breakpoint marker represents only the first breakpoint
|
// breakpoint marker represents only the first breakpoint
|
||||||
breakpoints: getFirstVisibleBreakpoints(state),
|
breakpoints: getFirstVisibleBreakpoints(state),
|
||||||
selectedSource: getSelectedSource(state),
|
selectedSource: getSelectedSource(state),
|
||||||
canRewind: getCanRewind(state),
|
|
||||||
}),
|
}),
|
||||||
dispatch => ({
|
dispatch => ({
|
||||||
breakpointActions: breakpointItemActions(dispatch),
|
breakpointActions: breakpointItemActions(dispatch),
|
||||||
|
@ -26,14 +26,13 @@ type Props = {
|
|||||||
source: Source,
|
source: Source,
|
||||||
columnBreakpoint: ColumnBreakpointType,
|
columnBreakpoint: ColumnBreakpointType,
|
||||||
breakpointActions: BreakpointItemActions,
|
breakpointActions: BreakpointItemActions,
|
||||||
canRewind: boolean,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const breakpointButton = document.createElement("button");
|
const breakpointButton = document.createElement("button");
|
||||||
breakpointButton.innerHTML =
|
breakpointButton.innerHTML =
|
||||||
'<svg viewBox="0 0 11 13" width="11" height="13"><path d="M5.07.5H1.5c-.54 0-1 .46-1 1v10c0 .54.46 1 1 1h3.57c.58 0 1.15-.26 1.53-.7l3.7-5.3-3.7-5.3C6.22.76 5.65.5 5.07.5z"/></svg>';
|
'<svg viewBox="0 0 11 13" width="11" height="13"><path d="M5.07.5H1.5c-.54 0-1 .46-1 1v10c0 .54.46 1 1 1h3.57c.58 0 1.15-.26 1.53-.7l3.7-5.3-3.7-5.3C6.22.76 5.65.5 5.07.5z"/></svg>';
|
||||||
|
|
||||||
function makeBookmark({ breakpoint }, { onClick, onContextMenu, canRewind }) {
|
function makeBookmark({ breakpoint }, { onClick, onContextMenu }) {
|
||||||
const bp = breakpointButton.cloneNode(true);
|
const bp = breakpointButton.cloneNode(true);
|
||||||
|
|
||||||
const isActive = breakpoint && !breakpoint.disabled;
|
const isActive = breakpoint && !breakpoint.disabled;
|
||||||
@ -41,11 +40,9 @@ function makeBookmark({ breakpoint }, { onClick, onContextMenu, canRewind }) {
|
|||||||
const condition = breakpoint && breakpoint.options.condition;
|
const condition = breakpoint && breakpoint.options.condition;
|
||||||
const logValue = breakpoint && breakpoint.options.logValue;
|
const logValue = breakpoint && breakpoint.options.logValue;
|
||||||
|
|
||||||
const isLogPoint = canRewind ? logValue != "displayName" : logValue;
|
|
||||||
|
|
||||||
bp.className = classnames("column-breakpoint", {
|
bp.className = classnames("column-breakpoint", {
|
||||||
"has-condition": condition,
|
"has-condition": condition,
|
||||||
"has-log": isLogPoint,
|
"has-log": logValue,
|
||||||
active: isActive,
|
active: isActive,
|
||||||
disabled: isDisabled,
|
disabled: isDisabled,
|
||||||
});
|
});
|
||||||
@ -64,7 +61,7 @@ export default class ColumnBreakpoint extends PureComponent<Props> {
|
|||||||
bookmark: ?Bookmark;
|
bookmark: ?Bookmark;
|
||||||
|
|
||||||
addColumnBreakpoint = (nextProps: ?Props) => {
|
addColumnBreakpoint = (nextProps: ?Props) => {
|
||||||
const { columnBreakpoint, source, canRewind } = nextProps || this.props;
|
const { columnBreakpoint, source } = nextProps || this.props;
|
||||||
|
|
||||||
const sourceId = source.id;
|
const sourceId = source.id;
|
||||||
const doc = getDocument(sourceId);
|
const doc = getDocument(sourceId);
|
||||||
@ -76,7 +73,6 @@ export default class ColumnBreakpoint extends PureComponent<Props> {
|
|||||||
const widget = makeBookmark(columnBreakpoint, {
|
const widget = makeBookmark(columnBreakpoint, {
|
||||||
onClick: this.onClick,
|
onClick: this.onClick,
|
||||||
onContextMenu: this.onContextMenu,
|
onContextMenu: this.onContextMenu,
|
||||||
canRewind,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.bookmark = doc.setBookmark({ line: line - 1, ch: column }, { widget });
|
this.bookmark = doc.setBookmark({ line: line - 1, ch: column }, { widget });
|
||||||
|
@ -12,7 +12,6 @@ import {
|
|||||||
getSelectedSource,
|
getSelectedSource,
|
||||||
visibleColumnBreakpoints,
|
visibleColumnBreakpoints,
|
||||||
getContext,
|
getContext,
|
||||||
getCanRewind,
|
|
||||||
} from "../../selectors";
|
} from "../../selectors";
|
||||||
import { connect } from "../../utils/connect";
|
import { connect } from "../../utils/connect";
|
||||||
import { makeBreakpointId } from "../../utils/breakpoint";
|
import { makeBreakpointId } from "../../utils/breakpoint";
|
||||||
@ -32,7 +31,6 @@ type Props = {
|
|||||||
selectedSource: ?Source,
|
selectedSource: ?Source,
|
||||||
columnBreakpoints: ColumnBreakpointType[],
|
columnBreakpoints: ColumnBreakpointType[],
|
||||||
breakpointActions: BreakpointItemActions,
|
breakpointActions: BreakpointItemActions,
|
||||||
canRewind: boolean,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ColumnBreakpoints extends Component<Props> {
|
class ColumnBreakpoints extends Component<Props> {
|
||||||
@ -45,7 +43,6 @@ class ColumnBreakpoints extends Component<Props> {
|
|||||||
columnBreakpoints,
|
columnBreakpoints,
|
||||||
selectedSource,
|
selectedSource,
|
||||||
breakpointActions,
|
breakpointActions,
|
||||||
canRewind,
|
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@ -66,7 +63,6 @@ class ColumnBreakpoints extends Component<Props> {
|
|||||||
editor={editor}
|
editor={editor}
|
||||||
source={selectedSource}
|
source={selectedSource}
|
||||||
breakpointActions={breakpointActions}
|
breakpointActions={breakpointActions}
|
||||||
canRewind={canRewind}
|
|
||||||
/>
|
/>
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
@ -78,7 +74,6 @@ const mapStateToProps = state => ({
|
|||||||
cx: getContext(state),
|
cx: getContext(state),
|
||||||
selectedSource: getSelectedSource(state),
|
selectedSource: getSelectedSource(state),
|
||||||
columnBreakpoints: visibleColumnBreakpoints(state),
|
columnBreakpoints: visibleColumnBreakpoints(state),
|
||||||
canRewind: getCanRewind(state),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect<Props, OwnProps, _, _, _, _>(
|
export default connect<Props, OwnProps, _, _, _, _>(
|
||||||
|
@ -32,7 +32,6 @@ import {
|
|||||||
getActiveSearch,
|
getActiveSearch,
|
||||||
getSelectedLocation,
|
getSelectedLocation,
|
||||||
getSelectedSourceWithContent,
|
getSelectedSourceWithContent,
|
||||||
getCanRewind,
|
|
||||||
getConditionalPanelLocation,
|
getConditionalPanelLocation,
|
||||||
getSymbols,
|
getSymbols,
|
||||||
getIsPaused,
|
getIsPaused,
|
||||||
@ -111,7 +110,6 @@ export type Props = {
|
|||||||
isPaused: boolean,
|
isPaused: boolean,
|
||||||
skipPausing: boolean,
|
skipPausing: boolean,
|
||||||
inlinePreviewEnabled: boolean,
|
inlinePreviewEnabled: boolean,
|
||||||
canRewind: boolean,
|
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
openConditionalPanel: typeof actions.openConditionalPanel,
|
openConditionalPanel: typeof actions.openConditionalPanel,
|
||||||
@ -425,7 +423,6 @@ class Editor extends PureComponent<Props, State> {
|
|||||||
const {
|
const {
|
||||||
cx,
|
cx,
|
||||||
selectedSource,
|
selectedSource,
|
||||||
canRewind,
|
|
||||||
conditionalPanelLocation,
|
conditionalPanelLocation,
|
||||||
closeConditionalPanel,
|
closeConditionalPanel,
|
||||||
addBreakpointAtLine,
|
addBreakpointAtLine,
|
||||||
@ -460,9 +457,7 @@ class Editor extends PureComponent<Props, State> {
|
|||||||
return continueToHere(cx, sourceLine);
|
return continueToHere(cx, sourceLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
const shouldLog = ev.altKey || canRewind;
|
return addBreakpointAtLine(cx, sourceLine, ev.altKey, ev.shiftKey);
|
||||||
|
|
||||||
return addBreakpointAtLine(cx, sourceLine, shouldLog, ev.shiftKey);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
onGutterContextMenu = (event: MouseEvent) => {
|
onGutterContextMenu = (event: MouseEvent) => {
|
||||||
@ -696,7 +691,6 @@ const mapStateToProps = state => {
|
|||||||
isPaused: getIsPaused(state, getCurrentThread(state)),
|
isPaused: getIsPaused(state, getCurrentThread(state)),
|
||||||
skipPausing: getSkipPausing(state),
|
skipPausing: getSkipPausing(state),
|
||||||
inlinePreviewEnabled: getInlinePreview(state),
|
inlinePreviewEnabled: getInlinePreview(state),
|
||||||
canRewind: getCanRewind(state),
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ export type CallDeclaration = SymbolDeclaration & {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type MemberDeclaration = SymbolDeclaration & {
|
export type MemberDeclaration = SymbolDeclaration & {
|
||||||
computed: boolean,
|
computed: Boolean,
|
||||||
expression: string,
|
expression: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,12 +118,8 @@ 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.
|
// In all other cases, this is used as a script breakpoint handler.
|
||||||
// Clear any existing handler first in case this is called multiple times
|
// Clear any existing handler first in case this is called multiple times
|
||||||
@ -224,8 +220,7 @@ BreakpointActor.prototype = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replay logpoints are handled in _newOffsetsOrOptions
|
if (logValue) {
|
||||||
if (logValue && !this.threadActor.dbg.replaying) {
|
|
||||||
return logEvent({
|
return logEvent({
|
||||||
threadActor: this.threadActor,
|
threadActor: this.threadActor,
|
||||||
frame,
|
frame,
|
||||||
|
Loading…
Reference in New Issue
Block a user