Closed Bug 813683 Opened 12 years ago Closed 8 years ago

IonMonkey: Get rid of the WeakCache used by VMWrapper.

Categories

(Core :: JavaScript Engine, defect)

19 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: nbp, Assigned: terrence)

Details

Attachments

(1 file, 1 obsolete file)

The WeakCache was introduced to keep the VMWrapper alive as long as the scripts which were calling them were alive.  Now that Bug 786146 has moved them to the Runtime and keep them alive all the time, in IonRuntime::Mark, we no longer need the WeakCache, and a simple Map should do the work.
Assignee: general → nobody
VMFunction is a C++ allocation and cannot move, so there is no need for this to be a RekeyableHashTable. Moreover, it is only valid to have a bare GC pointer (the JitCode*) if it is always rooted. It was not clear to me that this was or was not the case, so I made it a HeapPtr to be on the safe side. If the table is always rooted then the overhead will be very low and if it's not, then it might save us from some long-tail UAFs.
Assignee: nobody → terrence
Status: NEW → ASSIGNED
Attachment #8793048 - Flags: review?(nicolas.b.pierron)
Comment on attachment 8793048 [details] [diff] [review]
no_need_for_rekeyable_on_vmfunction-v0.diff

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

This patch sounds good to me, any idea what causes the red on try?
Attachment #8793048 - Flags: review?(nicolas.b.pierron) → review+
(In reply to Nicolas B. Pierron [:nbp] from comment #3)
> This patch sounds good to me, any idea what causes the red on try?

It's the other assertion patch in that push, from bug 1291776.
(In reply to Steve Fink [:sfink] [:s:] (PTO Sep23-28) from comment #4)
> (In reply to Nicolas B. Pierron [:nbp] from comment #3)
> > This patch sounds good to me, any idea what causes the red on try?
> 
> It's the other assertion patch in that push, from bug 1291776.

Actually, no, this is bug 1294563 comment 2. The failures are real. The followup try push appears not to have been posted here for some reason?
This is the right patch. We're fine just stripping the GC bits from it since the whole thing has static lifetime.
Attachment #8793048 - Attachment is obsolete: true
Attachment #8793371 - Flags: review+
Pushed by tcole@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/19ae43f8f7ca
No need for Rekeyable Hashtable for C++ VMFunction* pointers; r=nbp
https://hg.mozilla.org/mozilla-central/rev/19ae43f8f7ca
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: