Closed Bug 1182653 Opened 9 years ago Closed 9 years ago

Make ubi::Node infrastructure use JSRuntime* instead of JSContext* so it can be used in more situations

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: fitzgen, Assigned: fitzgen)

References

Details

Attachments

(1 file, 1 obsolete file)

I really want to use the ubi::Node infrastructure to find and dump the shortest path to a given thing to stderr for debugging, but a lot of this ubi::Node stuff requires a cx which is maddening.
This will also require making callers handle OOMs themselves.
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
Summary: Make ubi::Node traversal work with a JSRuntime when a JSContext is not available → Make ubi::Node infrastructure use JSRuntime* instead of JSContext* so it can be used in more situations
This enables the use of ubi::Node in situations where a JSContext* is not
available, and paves the way for debugging utilities to dump shortest paths from
GC roots to a given ubi::Node that can be used while paused in a debugger.
Attachment #8664448 - Flags: review?(sphink)
Comment on attachment 8664448 [details] [diff] [review]
Use JSRuntime* instead of JSContext* in ubi::Node infrastructure

Review of attachment 8664448 [details] [diff] [review]:
-----------------------------------------------------------------

WFM

::: js/public/UbiNodeTraverse.h
@@ +204,3 @@
>          size_t frontIndex;
>        public:
> +        explicit Queue() : head(), tail(), frontIndex(0) { }

explicit is unnecessary here, now.
Attachment #8664448 - Flags: review?(sphink) → review+
This enables the use of ubi::Node in situations where a JSContext* is not
available, and paves the way for debugging utilities to dump shortest paths from
GC roots to a given ubi::Node that can be used while paused in a debugger.
Attachment #8664448 - Attachment is obsolete: true
Attachment #8664881 - Flags: review+
New version drops the now unneeded "explicit" keyword.

Inbound is closed, so checkin-needed for when it opens!
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ffb5c875713f
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: