Closed Bug 1154341 Opened 9 years ago Closed 9 years ago

Investigate rooting JS::ubi::Node

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: fitzgen, Assigned: fitzgen)

References

Details

From js/public/UbiNode.h:

>    // Rooting Restrictions
>    //
>    // At present there is no way to root ubi::Node instances, so instances can't be
>    // live across any operation that might GC. Analyses using ubi::Node must either
>    // run to completion and convert their results to some other rootable type, or
>    // save their intermediate state in some rooted structure if they must GC before
>    // they complete. (For algorithms like path-finding and dominator tree
>    // computation, we implement the algorithm avoiding any operation that could
>    // cause a GC --- and use AutoCheckCannotGC to verify this.)
>    //
>    // If this restriction prevents us from implementing interesting tools, we may
>    // teach the GC how to root ubi::Nodes, fix up hash tables that use them as
>    // keys, etc.

In bug 1024774, we can implement the interesting tools, however implementing *tests* for them is actually much harder to do without GC'ing!

It should be pretty easy to make a ubi::RootedNode, but I'm very hesitant about adding extra overhead to heap snapshots. Perhaps it is possible to make WriteHeapGraph take a UbiNodeT type that is plain old ubi::Node in non-tests and ubi::RootedNode in tests where GC can get triggered?

Is it time?
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
(In reply to Nick Fitzgerald [:fitzgen] from comment #0)
> Is it time?

Nope, we are just going to ignore MockWriter in the hazard analysis.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.