[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [patch #8721] Patch to make `GetVariable()` return String
From: |
Nutchanon Wetchasit |
Subject: |
[Gnash-commit] [patch #8721] Patch to make `GetVariable()` return String regardless of original variable type |
Date: |
Fri, 21 Aug 2015 15:20:40 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:25.5) Gecko/20150606 Firefox/31.9 PaleMoon/25.5.0 |
URL:
<http://savannah.gnu.org/patch/?8721>
Summary: Patch to make `GetVariable()` return String
regardless of original variable type
Project: Gnash - The GNU Flash player
Submitted by: nachanon
Submitted on: Fri 21 Aug 2015 10:20:38 PM ICT
Category: core
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
See the attached `0001_return-string-from-getvariable.patch`.
This patch fixes following GetVariable() issues listed on bug #42395 comment 6
<https://savannah.gnu.org/bugs/?42395#comment6>:
* Original code returns variable value using their original types, this patch
makes it convert to String.
* Original code failed to return +/-Infinity, Array/Object properly and
crashed libgnashplugin <https://savannah.gnu.org/bugs/?42395#comment4>, this
patch makes it return these values properly, and stops plugin from crashing.
*Special case of nonexistent and undefined variable:*
Under Flash Player, calling `GetVariable()` from JavaScript to fetch value
from a declared variable in Flash with value `undefined`,
*returns a string "undefined"*. If the variable is nonexistent
(not declared), it *returns `null` object*.
Under Gnash, `as_object.get_member()` didn't seem to make a distinction
between
a nonexistent (not declared) variable and a declared variable with value
`undefined`.
With this limitation, the patch make `undefined` case behave like nonexistent
variable; returning `null` to JavaScript, as a workaround.
Extra note: The fix of crashing is more like a side effect of this patch;
libgnashplugin crashes if it was given a non-null Array/Object value,
returning value as String avoided the crash. Root cause of the crash is
remaining to be fixed, possibly as a part of ExternalInterface issue
<https://savannah.gnu.org/bugs/?37223#comment4>.
Gnash: 0.8.11dev (patched against git 88f86a3 19-Aug-2015) NPAPI
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 21 Aug 2015 10:20:38 PM ICT Name:
0001_return-string-from-getvariable.patch Size: 1kB By: nachanon
Patch to make `GetVariable()` return String regardless of original variable
type
<http://savannah.gnu.org/patch/download.php?file_id=34689>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?8721>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Gnash-commit] [patch #8721] Patch to make `GetVariable()` return String regardless of original variable type,
Nutchanon Wetchasit <=
- [Gnash-commit] [patch #8721] Patch to make `GetVariable()` return String regardless of original variable type, Sandro Santilli, 2015/08/24
- [Gnash-commit] [patch #8721] Patch to make `GetVariable()` return String regardless of original variable type, Sandro Santilli, 2015/08/24
- [Gnash-commit] [patch #8721] Patch to make `GetVariable()` return String regardless of original variable type, Sandro Santilli, 2015/08/25
- [Gnash-commit] [patch #8721] Patch to make `GetVariable()` return String regardless of original variable type, Nutchanon Wetchasit, 2015/08/28
- [Gnash-commit] [patch #8721] Patch to make `GetVariable()` return String regardless of original variable type, Nutchanon Wetchasit, 2015/08/28
- [Gnash-commit] [patch #8721] Patch to make `GetVariable()` return String regardless of original variable type, Sandro Santilli, 2015/08/28
- [Gnash-commit] [patch #8721] Patch to make `GetVariable()` return String regardless of original variable type, Sandro Santilli, 2015/08/28