Closed
Bug 878850
Opened 12 years ago
Closed 10 years ago
Why do the JSContext-taking rooting methods check for being in a request?
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: bzbarsky, Assigned: terrence)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
5.58 KB,
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
Right now, these two pieces of code:
JS_AddNamedValueRoot(cx, &foo, "bar");
JS_AddNamedValueRootRT(JS_GetRuntime(cx), &foo, "bar");
behave differently: the former requires cx to be in a request, while the latter obviously does not.
Why do we need the "in a request" check?
Comment 1•12 years ago
|
||
I think luke has the best idea of why we need to be in a request these days.
Flags: needinfo?(luke)
Comment 2•12 years ago
|
||
This is all historical; no request is needed now. Requests only serve a few remaining vestigial purposes (such as asking if anything is running).
Flags: needinfo?(luke)
Assignee | ||
Comment 3•12 years ago
|
||
I found out recently that we also only do conservative stack scanning if there is an active request.
Assignee | ||
Comment 4•12 years ago
|
||
To elaborate: we should remove the in-request check from JS_AddNamedValueRoot after we switch to exact rooting.
Blocks: 795030
Updated•11 years ago
|
Assignee: general → nobody
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Comment 5•10 years ago
|
||
The IsInRequest check in Rooted was to ensure we didn't make any stack stores when the conservative scanner was not going to be running. Now that that is all gone, no more need for the check. It looks like there aren't any calls to any of JS_IsInRequest or js::IsInRequest anymore either, so we can kill those too. I think may be one more use of requestDepth still; regardless, we're closing in on killing Requests.
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=77b158741b72
Comment 6•10 years ago
|
||
Comment on attachment 8538860 [details] [diff] [review]
remove_check_request_in_rooted-v0.diff
Review of attachment 8538860 [details] [diff] [review]:
-----------------------------------------------------------------
\o/ yeehaw!
Attachment #8538860 -
Flags: review?(sphink) → review+
Assignee | ||
Comment 7•10 years ago
|
||
Comment 8•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in
before you can comment on or make changes to this bug.
Description
•