mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Bug 1555518 - Fixes original stack display for wasm files, and ref to original source. r=jlast
- Fixes expandFrames() to ensure the thread property is set - Refactors getSourceLocationFromMouseEvent to use fromEditorLine - Replaces dwarf_to_json (for proper DWARF conversion) Differential Revision: https://phabricator.services.mozilla.com/D33092 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
c91a3fe44a
commit
827de35634
@ -68,7 +68,7 @@ describe("wasm source maps", () => {
|
|||||||
expect(pos3).toHaveLength(1);
|
expect(pos3).toHaveLength(1);
|
||||||
expect(pos3[0].line).toEqual(14);
|
expect(pos3[0].line).toEqual(14);
|
||||||
expect(pos3[0].column).toEqual(0);
|
expect(pos3[0].column).toEqual(0);
|
||||||
expect(pos3[0].lastColumn).toEqual(Infinity);
|
expect(pos3[0].lastColumn).toEqual(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("content presents", async () => {
|
test("content presents", async () => {
|
||||||
|
@ -56,7 +56,7 @@ class WasmRemap {
|
|||||||
column: 0,
|
column: 0,
|
||||||
};
|
};
|
||||||
if (this._computeColumnSpans) {
|
if (this._computeColumnSpans) {
|
||||||
generatedPosition.lastColumn = Infinity;
|
generatedPosition.lastColumn = 0;
|
||||||
}
|
}
|
||||||
return generatedPosition;
|
return generatedPosition;
|
||||||
}
|
}
|
||||||
@ -95,6 +95,7 @@ class WasmRemap {
|
|||||||
source,
|
source,
|
||||||
generatedLine: generatedColumn,
|
generatedLine: generatedColumn,
|
||||||
generatedColumn: 0,
|
generatedColumn: 0,
|
||||||
|
lastGeneratedColumn: 0,
|
||||||
originalLine,
|
originalLine,
|
||||||
originalColumn,
|
originalColumn,
|
||||||
name,
|
name,
|
||||||
|
Binary file not shown.
@ -136,7 +136,7 @@ async function expandFrames(
|
|||||||
};
|
};
|
||||||
|
|
||||||
originalFrames.forEach((originalFrame, j) => {
|
originalFrames.forEach((originalFrame, j) => {
|
||||||
if (!originalFrame.location || !originalFrame.thread) {
|
if (!originalFrame.location) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,10 +145,10 @@ async function expandFrames(
|
|||||||
const id = j == 0 ? frame.id : `${frame.id}-originalFrame${j}`;
|
const id = j == 0 ? frame.id : `${frame.id}-originalFrame${j}`;
|
||||||
result.push({
|
result.push({
|
||||||
id,
|
id,
|
||||||
thread: originalFrame.thread,
|
|
||||||
displayName: originalFrame.displayName,
|
displayName: originalFrame.displayName,
|
||||||
location: originalFrame.location,
|
location: originalFrame.location,
|
||||||
source: null,
|
source: null,
|
||||||
|
thread: frame.thread,
|
||||||
scope: frame.scope,
|
scope: frame.scope,
|
||||||
this: frame.this,
|
this: frame.this,
|
||||||
isOriginal: true,
|
isOriginal: true,
|
||||||
|
@ -224,11 +224,12 @@ export function getSourceLocationFromMouseEvent(
|
|||||||
left: e.clientX,
|
left: e.clientX,
|
||||||
top: e.clientY,
|
top: e.clientY,
|
||||||
});
|
});
|
||||||
|
const sourceId = source.id;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
sourceId: source.id,
|
sourceId,
|
||||||
line: line + 1,
|
line: fromEditorLine(sourceId, line),
|
||||||
column: ch + 1,
|
column: isWasm(sourceId) ? 0 : ch + 1,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user