Last Comment Bug 720840 - GC: Call MarkStringUnbarriered directly
: GC: Call MarkStringUnbarriered directly
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla12
Assigned To: Terrence Cole [:terrence]
: Jason Orendorff [:jorendorff]
Depends on:
Blocks: 720522
  Show dependency treegraph
Reported: 2012-01-24 14:16 PST by Terrence Cole [:terrence]
Modified: 2012-01-25 07:18 PST (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

v0 (3.67 KB, patch)
2012-01-24 14:16 PST, Terrence Cole [:terrence]
wmccloskey: review+
Details | Diff | Splinter Review

Description User image Terrence Cole [:terrence] 2012-01-24 14:16:18 PST
Created attachment 591268 [details] [diff] [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.
Comment 1 User image Bill McCloskey (:billm) 2012-01-24 14:23:16 PST
Comment on attachment 591268 [details] [diff] [review]

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.
Comment 2 User image Terrence Cole [:terrence] 2012-01-24 15:23:56 PST
Comment 3 User image :Ms2ger (⌚ UTC+1/+2) 2012-01-25 07:18:43 PST

Note You need to log in before you can comment on or make changes to this bug.