The default bug view has changed. See this FAQ.

JSScript::function_ is not barriered

RESOLVED FIXED in mozilla11

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: terrence, Assigned: terrence)

Tracking

Trunk
mozilla11
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
This is immutable, but will need to be barriered for generational GC.  JSFunction is a JSObject, so this should not be difficult to add.
(Assignee)

Comment 1

5 years ago
Created attachment 582124 [details] [diff] [review]
v1: barrier function_

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

Comment 3

5 years ago
Created attachment 582153 [details] [diff] [review]
v2: With review feedback.
(Assignee)

Comment 4

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