Closed Bug 720840 Opened 12 years ago Closed 12 years ago

GC: Call MarkStringUnbarriered directly

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: terrence, Assigned: terrence)

References

Details

Attachments

(1 file)

Attached patch v0Splinter Review
We have a special marker function for handling the Atom list because we need to call JS_SET_TRACING_INDEX externally to avoid clobbering the index.  However, nobody cares about the index here and if they do, they can add custom debug code.  It is better at this point to have a consistent and correct interface, thus we remove the specialized atomized string marking in favor of the existing string marker.
Attachment #591268 - Flags: review?(wmccloskey)
Comment on attachment 591268 [details] [diff] [review]
v0

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

Good to see these go.

::: js/src/jsatom.cpp
@@ +388,3 @@
>      if (rt->gcKeepAtoms) {
>          for (AtomSet::Range r = state->atoms.all(); !r.empty(); r.popFront()) {
> +            MarkStringUnbarriered(trc, r.front().asPtr(), "locked_atom");

I think you can use MarkRoot here.

@@ +394,5 @@
>              AtomStateEntry entry = r.front();
>              if (!entry.isTagged())
>                  continue;
>  
> +            MarkStringUnbarriered(trc, entry.asPtr(), "interned_atom");

and here.
Attachment #591268 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/mozilla-central/rev/680991750088
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: