Closed Bug 737195 Opened 8 years ago Closed 8 years ago

GC: missing barrier on JSFunction::atom

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: terrence, Assigned: terrence)

Details

Attachments

(1 file, 1 obsolete file)

We appear to trace through JSFunction::atom.  We only ever initialized it, so we don't need incremental barriers on it, but we do need generation barriers here.
Attached patch v0 (obsolete) — Splinter Review
Does this make sense?  It would be less code to just trigger the atom post barrier manually in the two places where it is needed, but this way seems cleaner.
Attachment #607327 - Flags: review?(wmccloskey)
I think this misses the barrier in the js_XDRAtom case. The right way to handle that is similar to what we do with script in that function. Basically, define a local variable |atom|. In the encode case, set it to fun->atom. In the decode case, set it to NULL. Then pass &atom to js_XDRAtom. Later, in the JSXDR_DECODE section, call fun->atom.init(atom).

Related to this, I think that the fun->setScript(script) statement can be changed to initScript.
Attachment #607327 - Attachment is obsolete: true
Attachment #607327 - Flags: review?(wmccloskey)
Attachment #607341 - Flags: review?(wmccloskey)
Attachment #607341 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/mozilla-central/rev/e367339ba6b2
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.