The default bug view has changed. See this FAQ.

GC: missing barrier on JSFunction::atom

RESOLVED FIXED in mozilla14

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: terrence, Assigned: terrence)

Tracking

Trunk
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
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.
(Assignee)

Comment 1

5 years ago
Created attachment 607327 [details] [diff] [review]
v0

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.
(Assignee)

Comment 3

5 years ago
Created attachment 607341 [details] [diff] [review]
v1: fixed xdring of the wrapped atom
Attachment #607327 - Attachment is obsolete: true
Attachment #607327 - Flags: review?(wmccloskey)
Attachment #607341 - Flags: review?(wmccloskey)
Attachment #607341 - Flags: review?(wmccloskey) → review+
(Assignee)

Comment 4

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/af799044d21e
https://hg.mozilla.org/mozilla-central/rev/e367339ba6b2
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/af799044d21e
You need to log in before you can comment on or make changes to this bug.