Closed
Bug 454672
Opened 17 years ago
Closed 17 years ago
tamarin-central should have describeType available in the avm shell
Categories
(Tamarin Graveyard :: Virtual Machine, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: dschaffe, Assigned: stejohns)
Details
Attachments
(3 files)
|
620.17 KB,
patch
|
tierney
:
review+
|
Details | Diff | Splinter Review |
|
2.46 KB,
text/plain
|
tierney
:
review+
|
Details |
|
5.28 KB,
patch
|
tierney
:
review+
|
Details | Diff | Splinter Review |
The tamarin-tracing core directory contains DescribeType.as, defining the describeType global function in the avmplus.introspection package. The tamarin-central project should have describeType built into the shell also.
Flags: wanted-flashplayer10+
Flags: flashplayer-triage+
| Assignee | ||
Comment 1•17 years ago
|
||
The Proxy class should probably also be moved into the core VM, as it was in TT.
| Assignee | ||
Updated•17 years ago
|
Assignee: nobody → stejohns
| Assignee | ||
Comment 2•17 years ago
|
||
implement describeType() (and a few related calls) for TC/TR.
This is basically a port of the version implemented for TT, with a few bug fixes and tweaks -- the native API produces the type info as a JSON object, and AS3 code transforms it into XML.
avmplus.describeType() is essentially a superset of flash.utils.describeType() -- it produces the same results, but with some options to allow skipping the generation of info that isn't necessary for a given call. (Exception: it doesn't provide the "alias" attribute as that is a Flash-specific concept that is unlikely to be moved to the VM anytime soon)
Also found & fixed a few bugs related to TraitsMetadata caching (we hadn't been exercising every possible use, as it turns out)... some results were wrong, and a few could result in crashes.
Attachment #346338 -
Flags: review?(tierney)
Comment 3•17 years ago
|
||
Comment on attachment 346338 [details] [diff] [review]
Patch
Looks good. I've heard some requests to be able to only ask for certain data from describeType, so that should prove useful in the future.
Attachment #346338 -
Flags: review?(tierney) → review+
| Assignee | ||
Comment 4•17 years ago
|
||
pushed to redux as changeset: 1053:55b332e70e12
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 5•17 years ago
|
||
Subtle (possible) bug: the attributes in the XML are now being output in an order slightly different from the order Flash used, so toXMLString() returns a different string value. In theory, well-written apps shouldn't rely on this, but some of Flash's acceptance tests do, so we may need to tweak this to output entries in the order they used to be in... thoughts?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 6•17 years ago
|
||
One thing is that user code relies on the field order; we can't prevent that. But either we support a well-documented field order and then implement that, or we write test cases that don't depend on field order.
| Assignee | ||
Comment 7•17 years ago
|
||
Ironically, the acceptance test that I added for this does not depend on field order (it takes pain to sort into canonical results)... it's just the internal Flash acceptance tests that are lazy :-)
That said, if Flash did so internally, the odds are high that someone out on the web is relying on the current order as well, so I will revisit this in an attempt to get the order the same.
| Assignee | ||
Comment 8•17 years ago
|
||
Tweaks to DescribeType to add attributes and children in an order closer to that of Flash9/10. (There can still be differences in the order that slots are output, but that is impractical to work around and is probably less critical.)
Attachment #351036 -
Flags: review?(tierney)
| Assignee | ||
Comment 9•17 years ago
|
||
Note: even after the above patch, output may not match Flash9/10 exactly, as the old Flash implementation added slots (eg accessors, variables) in an arbitrary-but-consistent order (based on the order items were added to a hashtable); trying to replicate this precisely would require replicating a bunch of code for no other purpose.
I suspect that real-world code is less likely to be sensitive to that ordering, so at this point I'm inclined to leave it as-is... call toXMLString() on describeType() results and considering the string as a whole strikes me as a usecase that isn't typical.
Updated•17 years ago
|
Attachment #351036 -
Flags: review?(tierney) → review+
| Assignee | ||
Comment 10•17 years ago
|
||
pushed to redux as changeset: 1184:46aa0de4ffcb
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 11•17 years ago
|
||
Found another subtle incompatibility with FP9/FP10, reopening
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 12•17 years ago
|
||
Interface methods inherited from a grandparent (or higher up inheritance) were being listed in duplicate form, both public ns and interface ns.
Attachment #358462 -
Flags: review?(tierney)
Updated•17 years ago
|
Attachment #358462 -
Flags: review?(tierney) → review+
| Assignee | ||
Comment 13•17 years ago
|
||
pushed to redux as changeset: 1327:8e504b359cf3
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•