зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1532779 - Add a helper for dumping the current state of the thread actor. r=loganfsmyth
Differential Revision: https://phabricator.services.mozilla.com/D22178 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c2edd1c174
Коммит
5b509d2a2c
|
@ -22,7 +22,7 @@ function sendPacket(dbg: any, packet: any, callback: () => void) {
|
|||
dbg.client.sendPacket(packet, callback || console.log);
|
||||
}
|
||||
|
||||
function sendPacketToThread(dbg: Object, packet: any, callback: () => void) {
|
||||
function sendPacketToThread(dbg: Object, packet: any, callback: Function = () => {}) {
|
||||
sendPacket(
|
||||
dbg,
|
||||
{ to: dbg.connection.tabConnection.threadClient.actor, ...packet },
|
||||
|
@ -70,7 +70,8 @@ export function setupHelper(obj: Object) {
|
|||
findSources: url => findSources(dbg, url),
|
||||
evaluate: (expression, cbk) => evaluate(dbg, expression, cbk),
|
||||
sendPacketToThread: (packet, cbk) => sendPacketToThread(dbg, packet, cbk),
|
||||
sendPacket: (packet, cbk) => sendPacket(dbg, packet, cbk)
|
||||
sendPacket: (packet, cbk) => sendPacket(dbg, packet, cbk),
|
||||
dumpThread: () => sendPacketToThread(dbg, { type: "dumpThread" })
|
||||
},
|
||||
formatters: {
|
||||
visibleColumnBreakpoints: () => _formatColumnBreapoints(dbg)
|
||||
|
|
|
@ -1765,6 +1765,13 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
|
|||
return true;
|
||||
},
|
||||
|
||||
onDump: function() {
|
||||
return {
|
||||
pauseOnExceptions: this._options.pauseOnExceptions,
|
||||
ignoreCaughtExceptions: this._options.ignoreCaughtExceptions,
|
||||
skipBreakpoints: this.skipBreakpoints,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Object.assign(ThreadActor.prototype.requestTypes, {
|
||||
|
@ -1779,6 +1786,7 @@ Object.assign(ThreadActor.prototype.requestTypes, {
|
|||
"sources": ThreadActor.prototype.onSources,
|
||||
"threadGrips": ThreadActor.prototype.onThreadGrips,
|
||||
"skipBreakpoints": ThreadActor.prototype.onSkipBreakpoints,
|
||||
"dumpThread": ThreadActor.prototype.onDump,
|
||||
});
|
||||
|
||||
exports.ThreadActor = ThreadActor;
|
||||
|
|
Загрузка…
Ссылка в новой задаче