bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

AvmCore needs a way to flush the TraitsBindings caches

RESOLVED FIXED

Status

Tamarin
Virtual Machine
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Steven Johnson, Assigned: Steven Johnson)

Tracking

Details

Attachments

(1 attachment)

2.50 KB, patch
Rick Reitmaier
: review+
Lars T Hansen
: superreview+
Details | Diff | Splinter Review
(Assignee)

Description

8 years ago
When a client explicitly attempts to unload ABC code (eg in Flash via unloadAndStop), we ought to flush the TraitsBindings cache in AvmCore; otherwise, recently-used types from the unloadee could still be in the cache, and since they keep hard references to their Traits, that can hold the whole shebang in memory for an arbitrary time (until the types are randomly evicted from the cache.)
(Assignee)

Comment 1

8 years ago
Created attachment 504540 [details] [diff] [review]
Patch

A bit simplistic, but will do the trick. Possible objections:

-- Rather than flushing everything, we could write a smart flush function that walked thru all the caches and only flushed the ones that have connections to the flushed AbcEnv(s); however, it would be a bit tricky to get right, and furthermore, if we assume that unloaded is an infrequent event, the performance hit from having to reload the cache(s) probably won't even be noticeable. (The design of QCache is that it's safe to flush too many times, it's just suboptimal.)

-- Rick suggested we pass an explicit AbcEnv*, even if we ignore it in the implementation; I'm reluctant to do so because (1) we'd likely ignore it and (2) if we ignore it we have no idea if the caller is doing the right thing.
Assignee: nobody → stejohns
Attachment #504540 - Flags: superreview?(lhansen)
Attachment #504540 - Flags: review?(rreitmai)

Updated

8 years ago
Attachment #504540 - Flags: review?(rreitmai) → review+

Comment 2

8 years ago
changeset: 5799:c51cc05bbc8e
user:      Steven Johnson <stejohns@adobe.com>
summary:   Bug 626479 - AvmCore needs a way to flush the TraitsBindings caches (r=rreitmai)

http://hg.mozilla.org/tamarin-redux/rev/c51cc05bbc8e
(Assignee)

Comment 3

8 years ago
TR 5799:c51cc05bbc8e

Updated

8 years ago
Attachment #504540 - Flags: superreview?(lhansen) → superreview+
(Assignee)

Updated

8 years ago
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.