Closed
Bug 722345
Opened 13 years ago
Closed 6 years ago
remove request API
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: igor, Assigned: jandem)
References
Details
Attachments
(3 files, 1 obsolete file)
The bug 675078 made the runtime single-threaded but it kept the request API as they are used for the following things besides thread-synchronization:
1. The GC scans the native stack only if the calling thread was in active or suspended request.
2. The transition no_request -> request wakes up the watchdog thread that will terminate the long-running script if the the main thread spends too much time in the request.
3. The cycle collector treats JSContext instances as black if the context is in the request.
We should consider how to address the corresponding needs without the notion of requests so the API could be eliminated.
For example, until the conservative GC is disabled, we can always scan the calling thread stack tolerating potential false positives. The watchdog case can try to observe the script invocation and base its decisions on that. And cycle collectors it seems can decide about active context based on the color of the global object stored in it or similar.
Comment 2•13 years ago
|
||
I don't really know what outstanding requests are, but as far as the cycle collector goes, what is happening is that if there are any outstanding requests, then a JSContext will keep its global object alive, even if the global object isn't marked black. Right now, if the global stored is black, then the JSContext won't keep anything additional alive, even with outstanding requests. Well, aside from itself.
Comment 3•13 years ago
|
||
Any plans for this once bug 730234 is out of the way?
Reporter | ||
Comment 4•13 years ago
|
||
(In reply to Luke Wagner [:luke] from comment #3)
> Any plans for this once bug 730234 is out of the way?
We need one more blocker here besides that bug and 720045. Currently the cycle collector uses in non-trivial way the contexts entered the requests as a strong roots for the global object stored in them. To address that we either need one global per compartment when entered compartments will serve as roots. Or, if that takes long time, we can remove the global from JSContext and store them as strong roots in the AutoEnterCompartment structure.
Depends on: 730234
Comment 5•12 years ago
|
||
This patch is really old and I'm not working on it, but I thought I should post it b/c it shows how (I think) to replace the remaining vestigial uses of requests with entering/leaving compartments.
Updated•10 years ago
|
Assignee: general → nobody
Assignee | ||
Comment 8•6 years ago
|
||
Depends on D4085
Assignee | ||
Comment 9•6 years ago
|
||
Depends on D4422
Assignee | ||
Comment 10•6 years ago
|
||
Depends on D4423
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Updated•6 years ago
|
Attachment #745210 -
Attachment is obsolete: true
Comment 11•6 years ago
|
||
Comment on attachment 9004484 [details]
Bug 722345 part 1 - Remove now unused activity callback API. r=luke
Luke Wagner [:luke] has approved the revision.
Attachment #9004484 -
Flags: review+
Comment 12•6 years ago
|
||
Comment on attachment 9004485 [details]
Bug 722345 part 2 - Remove AutoCheckRequestDepth, rename CHECK_REQUEST to CHECK_THREAD. r=luke
Luke Wagner [:luke] has approved the revision.
Attachment #9004485 -
Flags: review+
Comment 13•6 years ago
|
||
Comment on attachment 9004486 [details]
Bug 722345 part 3 - Remove request API. r=luke
Luke Wagner [:luke] has approved the revision.
Attachment #9004486 -
Flags: review+
Comment 14•6 years ago
|
||
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6f17ffaad886
part 1 - Remove now unused activity callback API. r=luke
https://hg.mozilla.org/integration/mozilla-inbound/rev/8542dc7212b4
part 2 - Remove AutoCheckRequestDepth, rename CHECK_REQUEST to CHECK_THREAD. r=luke
https://hg.mozilla.org/integration/mozilla-inbound/rev/e951ad8147a7
part 3 - Remove request API. r=luke
Comment 15•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6f17ffaad886
https://hg.mozilla.org/mozilla-central/rev/8542dc7212b4
https://hg.mozilla.org/mozilla-central/rev/e951ad8147a7
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Comment 16•6 years ago
|
||
Doesn't look like this affects MDN Web Docs. Removing ddn.
(if you disagree, please explain what kinds of MDN doc updates would be needed).
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•