Currently the code constructs a "naked" CodeContext on the theory it should never be visible to non-builtin code; in theory this should be true, but it turns out that the Flash Debugger can examine the CodeContext from an arbitrary MethodEnv, and always assumes that said CodeContext is really a specific subclass (PlayerCodeContext).
Created attachment 502895 [details] [diff] [review] Patch Patch. Note that the creation is done by adding a closure-style argument to initToplevel (rather that adding a virtual method to AvmCore as has been done for similar cases) as PlayerCodeContext requires additional construction arguments that aren't available to AvmCore. (Plus it avoids further subclass ties to AvmCore.)
Attachment #502895 - Flags: review?(rreitmai)
changeset: 5758:74c15ca9a54b user: Steven Johnson <email@example.com> summary: Bug 624817 - initToplevel() needs to construct the proper subclass of CodeContext (r=rreitmai) http://hg.mozilla.org/tamarin-redux/rev/74c15ca9a54b
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.