Closed Bug 1775207 Opened 2 years ago Closed 2 years ago

Add per-global or per-realm option to enable async stack capturing

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Bug 1770477 needs async stack capturing, and the current options are the following:

  • Make the target global a debuggee
  • Flip asyncstack_capture_debuggee_only option and enable async stack capturing globally

Given the set of global that needs async stack is limited and also known, and also debugging API isn't necessary there, we can look into adding another option there, to introduce per-global or per-realm option to enable async stack capturing.

Severity: -- → N/A
Priority: -- → P2

This patch adds Debugger.prototype.enableAsyncStack and Debugger.prototype.disableAsyncStack.
I'm not sure if this is the right place to add those functions, given it's not related to debugger.
but at least it's available to webdriver code.

If there's better place to add them, let me know.
if accessing the functionality via Gecko-side's C++ is better, I'll add public JSAPI for them.

Flags: needinfo?(jdescottes)

(In reply to Tooru Fujisawa [:arai] from comment #2)

This patch adds Debugger.prototype.enableAsyncStack and Debugger.prototype.disableAsyncStack.
I'm not sure if this is the right place to add those functions, given it's not related to debugger.
but at least it's available to webdriver code.

If there's better place to add them, let me know.
if accessing the functionality via Gecko-side's C++ is better, I'll add public JSAPI for them.

Thanks a lot Arai!

If there's better place to add them, let me know.

IMO the feature is still related to debugging, or at least to "inspecting" the browser. So somewhere in Debugger makes sense. Maybe another option would be to add that to Debugger.Object, but I don't know if that would work for realms And it's not really better than your proposition anyway.

if accessing the functionality via Gecko-side's C++ is better, I'll add public JSAPI for them.

All our codebase is in JS, so the current patch is perfect for our usage :)

Flags: needinfo?(jdescottes)
Assignee: nobody → arai.unmht
Attachment #9282483 - Attachment description: WIP: Bug 1775207 - Add per-realm option to enable async stack capturing. → Bug 1775207 - Add per-realm option to enable async stack capturing. r?tcampbell!
Status: NEW → ASSIGNED
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/5699f49a9825 Add per-realm option to enable async stack capturing. r=tcampbell
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: