From: Nutchanon Wetchasit <Nutchanon.Wetchasit@gmail.com>
Subject: Marshall undefined value in ExternalInterface communication as "<void/>".
Bug: https://savannah.gnu.org/bugs/?47004

See bug #47004 <https://savannah.gnu.org/bugs/?47004>

diff --git a/libcore/ExternalInterface.cpp b/libcore/ExternalInterface.cpp
index 3f24c95..8801696 100644
--- a/libcore/ExternalInterface.cpp
+++ b/libcore/ExternalInterface.cpp
@@ -1,7 +1,7 @@
 // ExternalInterface.cpp:  ActionScript "ExternalInterface" support
 //
-//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-//   Free Software Foundation, Inc
+//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
+//   2015, 2016 Free Software Foundation, Inc
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -115,7 +115,7 @@ ExternalInterface::_toXML(const as_value &val)
     } else if (val.is_number()) {
         ss << "<number>" << val.to_string() << "</number>";
     } else if (val.is_undefined()) {
-        ss << "<undefined/>";
+        ss << "<void/>";
     } else if (val.is_null()) {
         ss << "<null/>";
         // Exception isn't listed in any docs, but we'll use it for
diff --git a/testsuite/misc-mtasc.all/extcommtests-runner.sh b/testsuite/misc-mtasc.all/extcommtests-runner.sh
index 8cc8fba..80cd550 100644
--- a/testsuite/misc-mtasc.all/extcommtests-runner.sh
+++ b/testsuite/misc-mtasc.all/extcommtests-runner.sh
@@ -232,14 +232,14 @@ echo '<invoke name="script_nothis1" returntype="xml"><arguments></arguments></in
 
 # Read for callback return value statement
 read_timeout LINE \$READTIMEOUT <&3
-check_equals "\$LINE" '<undefined/>' "Gnash should return a correct value from script_nothis1 ExternalInterface callback"
+check_equals "\$LINE" '<void/>' "Gnash should return a correct value from script_nothis1 ExternalInterface callback"
 
 # Call the script_nothis2 callback
 echo '<invoke name="script_nothis2" returntype="xml"><arguments></arguments></invoke>' >&4
 
 # Read for callback return value statement
 read_timeout LINE \$READTIMEOUT <&3
-check_equals "\$LINE" '<undefined/>' "Gnash should return a correct value from script_nothis2 ExternalInterface callback"
+check_equals "\$LINE" '<void/>' "Gnash should return a correct value from script_nothis2 ExternalInterface callback"
 
 # Call the script_longarglist callback
 echo '<invoke name="script_longarglist" returntype="xml"><arguments><string>The</string><string>quick</string><string>brown</string><string>fox</string><string>jumps</string><string>over</string><string>the</string><string>lazy</string><string>dog</string></arguments></invoke>' >&4
