Closed Bug 640270 Opened 14 years ago Closed 6 years ago

Can ScriptObject::defaultValue() and toString() be non virtual?

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: edwsmith, Unassigned)

References

Details

Alternatively, (maybe), the guts of those methods should be factored out so that the type guarantees can be assumed by JIT callers. e.g. guarantees that toString() returns a non-null String, and defaultValue() returns a non-object value.
Assignee: nobody → stejohns
toString() is only a handful of places: APXHostObjectGlue/FPXHostObjectGlue (used by APE and authplay), and URLStreamGlue, oddly enough. The first two could probably be elided easily enough, but URLStreamGlue probably needs to stay. defaultValue() is overridden only once, but that's in JavaScriptBaseObject, the root of AIR's AS<->JS bridge. Adding ChrisB.
When the object is a javascript object, we need to use the javascript engine's version of defaultValue. As I've said before the JS bridge needs to be able to create Object's, Function's, and Array's that have *all* of their operations forwarded to the java script engine. defaultValue is an operation defined by ecma script. See section 8.6.2 of http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf
These can stay virtual or move to another place in ANI with the same capability, if the VM wrapper around them can enforce the invariants that we want to enforce (and which ECMA-262 says are the case), described above.
Hmm... since the default implementations simply call the AS3 implementation, simplest would be to have the few use cases override it in AS3.
Assignee: stejohns → dansmith
Blocks: ANI
Flags: flashplayer-qrb+
Flags: flashplayer-needsversioning-
Flags: flashplayer-injection-
Flags: flashplayer-bug-
Target Milestone: --- → Future
Assignee: dansmith → nobody
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.