patchGnash - The GNU Flash player - Patches: patch #8853, Patch to allow calling...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #8853: Patch to allow calling zero-argument JavaScript function via `ExternalInterface.call()`

Submitter:  Nutchanon Wetchasit <nachanon>
Submitted:  Tue 12 Jan 2016 04:38:05 PM UTC
   
 
Category:  core Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  strk Open/Closed:  Closed

Fri 29 Jan 2016 07:27:01 AM UTC, comment #4: 

Second patch pushed as commit e705394a72888a8791497d94a7cf4c78b2e23f02

Thanks!

Sandro Santilli <strk>
Group Member
Sun 24 Jan 2016 09:59:23 AM UTC, comment #3: 

Patch 2 of 2:
See the attached `0002_add-single-argument-externalinterface-call-test.patch`.

This patch adds a simple Flash-calls-JavaScript ExternalInterface test,
featuring a zero-argument string-returning JavaScript function call,
which ActionScript invokes `ExternalInterface.call()` using single argument.

The test is added as a part of `extcommtests-runner`.

Note:
The 1-sec pause between writing return value from container-side
`js_simple()` and writing invoke command to player-side `script_call()`,
is put there to avoid the condition that these two written data block got
read by Gnash as a single-block return value from `js_simple()`; discarding
the `script_call()` invoke, failing the test. This was due to Gnash (player)
used read block boundary to delimit the data rather than the XML tag.

Without a pause, test failures are very likely to appear, especially
under nested `make check-DEJAGNU`, but not when `extcommtests-runner` is run directly.

Gnash: 0.8.11dev (patched against git 62cfdfe 16-Jan-2016)
System: Debian GNU/Linux 7.0 Wheezy i386


(file #36154)

Nutchanon Wetchasit <nachanon>
Wed 13 Jan 2016 03:53:26 PM UTC, comment #2: 

Ah, "will follow", ok :)


This one is pushed with commit e8b111c3ca89eb23624d5c994fc4dff9b787d161

Sandro Santilli <strk>
Group Member
Wed 13 Jan 2016 03:51:25 PM UTC, comment #1: 

No test coming with the patch ?

Sandro Santilli <strk>
Group Member
Tue 12 Jan 2016 04:38:05 PM UTC, original submission:  

Current Gnash's `ExternalInterface.call()` does not allow calling JavaScript
function with no argument. If one tries to do it, the method will just
return `undefined` and JavaScript call will not be made.

This is caused by an incorrect argument check in `ExternalInterface.call()`
implementation which mistakenly rejects its invocation when number of argument
is less than 2. (It should reject only when number of argument is less than 1
which would be when the required `functionName` argument was not given)

Patch 1 of 2:
See the attached `0001_allow-single-argument-externalinterface-call.patch`.

This patch corrects the comparison used in argument check, allowing
zero-argument JavaScript function call to be made; fixing bug #46878.

Automated test will follow.

Gnash: 0.8.11dev (patched against git 6671ff0 12-Jan-2016)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #36154:  0002_add-single-argument-externalinterface-call-test.patch added by nachanon (3KiB - text/x-patch - Patch for adding automated test on zero-argument JavaScript call via ExternalInterface)
file #36002:  0001_allow-single-argument-externalinterface-call.patch added by nachanon (763B - text/x-patch - Patch for allowing single-argument `ExternalInterface.call()` invocation)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by nachanon (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-01-29 strk StatusReady For Test Done
        Open/ClosedOpen Closed
    2016-01-24 nachanon Attached File- Added 0002_add-single-argument-externalinterface-call-test.patch, #36154
    2016-01-13 strk StatusNone Ready For Test
        Assigned toNone strk
    2016-01-12 nachanon Attached File- Added 0001_allow-single-argument-externalinterface-call.patch, #36002

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code