Closed Bug 1189112 Opened 9 years ago Closed 9 years ago

Use standard mechanisms to root and trace ScriptAndCountsVector

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: terrence, Assigned: terrence)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

We now have tools that let us not have to manually iterate this vector.

1) We can swap out the normal Vector for a TraceableVector to avoid the manual iteration.

2) We can wrap it in a PersistentRooted so we don't have to manually visit it when marking the runtime.
Attachment #8640785 - Flags: review?(nicolas.b.pierron)
Assignee: nobody → terrence
Status: NEW → ASSIGNED
Comment on attachment 8640785 [details] [diff] [review]
1_use_common_vector_tracing_logic_for_scriptsandcountsvector-v0.diff

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

This patch replaces the markRuntime for-loop which iterates to trace all JSScript of ScriptAndCounts, by a trace function on the vector (TraceableVector) which iterates and call the new trace function of the ScriptAndCounts structure.
Attachment #8640785 - Flags: review?(nicolas.b.pierron) → review+
Comment on attachment 8640786 [details] [diff] [review]
2_root_scriptsAndCountsVector_use_persistentRooted-v0.diff

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

::: js/public/TraceableVector.h
@@ +169,5 @@
>  };
>  
> +template <typename A, size_t B, typename C, typename D>
> +class PersistentRootedBase<TraceableVector<A,B,C,D>>
> +  : public MutableTraceableVectorOperations<JS::PersistentRooted<TraceableVector<A,B,C,D>>, A,B,C,D>

nit: Can we replace A, B, C, D by T, N, AP, TV.  These are the acronyms used in Vector.h.
Attachment #8640786 - Flags: review?(nicolas.b.pierron) → review+
https://hg.mozilla.org/mozilla-central/rev/abc018892155
https://hg.mozilla.org/mozilla-central/rev/027800a23ccb
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
reopened due to backout in comment #6
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla42 → ---
Merge of backout:
https://hg.mozilla.org/mozilla-central/rev/2f2b78e9f9ef
https://hg.mozilla.org/mozilla-central/rev/502847c64128

This will be in tomorrow's (7-Aug) nightly. Note that there's a nightly respin in progress now that will *NOT* contain these backouts.
This was not related to the crash, relanding.
https://hg.mozilla.org/mozilla-central/rev/971b872a4b60
https://hg.mozilla.org/mozilla-central/rev/a119d84a9485
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: