Skip to content

Commit cb86faa

Browse files
authored
(wip) Refactor pause actions (firefox-devtools#4439)
* Update Pause Semantics
1 parent e924c3e commit cb86faa

42 files changed

Lines changed: 637 additions & 501 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/actions/ast.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
getPreview
1010
} from "../selectors";
1111

12-
import { ensureParserHasSourceText } from "./sources";
1312
import { getMappedExpression } from "./expressions";
1413
import { PROMISE } from "../utils/redux/middleware/promise";
1514
import {
@@ -38,7 +37,7 @@ export function setSymbols(sourceId: SourceId) {
3837
}
3938

4039
const source = sourceRecord.toJS();
41-
if (!source.text || hasSymbols(getState(), source)) {
40+
if (!source.text || source.isWasm || hasSymbols(getState(), source)) {
4241
return;
4342
}
4443

@@ -60,7 +59,7 @@ export function setEmptyLines(sourceId: SourceId) {
6059
}
6160

6261
const source = sourceRecord.toJS();
63-
if (!source.text) {
62+
if (!source.text || source.isWasm) {
6463
return;
6564
}
6665

@@ -147,9 +146,6 @@ export function setPreview(
147146
source.toJS()
148147
);
149148

150-
const generatedSourceId = generatedLocation.sourceId;
151-
await dispatch(ensureParserHasSourceText(generatedSourceId));
152-
153149
expression = await getMappedExpression(
154150
{ sourceMaps },
155151
generatedLocation,

src/actions/expressions.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
} from "../selectors";
1010
import { PROMISE } from "../utils/redux/middleware/promise";
1111
import { replaceOriginalVariableName } from "devtools-map-bindings/src/utils";
12-
import { ensureParserHasSourceText } from "./sources";
1312
import { isGeneratedId } from "devtools-source-map";
1413
import { wrapExpression } from "../utils/expressions";
1514
import * as parser from "../workers/parser";
@@ -117,9 +116,6 @@ function evaluateExpression(expression: Expression) {
117116
const sourceId = source.get("id");
118117

119118
if (!isGeneratedId(sourceId)) {
120-
const generatedSourceId = generatedLocation.sourceId;
121-
await dispatch(ensureParserHasSourceText(generatedSourceId));
122-
123119
input = await getMappedExpression(
124120
{ sourceMaps },
125121
generatedLocation,

src/actions/pause.js

Lines changed: 0 additions & 336 deletions
This file was deleted.

0 commit comments

Comments
 (0)