зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1593846
- Paused packet should return a frame front. r=bhackett
Differential Revision: https://phabricator.services.mozilla.com/D52259 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
42ee4fc91a
Коммит
d3ae1f3a8d
|
@ -32,7 +32,7 @@ export function prepareSourcePayload(
|
|||
|
||||
export function createFrame(
|
||||
thread: ThreadId,
|
||||
frame: FramePacket | FrameFront,
|
||||
frame: FrameFront,
|
||||
index: number = 0
|
||||
): ?Frame {
|
||||
if (!frame) {
|
||||
|
@ -45,10 +45,8 @@ export function createFrame(
|
|||
column: frame.where.column,
|
||||
};
|
||||
|
||||
const id = frame.data ? frame.actorID : frame.actor;
|
||||
|
||||
return {
|
||||
id,
|
||||
id: frame.actorID,
|
||||
thread,
|
||||
displayName: frame.displayName,
|
||||
location,
|
||||
|
@ -67,7 +65,7 @@ export function makeSourceId(source: SourcePayload) {
|
|||
export function createPause(
|
||||
thread: string,
|
||||
packet: PausedPacket,
|
||||
frames: FramePacket[]
|
||||
frames: FrameFront[]
|
||||
): any {
|
||||
// NOTE: useful when the debugger is already paused
|
||||
const frame = packet.frame || frames[0];
|
||||
|
|
|
@ -143,7 +143,7 @@ export type PausedPacket = {
|
|||
actor: ActorId,
|
||||
from: ActorId,
|
||||
type: string,
|
||||
frame: FramePacket,
|
||||
frame: FrameFront,
|
||||
why: {
|
||||
actors: ActorId[],
|
||||
type: string,
|
||||
|
@ -367,7 +367,7 @@ export type ObjectFront = {
|
|||
* @static
|
||||
*/
|
||||
export type ThreadFront = {
|
||||
getFrames: (number, number) => Promise<{| frames: FramePacket[] |}>,
|
||||
getFrames: (number, number) => Promise<{| frames: FrameFront[] |}>,
|
||||
resume: Function => Promise<*>,
|
||||
stepIn: Function => Promise<*>,
|
||||
stepOver: Function => Promise<*>,
|
||||
|
|
|
@ -1523,7 +1523,7 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
|
|||
};
|
||||
|
||||
if (frame) {
|
||||
packet.frame = this._createFrameActor(frame).form();
|
||||
packet.frame = this._createFrameActor(frame);
|
||||
}
|
||||
|
||||
if (this.dbg.replaying) {
|
||||
|
|
|
@ -38,7 +38,7 @@ function test_pause_frame() {
|
|||
gThreadFront.once("paused", function(packet2) {
|
||||
const poppedFrames = packet2.poppedFrames;
|
||||
Assert.equal(typeof poppedFrames, typeof []);
|
||||
Assert.ok(poppedFrames.includes(packet1.frame.actor));
|
||||
Assert.ok(poppedFrames.includes(packet1.frame.actorID));
|
||||
gThreadFront.resume().then(function() {
|
||||
finishClient(gClient);
|
||||
});
|
||||
|
|
|
@ -22,7 +22,7 @@ async function testSetWatchpoint({ threadFront, debuggee, targetFront }) {
|
|||
const consoleFront = await targetFront.getFront("console");
|
||||
const { result } = await consoleFront.evaluateJSAsync(input, {
|
||||
thread: threadFront.actor,
|
||||
frameActor: packet.frame.actor,
|
||||
frameActor: packet.frame.actorID,
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ async function testLoops({ threadFront, debuggee, targetFront }) {
|
|||
const consoleFront = await targetFront.getFront("console");
|
||||
const { result } = await consoleFront.evaluateJSAsync(input, {
|
||||
thread: threadFront.actor,
|
||||
frameActor: packet.frame.actor,
|
||||
frameActor: packet.frame.actorID,
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ const threadSpec = generateActorSpec({
|
|||
events: {
|
||||
paused: {
|
||||
actor: Option(0, "nullable:string"),
|
||||
frame: Option(0, "nullable:json"),
|
||||
frame: Option(0, "frame"),
|
||||
why: Option(0, "paused-reason"),
|
||||
poppedFrames: Option(0, "nullable:json"),
|
||||
error: Option(0, "nullable:json"),
|
||||
|
|
Загрузка…
Ссылка в новой задаче