Closed Bug 710950 Opened 9 years ago Closed 9 years ago

JSScript::function_ is not barriered

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: terrence, Assigned: terrence)

References

Details

Attachments

(2 files)

This is immutable, but will need to be barriered for generational GC.  JSFunction is a JSObject, so this should not be difficult to add.
The field is immutable, so we can return an unwrapped pointer and don't have to worry about it for incremental barriers.  We do need post barriers on it during init for detecting cross-generation pointers, however.  Just make it a normal HeapPtr.
Assignee: general → terrence
Status: NEW → ASSIGNED
Attachment #582124 - Flags: review?(wmccloskey)
Comment on attachment 582124 [details] [diff] [review]
v1: barrier function_

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

Good to see these getting fixed!

::: js/src/jsscript.h
@@ +528,5 @@
>      js::ScriptOpcodeCounts pcCounters;
>  
>    private:
> +    js::DebugScript         *debug;
> +    js::HeapPtr<JSFunction> function_;

js::HeapPtrFunction is shorter.
Attachment #582124 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/mozilla-central/rev/ec45fad57ec6
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.