Last Comment Bug 720840 - GC: Call MarkStringUnbarriered directly
: GC: Call MarkStringUnbarriered directly
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla12
Assigned To: Terrence Cole [:terrence]
:
Mentors:
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:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


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

Description Terrence Cole [:terrence] 2012-01-24 14:16:18 PST
Created attachment 591268 [details] [diff] [review]
v0

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 Bill McCloskey (:billm) 2012-01-24 14:23:16 PST
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.
Comment 2 Terrence Cole [:terrence] 2012-01-24 15:23:56 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/680991750088
Comment 3 :Ms2ger (⌚ UTC+1/+2) 2012-01-25 07:18:43 PST
https://hg.mozilla.org/mozilla-central/rev/680991750088

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