gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInt


From: Nutchanon Wetchasit
Subject: [Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInterface callback
Date: Sat, 05 Mar 2016 17:16:31 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:25.8) Gecko/20151123 Firefox/31.9 PaleMoon/25.8.1

Follow-up Comment #23, bug #37223 (project gnash):

>From more testing and a hint from Gnash's `Function.call()` implementation
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libcore/asobj/Function_as.cpp?id=9229f6fa59061eb930179c6f6a616be541d1139f#n159>,
I found that the correct `this` object inside ExternalInterface
callback registered with `undefined` or `null` instance is, in fact,
ActionScript's *`_global` object*.

I have made a semi-automated test SWF/HTML for verifying this aspect of
ExternalInterface, attached as `js2flash-nothis.zip`.

This is text output from `js2flash-nothis.html` on browser with Flash Player:


PASSED: Flash should properly register nullthis_call ExternalInterface
callback
PASSED: Flash should properly register undefinedthis_call ExternalInterface
callback
PASSED: ExternalInterface should be available
PASSED: nullthis_call ExternalInterface callback registration should not fail
PASSED: undefinedthis_call ExternalInterface callback registration should not
fail
PASSED: nullthis_call ExternalInterface callback should be called
PASSED: this pointer inside nullthis_call should be equal to undefined value
PASSED: this pointer inside nullthis_call should be equal to null value
PASSED: this pointer inside nullthis_call should not strictly equal to
undefined value
PASSED: this pointer inside nullthis_call should not strictly equal to null
value
PASSED: Appending this pointer inside nullthis_call to empty string should
give "undefined" string
PASSED: this pointer inside nullthis_call should be strictly equal to _global
object
PASSED: undefinedthis_call ExternalInterface callback should be called
PASSED: this pointer inside undefinedthis_call should be equal to undefined
value
PASSED: this pointer inside undefinedthis_call should be equal to null value
PASSED: this pointer inside undefinedthis_call should not strictly equal to
undefined value
PASSED: this pointer inside undefinedthis_call should not strictly equal to
null value
PASSED: Appending this pointer inside undefinedthis_call to empty string
should give "undefined" string
PASSED: this pointer inside undefinedthis_call should be strictly equal to
_global object
PASSED: There should be 19 tests run


You'd see that all checks were passed.

This is text output from `js2flash-nothis.html` on browser with Gnash:

PASSED: Flash should properly register nullthis_call ExternalInterface
callback
PASSED: Flash should properly register undefinedthis_call ExternalInterface
callback
PASSED: ExternalInterface should be available
PASSED: nullthis_call ExternalInterface callback registration should not fail
PASSED: undefinedthis_call ExternalInterface callback registration should not
fail
PASSED: nullthis_call ExternalInterface callback should be called
PASSED: this pointer inside nullthis_call should be equal to undefined value
PASSED: this pointer inside nullthis_call should be equal to null value
PASSED: this pointer inside nullthis_call should not strictly equal to
undefined value
FAILED: this pointer inside nullthis_call should not strictly equal to null
value
FAILED: Appending this pointer inside nullthis_call to empty string should
give "undefined" string ("null" != "undefined")
FAILED: this pointer inside nullthis_call should be strictly equal to _global
object
PASSED: undefinedthis_call ExternalInterface callback should be called
PASSED: this pointer inside undefinedthis_call should be equal to undefined
value
PASSED: this pointer inside undefinedthis_call should be equal to null value
PASSED: this pointer inside undefinedthis_call should not strictly equal to
undefined value
FAILED: this pointer inside undefinedthis_call should not strictly equal to
null value
FAILED: Appending this pointer inside undefinedthis_call to empty string
should give "undefined" string ("null" != "undefined")
FAILED: this pointer inside undefinedthis_call should be strictly equal to
_global object
PASSED: There should be 19 tests run


You'd see that checks were failed in the same way as current XFAILs
<https://savannah.gnu.org/patch/?8840#comment0> in
extcomm test of Gnash testsuite.

Gnash: 0.8.11dev (git 9229f6f 3-Mar-2016) NPAPI
Flash Player: 11.2 r202 (11.2.202.491) NPAPI binary
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386


(file #36557)
    _______________________________________________________

Additional Item Attachment:

File name: js2flash-nothis.zip            Size:25 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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