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()`

Submitted by:  Nutchanon Wetchasit <nachanon>
Submitted on:  Tue 12 Jan 2016 04:38:05 PM UTC  
 
Category: corePriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Sandro Santilli <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>
Project MemberIn charge of this item.
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>
Project MemberIn charge of this item.
Wed 13 Jan 2016 03:51:25 PM UTC, comment #1:

No test coming with the patch ?

Sandro Santilli <strk>
Project MemberIn charge of this item.
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>

 

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
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by nachanon (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 29 Jan 2016 07:27:01 AM UTCstrkStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Sun 24 Jan 2016 09:59:23 AM UTCnachanonAttached File-=>Added 0002_add-single-argument-externalinterface-call-test.patch, #36154
    Wed 13 Jan 2016 03:53:26 PM UTCstrkStatusNone=>Ready For Test
      Assigned toNone=>strk
    Tue 12 Jan 2016 04:38:05 PM UTCnachanonAttached File-=>Added 0001_allow-single-argument-externalinterface-call.patch, #36002

    Back to the top


    Powered by Savane 3.1-cleanup1