gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2199-gdc51f53
Date: Fri, 28 Aug 2015 18:57:58 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  dc51f5389e4726486b631864151dcfe28e556cf6 (commit)
      from  062edf672abbd849a4a67447b5c3fb9f30d1a701 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=dc51f5389e4726486b631864151dcfe28e556cf6


commit dc51f5389e4726486b631864151dcfe28e556cf6
Author: Nutchanon Wetchasit <address@hidden>
Date:   Fri Aug 28 20:57:37 2015 +0200

    Use String return type in GetVariable() host interface.

diff --git a/libcore/movie_root.cpp b/libcore/movie_root.cpp
index dbcdf1c..4ecfb35 100644
--- a/libcore/movie_root.cpp
+++ b/libcore/movie_root.cpp
@@ -1598,9 +1598,15 @@ movie_root::processInvoke(ExternalInterface::invoke_t 
*invoke)
         VM &vm = getVM();
         std::string var = invoke->args[0].to_string();
         as_value val;
-        obj->get_member(getURI(vm, var), &val);
-        // GetVariable sends the value of the variable
-        ss << ExternalInterface::toXML(val);
+        if (obj->get_member(getURI(vm, var), &val)) {
+            // If the variable exists, GetVariable returns a string
+            // representation of its value. Variable with undefined
+            // or null value counts as exist too.
+            ss << ExternalInterface::toXML(val.to_string());
+        } else {
+            // If the variable does not exist, GetVariable sends null value
+            ss << ExternalInterface::toXML(as_value((as_object*)NULL));
+        }
     } else if (invoke->name == "GotoFrame") {
         log_unimpl(_("ExternalInterface::GotoFrame()"));
         // GotoFrame doesn't send a response

-----------------------------------------------------------------------

Summary of changes:
 libcore/movie_root.cpp |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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