Closed
Bug 1380498
Opened 7 years ago
Closed 7 years ago
[jsdbg2] Debugger.Script and Debugger.Object should identify generators, async functions
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: jimb, Assigned: jimb)
References
Details
Attachments
(1 file, 1 obsolete file)
There should be a simple, reliable way to determine whether a Debugger.Object's or Debugger.Script's referent is a generator or async function.
Assignee | ||
Comment 1•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Attachment #8890544 -
Attachment description: Add isGeneratorFunction and isAsyncFunction to Debugger.Script and Debugger.Object. → Add isGeneratorFunction and isAsyncFunction to Debugger.Script and Debugger.Object. Depends on patch in bug 1382258.
Comment 2•7 years ago
|
||
Comment on attachment 8890544 [details] [diff] [review] Add isGeneratorFunction and isAsyncFunction to Debugger.Script and Debugger.Object. Depends on patch in bug 1382258. Review of attachment 8890544 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for doing this. I found a couple of small things, but the code change itself looks good to me. ::: js/src/doc/Debugger/Debugger.Object.md @@ +176,5 @@ > function, or not a function at all, returns `undefined` instead. > > +`isGeneratorFunction` > +: True if the referent is a function defined with a `function*` expression or > + statement. False otherwise. Always equal to The implementation actually returns undefined if the object isn't a function, like isArrowFunction does. I think the docs should follow the isArrowFunction text here. @@ +181,5 @@ > + `obj.script.isGeneratorFunction`, assuming `obj.script` is a `Debugger.Script`. > + > +`isAsyncFunction` > +: True if the referent is an async function, defined with an `async function` > + expression or statement. False otherwise. Always equal to Ditto. ::: js/src/jit-test/tests/debug/isAsyncFunction-isGeneratorFunction.js @@ +1,1 @@ > +// Debugger.Script.prototype.isAsyncFunction, Debugger.Object.prototype.isAsyncFunction, I think it would be worthwhile to check some cases where the new functions return 'undefined'.
Attachment #8890544 -
Flags: review?(ttromey) → review+
Assignee | ||
Comment 3•7 years ago
|
||
(In reply to Tom Tromey :tromey from comment #2) > The implementation actually returns undefined if the object isn't a > function, like isArrowFunction does. I think the docs should follow the > isArrowFunction text here. Fixed, thanks. > I think it would be worthwhile to check some cases where the new functions > return 'undefined'. Fixed, thanks.
Assignee | ||
Comment 4•7 years ago
|
||
Carrying over r+ from tromey
Attachment #8890544 -
Attachment is obsolete: true
Attachment #8891086 -
Flags: review+
Assignee | ||
Updated•7 years ago
|
Attachment #8891086 -
Attachment description: Add isGeneratorFunction and isAsyncFunction to Debugger.Script and Debugger.Object. → Add isGeneratorFunction and isAsyncFunction to Debugger.Script and Debugger.Object. r=tromey
Attachment #8891086 -
Flags: review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/aed855892bc9 Add isGeneratorFunction and isAsyncFunction to Debugger.Script and Debugger.Object. r=tromey
Keywords: checkin-needed
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/aed855892bc9
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•