Closed
Bug 1142577
Opened 9 years ago
Closed 9 years ago
Use JS::AutoSetAsyncStackForNewCalls for setTimeout and setInterval
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1148593
People
(Reporter: fitzgen, Assigned: fitzgen)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Attachments
(2 files, 7 obsolete files)
16.84 KB,
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
4.66 KB,
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
This way, we will get nice stacks that span asynchronous operations.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
Assignee | ||
Updated•9 years ago
|
Summary: Use JS::AutoSetAsyncStackForNewCalls for setTimeout, setInterval, and requestAnimationFrame → Use JS::AutoSetAsyncStackForNewCalls for setTimeout and setInterval
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
Just realized that this doesn't do much yet because only DOM exceptions use SavedFrame stacks at the moment. Gotta fix bug 1038238 before this is really useful.
Assignee | ||
Updated•9 years ago
|
Blocks: async-stacks
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8576808 -
Attachment is obsolete: true
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8577647 -
Attachment is obsolete: true
Attachment #8577658 -
Flags: review?(khuey)
Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8577662 -
Flags: review?(khuey)
Attachment #8577658 -
Flags: review?(khuey) → review+
Comment on attachment 8577662 [details] [diff] [review] Part 1: Add a test for async stacks across setTimeout Review of attachment 8577662 [details] [diff] [review]: ----------------------------------------------------------------- Test this cross-global too, to make sure there are no compartment mismatches or anything.
Attachment #8577662 -
Flags: review?(khuey) → review-
Assignee | ||
Comment 7•9 years ago
|
||
Attachment #8577662 -
Attachment is obsolete: true
Attachment #8578807 -
Flags: review?(khuey)
Assignee | ||
Comment 8•9 years ago
|
||
Added a version that uses setTimeout and a callback from different compartments.
Attachment #8578807 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 9•9 years ago
|
||
Attachment #8577658 -
Attachment is obsolete: true
Attachment #8586325 -
Flags: review+
Assignee | ||
Comment 10•9 years ago
|
||
Attachment #8578807 -
Attachment is obsolete: true
Attachment #8586326 -
Flags: review+
Assignee | ||
Comment 11•9 years ago
|
||
Rebased, carrying over r+. Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=17a19e13654c
Assignee | ||
Comment 12•9 years ago
|
||
Attachment #8586325 -
Attachment is obsolete: true
Attachment #8589919 -
Flags: review+
Assignee | ||
Comment 13•9 years ago
|
||
Attachment #8586326 -
Attachment is obsolete: true
Attachment #8589920 -
Flags: review+
Assignee | ||
Comment 14•9 years ago
|
||
Rebased again and fixed a bug with interaction between the CC and the GC and a lack of mozilla::HoldJSObjects calls. New try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=c0b24ce8735f
Assignee | ||
Comment 15•9 years ago
|
||
Looks like I just need to update a Promise + stacks test that is using setTimeout and getting more stack frames than it used to.
Comment 16•9 years ago
|
||
Does implementing this for setTimeout also include setImmediate as a result?
Flags: needinfo?(nfitzgerald)
Assignee | ||
Comment 17•9 years ago
|
||
(In reply to :Paolo Amadini from comment #16) > Does implementing this for setTimeout also include setImmediate as a result? These patches don't. Also, it seems setImmediate is only implemented for WorkerDebuggerGlobalScope -- not for general windows. This matches my recollection that we weren't going to implement setImmediate in Gecko for some reason or other.
Flags: needinfo?(nfitzgerald)
Comment 18•9 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen] from comment #17) > (In reply to :Paolo Amadini from comment #16) > > Does implementing this for setTimeout also include setImmediate as a result? > > These patches don't. > > Also, it seems setImmediate is only implemented for > WorkerDebuggerGlobalScope -- not for general windows. This matches my > recollection that we weren't going to implement setImmediate in Gecko for > some reason or other. WorkerDebuggerGlobalScope::setImmediate is a really special case. We can't use the WorkerGlobalScope version of setTimeout and setInterval in the worker debugger, because those functions are not aware of the debugger event queue. Consequently, they won't work inside nested event loops. We need some way to schedule a runnable on the debugger's event queue, mainly so we can use Promise.jsm promises in the worker debugger, but we don't need full timer support. Which is why setImmediate is defined on WorkerDebuggerGlobalScope, and nowhere else. Hope that helps.
Comment 19•9 years ago
|
||
FWIW this is fixed more generically by the patch in bug 1148593.
Assignee | ||
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•