initToplevel() needs to construct the proper subclass of CodeContext

RESOLVED FIXED

Status

RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: stejohns, Assigned: stejohns)

Tracking

unspecified
Bug Flags:
flashplayer-injection -
flashplayer-qrb +
flashplayer-bug -

Details

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
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).
(Assignee)

Comment 1

8 years ago
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)

Updated

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

Comment 2

8 years ago
changeset: 5758:74c15ca9a54b
user:      Steven Johnson <stejohns@adobe.com>
summary:   Bug 624817 - initToplevel() needs to construct the proper subclass of CodeContext (r=rreitmai)

http://hg.mozilla.org/tamarin-redux/rev/74c15ca9a54b

Updated

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