Sat 27 Feb 2016 10:13:27 AM UTC, original submission:
This is a spin-off from bug #47004 (ExternalInterface in-band error code issue).
From the result of `js2flash-rtypes.html` and `flash2js-rtypes.html` test
(file #36405) posted in bug #47004, Gnash has few problem on `Number`
type handing of ExternalInterface return value.
In JavaScript-calls-Flash scenario:
- `Infinity` and `-Infinity` are returned incorrectly as 0.
- `NaN` is returned incorrectly as 0.
Relevant text output from `js2flash-rtypes.html`:
In Flash-calls-JavaScript scenario:
- There is a precision loss (e.g. 1234.5678 got passed as 1234.57).
- `Infinity` and `-Infinity` are not returned correctly*.
- `NaN` is returned incorrectly as 0.
Relevant Gnash's trace output from `flash2js-rtypes.html`:
* The `Infinity` and `-Infinity` value on Flash-calls-JavaScript
direction are returned as `NaN` on Flash Player.
Test result, screenshots, text outputs, debug outputs, and GDB backtrace,
are attached as `jsflash-rtypes_roundup.c12c3cf.zip`. (Crash is
due to bug #32411, backtrace is only attached for completeness)
Reference results are in the original test ZIP file.
For the record: According to Adobe's documentation, `Number` is an IEEE-754 `double` type.
The same holds for number in JavaScript (according to Mozilla).
Gnash: 0.8.11dev (git c12c3cf 22-Feb-2016) NPAPI
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386
|