gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [bug #47280] Gnash's ExternalInterface does not return Nu


From: Nutchanon Wetchasit
Subject: [Gnash-commit] [bug #47280] Gnash's ExternalInterface does not return Number value correctly
Date: Sat, 27 Feb 2016 10:13:28 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:25.8) Gecko/20151123 Firefox/31.9 PaleMoon/25.8.1

URL:
  <http://savannah.gnu.org/bugs/?47280>

                 Summary: Gnash's ExternalInterface does not return Number
value correctly
                 Project: Gnash - The GNU Flash player
            Submitted by: nachanon
            Submitted on: Sat 27 Feb 2016 05:13:27 PM ICT
                Category: plugin
                Severity: 3 - Normal
                 Release: master
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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`:

PASSED: Flash callback float_call should return a correct type
PASSED: Flash callback float_call should return a correct value
PASSED: Flash callback infinite_call should return a correct type
FAILED: Flash callback infinite_call should return a correct value ("0" !=
"Infinity")
PASSED: Flash callback neginfinite_call should return a correct type
FAILED: Flash callback neginfinite_call should return a correct value ("0" !=
"-Infinity")
PASSED: Flash callback nan_call should return a correct type
FAILED: Flash callback nan_call should return a correct value


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`:

114 TRACE: PASSED: JavaScript function float_call should return a correct
type
114 TRACE: FAILED: JavaScript function float_call should return a correct
value ("1234.57" != "1234.5678")
116 TRACE: PASSED: JavaScript function infinite_call should return a correct
type
116 TRACE: FAILED: JavaScript function infinite_call should return NaN
117 TRACE: PASSED: JavaScript function neginfinite_call should return a
correct type
117 TRACE: FAILED: JavaScript function neginfinite_call should return NaN
118 TRACE: PASSED: JavaScript function nan_call should return a correct type
118 TRACE: PASSED: JavaScript function nan_call should return a correct value


* 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
<http://help.adobe.com/en_US/AS2LCR/Flash_10.0/00001412.html>, `Number` is an
IEEE-754 `double` type.
The same holds for number in JavaScript (according to Mozilla
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type>).

Gnash: 0.8.11dev (git c12c3cf 22-Feb-2016) NPAPI
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 27 Feb 2016 05:13:27 PM ICT  Name:
jsflash-rtypes_roundup.c12c3cf.zip  Size: 28kB   By: nachanon
Outputs, screenshots, and logs from `js2flash-rtypes.html` and
`flash2js-rtypes.html` test on Gnash 0.8.11dev git c12c3cf
<http://savannah.gnu.org/bugs/download.php?file_id=36488>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47280>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]