gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [patch #8933] Patch to use `_global` as a fallback `this`


From: Nutchanon Wetchasit
Subject: [Gnash-commit] [patch #8933] Patch to use `_global` as a fallback `this` object in ExternalInterface callback
Date: Sun, 06 Mar 2016 17:43:38 +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/patch/?8933>

                 Summary: Patch to use `_global` as a fallback `this` object
in ExternalInterface callback
                 Project: Gnash - The GNU Flash player
            Submitted by: nachanon
            Submitted on: Mon 07 Mar 2016 12:43:37 AM ICT
                Category: core
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

This is a follow-up to patch #8840.

On current version of Gnash, when ExternalInterface callback which
registered with `undefined` or `null` as `instance` object get called,
`this` pointer inside the callback will be set to `null`.

On Flash Player, `this` instance inside the callback in this case would be
the same as one seen in a function invoked using `Function.call(null)` or
`Function.call(undefined)` <https://savannah.gnu.org/patch/?8840#comment0>,
which is the `_global` object
<https://savannah.gnu.org/bugs/?37223#comment23>.

Patch 1 of 2:
See the attached
`0007_supply-global-instance-for-externalinterface-callback.patch`.

This patch adds a provision to provide `_global` object as `this` instance
in the same manner as `Function.call(null)` and `Function.call(undefined)`
when the callback is registered without one; fixing this aspect of bug
#37223.

Note: Implementation provided by this patch is not exactly the same as
current Gnash's `Function.call()`, as Gnash's `Function.call()`
implementation
has a bug. Automated test of this particular case will follows.

Gnash: 0.8.11dev (patched against git 9229f6f 3-Mar-2016)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 07 Mar 2016 12:43:37 AM ICT  Name:
0007_supply-global-instance-for-externalinterface-callback.patch  Size: 3kB  
By: nachanon
Patch to use `_global` as ExternalInterface callback context to the ones
lacking it
<http://savannah.gnu.org/patch/download.php?file_id=36559>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8933>

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




reply via email to

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