Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

Commit 2b4d6e9

Browse files
janodvarkonchevobbe
authored andcommitted
Introduce getStackTrace method for webconsole client (sync with m-c)
1 parent a7ec475 commit 2b4d6e9

File tree

1 file changed

+18
-0
lines changed
  • packages/devtools-connection/src/webconsole

1 file changed

+18
-0
lines changed

packages/devtools-connection/src/webconsole/client.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,24 @@ WebConsoleClient.prototype = {
524524
this._client.request(packet, aOnResponse);
525525
},
526526

527+
/**
528+
* Retrieve the stack-trace information for the given NetworkEventActor.
529+
*
530+
* @param string actor
531+
* The NetworkEventActor ID.
532+
* @param function onResponse
533+
* The function invoked when the stack-trace is received.
534+
* @return request
535+
* Request object that implements both Promise and EventEmitter interfaces
536+
*/
537+
getStackTrace: function (actor, onResponse) {
538+
let packet = {
539+
to: actor,
540+
type: "getStackTrace",
541+
};
542+
return this._client.request(packet, onResponse);
543+
},
544+
527545
/**
528546
* Send a HTTP request with the given data.
529547
*

0 commit comments

Comments
 (0)