Closed
Bug 1001355
Opened 11 years ago
Closed 11 years ago
IsAboutToBeFinalized overload for VMFunction pointers is backwards
Categories
(Core :: JavaScript: GC, defect)
Core
JavaScript: GC
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(1 file)
748 bytes,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
I just spotted that IsAboutToBeFinalized(const js::jit::VMFunction **vmfunc) always returns true, when in fact it should always return false.
This was because I renamed the function from IsMarked() in bug 790338 but didn't invert the result. The same thing happened for the IonCode overload but was fixed in bug 816493.
This means that the functionWrappers_ map in JitRuntime will always be cleared on GC.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8412683 -
Flags: review?(wmccloskey)
This code seems pretty over-generalized. We appear to have only one use of WeakCache, and in that case the key is a VMFunction*. Can we just assume, in WeakCache, that the key will never be finalized? Then we can remove the weird overload of IsAboutToFinalized for VMFunction. It seems pretty error-prone to have that around since it doesn't do what you expect at all.
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Bill McCloskey (:billm) from comment #2)
Well the reason I saw this was because Till was talking about adding a new use of WeakCache (from JSScript to LazyScript, or the other way around I don't remember), which would require this to work with keys that can be finalized.
Another option might be to add IsAboutToBeFinalized overload on void* to catch all non-GC things.
Comment on attachment 8412683 [details] [diff] [review]
bug1001355-is-about-to-be-finalized
Well, all right.
Attachment #8412683 -
Flags: review?(wmccloskey) → review+
Assignee | ||
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in
before you can comment on or make changes to this bug.
Description
•