Closed Bug 1297026 Opened 3 years ago Closed 3 years ago

Update references to 'compartment GC' to 'zone GC'

Categories

(Core :: JavaScript: GC, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

There are a bunch of places in the codebase where we still talk about compartment CGs.  These should really be corrected to talk about per-zone GCs instead.

Here are some but there are probably more:

http://searchfox.org/mozilla-central/search?q=compartmentgc&path=
http://searchfox.org/mozilla-central/search?q=compartment+gc&path=
Patch to update references to compartment GCs.  The only thing I left was the GC_IS_COMPARTMENTAL telemetry key for obvious reasons.
Assignee: nobody → jcoppeard
Attachment #8784303 - Flags: review?(terrence)
Comment on attachment 8784303 [details] [diff] [review]
bug1297026-zone-gc

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

::: js/xpconnect/src/XPCJSRuntime.cpp
@@ +808,5 @@
>                  }
>              }
>  
> +            // Do the sweeping. During a zone GC, only WrappedNativeProtos in
> +            // collected compartments will be marked. Therefore, some reachable

s/compartments/zones/

@@ +811,5 @@
> +            // Do the sweeping. During a zone GC, only WrappedNativeProtos in
> +            // collected compartments will be marked. Therefore, some reachable
> +            // NativeInterfaces will not be marked, so it is not safe to sweep
> +            // them. We still need to unmark them, since the ones pointed to by
> +            // WrappedNativeProtos in a compartment being collected will be

And here.

@@ +817,5 @@
>              //
>              // Ideally, if NativeInterfaces from different compartments were
>              // kept separate, we could sweep only the ones belonging to
>              // compartments being collected. Currently, though, NativeInterfaces
>              // are shared between compartments. This ought to be fixed.

And here as well.
Attachment #8784303 - Flags: review?(terrence) → review+
I'm deleting that comment in XPCJSRuntime and that doSweep code, so if you could just leave that alone it should be gone in a week or two. Then that entire isCompartment argument can be deleted.

Also some of those GC prefs in nsJSEnvironment should probably be deleted...
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/361c0ddbcef0
Replace outdated references to 'compartment GC' with 'zone GC' r=terrence
(In reply to Andrew McCreight [:mccr8] from comment #3)
Sorry, I didn't see your comment before I pushed.

Nice work getting rid of isCompartment BTW.
https://hg.mozilla.org/mozilla-central/rev/361c0ddbcef0
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.