Closed Bug 899970 Opened 6 years ago Closed 6 years ago

GC: Post barrier heap pointers in js/ipc

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(1 file)

Attached patch post-barrier-ipcSplinter Review
No description provided.
Attachment #783704 - Flags: review?(terrence)
This is for a couple of calls to JS_CallObjectTracer() that got added after the last browser post barrier updates.
Comment on attachment 783704 [details] [diff] [review]
post-barrier-ipc

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

r=me

::: js/ipc/JavaScriptShared.cpp
@@ +29,5 @@
>  ObjectStore::trace(JSTracer *trc)
>  {
>      for (ObjectTable::Range r(table_.all()); !r.empty(); r.popFront()) {
> +#ifdef DEBUG
> +        JSObject *prior = r.front().value;

Please change this to a mozilla::DebugOnly<JSObject *>, instead of the #ifdef DEBUG guards.

::: js/ipc/JavaScriptShared.h
@@ +71,5 @@
>  
>      bool init();
>      void trace(JSTracer *trc);
>  
> +    bool add(JSContext *cx, JSObject *, ObjectId id);

Give the |obj| parameter its name, while you are here.

@@ +76,5 @@
>      ObjectId find(JSObject *obj);
>      void remove(JSObject *obj);
>  
>    private:
> +    static void keyMarkCallback(JSTracer *trc, void *k, void *d);

|key| and |data| rather than k and d.
Attachment #783704 - Flags: review?(terrence) → review+
(In reply to Terrence Cole [:terrence] from comment #2)

> Please change this to a mozilla::DebugOnly<JSObject *>

Ah I knew there was a better way.  Other comments addressed.
https://hg.mozilla.org/mozilla-central/rev/e96bc10145e9
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Duplicate of this bug: 891925
You need to log in before you can comment on or make changes to this bug.