gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [patch #8715] Patch for fixing callback registration issu


From: Nutchanon Wetchasit
Subject: [Gnash-commit] [patch #8715] Patch for fixing callback registration issue in ExternalInterface
Date: Sun, 16 Aug 2015 03:10:44 +0000
User-agent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.9.168 Version/11.51

Follow-up Comment #5, patch #8715 (project gnash):

Patch 2 of 2.
See the attached `0002_fix-externalinterface-callback-instance.patch`.

This patch changes following thing:
* Original code ignored value of `instance` argument, this patch *put it into
proper use*.

This patch used the same GC provision as previous one.

*Special case of `instance=null` and `instance=undefined`:*

Under Flash Player, specifying `instance` as `null` or `undefined` will make
`this` reference inside the callback *return `undefined`*.

There seems to be no easy way to do this under Gnash, as `invoke()`
accepts `this_ptr` as `as_object*`
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libcore/asobj/Global_as.h?id=6b269f9f3d518ca5372aa12876ca09be0743bac9#n165>
which has no notion of being `undefined`,
closest thing it has is `null` (represented by C NULL). Specifying it as such
will make `this` inside the callback *return `null`* (not `undefined`).

`as_value` of value `undefined` will also change into `null`
when it was converted to `as_object*`.

With this limitation, the patch will set `this` inside the callback to `null`
when applicable, as a workaround.

Gnash: 0.8.11dev (patched against git 6b269f9 24-May-2015) NPAPI
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

(file #34653)
    _______________________________________________________

Additional Item Attachment:

File name: 0002_fix-externalinterface-callback-instance.patch Size:5 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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