[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: |
Tue, 04 Aug 2015 11:08:16 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20100101 Firefox/10.0.12 Iceweasel/10.0.12 |
Follow-up Comment #2, bug #37223 (project gnash):
This issue is still reproducible under current git version of Gnash.
The root cause of this issue seems to be that Gnash uses the first argument
in
`ExternalInterface.addCallback(methodName,instance,method)` to make the
browser
aware of the registered callback, *but not using it to look up for a real
ActionScript function to call*.
Instead, Gnash tries to call `_root.methodName`, which is incorrect.
I've created HTML file and test flash file (using MTASC) to demonstrate the
root cause, by using two anonymous function, one registered as
ExternalInterface call named `script_call`, another one assigned to a
variable
`_root.script_call`.
When running `js2flash-rootcb.html` on browser with Adobe Flash Player
<http://i.imgur.com/QMswMpr.png>:
callee: starting
callee: adding ExternalInterface callback
callee: adding _root.script_call callback
caller: _root.script_call: function
callee: finished initializing
callee: entering ExternalInterface callback
callee: ExternalInterface callback succeeded, expected (Hello,World) got
(Hello,World)
callee: ExternalInterface callback finished
After 3 sec, you'd see that ExternalInterface-registered callback is called
correctly.
When running `js2flash-rootcb.html` on browser with Gnash current 0.8.11dev
git <http://i.imgur.com/8qArEK3.png>:
68 TRACE: callee: starting
68 TRACE: callee: adding ExternalInterface callback
68 TRACE: callee: adding _root.script_call callback
68 TRACE: caller: _root.script_call: function
68 TRACE: callee: finished initializing
2963 TRACE: callee: entering _root.script_call callback
2963 TRACE: callee: _root.script_call callback succeeded, expected
(Hello,World) got (Hello,World)
2963 TRACE: callee: _root.script_call callback finished
After 3 sec, you'd see that callback in _root is called instead of
ExternalInterface-registered one.
Test Flash/HTML file, source code, build scripts and full debug logs with
screenshots of both cases are attached (js2flash-rootcb.zip).
Gnash: 0.8.11dev (git 6b269f9 24-May-2015) NPAPI
Adobe 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 #34574)
_______________________________________________________
Additional Item Attachment:
File name: js2flash-rootcb.zip Size:7 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?37223>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInterface callback,
Nutchanon Wetchasit <=
- [Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInterface callback, Sandro Santilli, 2015/08/04
- [Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInterface callback, Nutchanon Wetchasit, 2015/08/10
- [Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInterface callback, Nutchanon Wetchasit, 2015/08/13
- [Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInterface callback, Nutchanon Wetchasit, 2015/08/15
- [Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInterface callback, Nutchanon Wetchasit, 2015/08/16
- [Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInterface callback, Sandro Santilli, 2015/08/16
- [Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInterface callback, Sandro Santilli, 2015/08/16
- [Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInterface callback, Nutchanon Wetchasit, 2015/08/19
- [Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInterface callback, Sandro Santilli, 2015/08/19
- [Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInterface callback, Nutchanon Wetchasit, 2015/08/19