Please report any other irregularities here.
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.)
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.
changeset: 5799:c51cc05bbc8e user: Steven Johnson <firstname.lastname@example.org> summary: Bug 626479 - AvmCore needs a way to flush the TraitsBindings caches (r=rreitmai) http://hg.mozilla.org/tamarin-redux/rev/c51cc05bbc8e
Attachment #504540 - Flags: superreview?(lhansen) → superreview+
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.