Closed Bug 1151413 Opened 9 years ago Closed 9 years ago

executeSoon should set async caller

Categories

(DevTools :: Framework, defect)

defect
Not set
normal

Tracking

(firefox46 fixed)

VERIFIED FIXED
Firefox 46
Tracking Status
firefox46 --- fixed

People

(Reporter: jryans, Assigned: jryans)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

|makeInfallible| should use |callFunctionWithAsyncStack| to connect the function it runs with the outer environment.
Assignee: nobody → jryans
Status: NEW → ASSIGNED
Looks like `makeInfallible` is actually fine itself, but `executeSoon` is the one with async behavior (and it happens to *call* `makeInfallible` which is what appears in the stack trace later.)
Summary: makeInfallible should set async caller → executeSoon should set async caller
Attachment #8700115 - Flags: review?(ejpbruel) → review+
Comment on attachment 8700115 [details]
MozReview Request: Bug 1151413 - Set async caller in DevToolsUtils.executeSoon r=ejpbruel

https://reviewboard.mozilla.org/r/28585/#review25427

Looks good to me. Great that you added a test for this! I just have one comment about the test. r+ with that addressed.

::: devtools/shared/tests/unit/test_executeSoon.js:18
(Diff revision 1)
> +  if (!Services.prefs.getBoolPref("javascript.options.asyncstack")) {

Are async stacks enabled by default? If we ever decide to disable them, this test will always pass. Wouldn't it be better to always enable async stacks for this test, and then reset the pref to its original value afterwards?
https://reviewboard.mozilla.org/r/28585/#review25427

> Are async stacks enabled by default? If we ever decide to disable them, this test will always pass. Wouldn't it be better to always enable async stacks for this test, and then reset the pref to its original value afterwards?

They are only enabled on desktop, and only for non-release channels, by default.  Anyway, what you say seems fine, I'll update the test.
Comment on attachment 8700115 [details]
MozReview Request: Bug 1151413 - Set async caller in DevToolsUtils.executeSoon r=ejpbruel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/28585/diff/1-2/
https://hg.mozilla.org/mozilla-central/rev/0df8478ca614
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
[bugday-20160323]

Status: RESOLVED,FIXED -> UNVERIFIED

Comments:
STR: Developer specific testing

Component: 
Name 			Firefox
Version 		46.0b4
Build ID 		20160322075646
Update Channel 	        beta
User Agent 		Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
OS                      Windows 7 SP1 x86_64
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: