Closed
Bug 590879
Opened 14 years ago
Closed 14 years ago
avmshell-exposed bugCompatibility getter is not rational
Categories
(Tamarin Graveyard :: Virtual Machine, defect, P1)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
RESOLVED
FIXED
Q3 11 - Serrano
People
(Reporter: lhansen, Assigned: lhansen)
References
Details
(Whiteboard: has-patch)
Attachments
(3 files)
9.65 KB,
patch
|
stejohns
:
review+
|
Details | Diff | Splinter Review |
13.77 KB,
patch
|
stejohns
:
review+
|
Details | Diff | Splinter Review |
1.78 KB,
patch
|
jsudduth
:
review+
|
Details | Diff | Splinter Review |
Currently we expose System.bugCompatibility: String as a property that allows test cases to query about the behavior they should expect from versioned built-in methods.
As currently exposed, the mechanism is going to become cumbersome: The string is of unknown format (the format is not documented in the System class and the command line help for the shell only lists all the legal version, making no effort to state that a particular format will always be used). Ergo a test case, to be correct, /must/ test (using ==) against every version string for versions where the old behavior of an API should be expected. This can get cumbersome quickly; already test cases are skipping the test for SWF10 because they "know" SWF9 and SWF10 are the same. What we want is a "<" test: if the running version is "<" the version in which we know the change to occur, we expect old behavior.
Unfortunately it is not an improvement to document that the string is of the form "SWFn" because "SWF100" is "<" the earlier "SWF20". At the current pace, with 90 unassigned numbers, four releases a year, and every release providing a new version, we'll reach SWF100 in less than 23 years - and that's assuming that we don't create holes in the range!
The workaround "System.bugCompatibility.substring(3) < 11" is pretty silly.
I propose that we rename System.bugCompatibility as System.swfVersion, that we make it return an integer, and that the -bugcompat switch to the shell is renamed as -swfversion and also takes an integer.
Assignee | ||
Comment 1•14 years ago
|
||
(In reply to comment #0)
> Unfortunately it is not an improvement to document that the string is of the
> form "SWFn" because "SWF100" is "<" the earlier "SWF20". At the current pace,
> with 90 unassigned numbers, four releases a year, and every release providing
> a new version, we'll reach SWF100 in less than 23 years - and that's assuming
> that we don't create holes in the range!
If I had worked harder on my logic and less hard on my rhetoric I would have realized that "SWF11" < "SWF9" and so the system is already broken.
Comment 2•14 years ago
|
||
All sounds fine to me -- I'd be happy to review such a patch :-)
Assignee | ||
Comment 3•14 years ago
|
||
Yeah, I guess I asked for that one.
Assignee: nobody → lhansen
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•14 years ago
|
||
This is messy because Domain.loadBytes also takes a string, I need to figure out if that's an old API or a new one we can change.
Comment 5•14 years ago
|
||
(In reply to comment #4)
> This is messy because Domain.loadBytes also takes a string, I need to figure
> out if that's an old API or a new one we can change.
That's a recent change, and this version of "Domain" is custom to avmshell -- change at will.
Assignee | ||
Comment 6•14 years ago
|
||
Attachment #470391 -
Flags: review?(stejohns)
Assignee | ||
Comment 7•14 years ago
|
||
Attachment #470392 -
Flags: review?(stejohns)
Assignee | ||
Updated•14 years ago
|
Whiteboard: has-patch
Assignee | ||
Comment 8•14 years ago
|
||
(Note shell_toplevel.{abc,h,cpp} must be regenerated when the patch lands.)
Comment 9•14 years ago
|
||
Comment on attachment 470391 [details] [diff] [review]
Patch: code changes
DomainObject::loadBytes() should use int32_t, not int. (Better yet, uint32_t here and in AS3, since value can't be negative, but that's a quibble.)
Otherwise fine.
Attachment #470391 -
Flags: review?(stejohns) → review+
Updated•14 years ago
|
Attachment #470392 -
Flags: review?(stejohns) → review+
Assignee | ||
Comment 10•14 years ago
|
||
I found another bug, which is that Domain.load() was still taking a bugCompatibility string, not a swfVersion. Apparently it's not being tested anywhere.
Assignee | ||
Comment 11•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 12•14 years ago
|
||
(In reply to comment #10)
> I found another bug, which is that Domain.load() was still taking a
> bugCompatibility string, not a swfVersion. Apparently it's not being tested
> anywhere.
In that case perhaps we should just remove it entirely, as it was only added for testing purposes.
Assignee | ||
Comment 13•14 years ago
|
||
(In reply to comment #12)
> (In reply to comment #10)
> > I found another bug, which is that Domain.load() was still taking a
> > bugCompatibility string, not a swfVersion. Apparently it's not being tested
> > anywhere.
>
> In that case perhaps we should just remove it entirely, as it was only added
> for testing purposes.
I will be happy to review such a patch :-)
Comment 14•14 years ago
|
||
Patch to make use of swfversion nomenclature consistent everywhere. Followup patch to fix test cases and incorrect .avm_arg files will be addressed in Bug 591885.
Attachment #470893 -
Flags: review?(jsudduth)
Comment 15•14 years ago
|
||
Comment on attachment 470893 [details] [diff] [review]
Update runtests to use swfversion everywhere.
Looks good - I don't see any typos or other problems.
Attachment #470893 -
Flags: review?(jsudduth) → review+
Comment 16•14 years ago
|
||
Pushed to redux:
http://hg.mozilla.org/tamarin-redux/rev/ebd943b3807f
Also updated Tamarin MDC docs:
https://developer.mozilla.org/En/Tamarin/Tamarin_Tests/Actionscript_Acceptance_Tests
Updated•14 years ago
|
Flags: flashplayer-bug-
You need to log in
before you can comment on or make changes to this bug.
Description
•