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-2270-g8b33692
Date: Mon, 07 Mar 2016 10:05:28 +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  8b336929d19917a4d85629e8a9cd8483ad7f1c60 (commit)
      from  9229f6fa59061eb930179c6f6a616be541d1139f (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=8b336929d19917a4d85629e8a9cd8483ad7f1c60


commit 8b336929d19917a4d85629e8a9cd8483ad7f1c60
Author: Nutchanon Wetchasit <address@hidden>
Date:   Mon Mar 7 11:04:53 2016 +0100

    Use _global as "this" for ExternalInterface callback that lacks it.
    
    This fixes special cases of bug #37223 where instance object of
    the callback is set to null or undefined at registration time.
    See <https://savannah.gnu.org/bugs/?37223>

diff --git a/libcore/movie_root.cpp b/libcore/movie_root.cpp
index 55e45c5..cb63f7d 100644
--- a/libcore/movie_root.cpp
+++ b/libcore/movie_root.cpp
@@ -1942,6 +1942,12 @@ movie_root::callExternalCallback(const std::string &name,
         }
         else instance = instance_iterator->second;
 
+        // Use _global object as "this" instance if the callback is originally
+        // registered with null or undefined one.
+        if (instance == NULL) {
+            instance = &getGlobal(*method);
+        }
+
         // Populate function call arguments
         for (std::vector<as_value>::const_iterator args_iterator
                  = fnargs.begin();
diff --git a/testsuite/misc-mtasc.all/extcomm.as 
b/testsuite/misc-mtasc.all/extcomm.as
index dcf7862..df80226 100644
--- a/testsuite/misc-mtasc.all/extcomm.as
+++ b/testsuite/misc-mtasc.all/extcomm.as
@@ -89,12 +89,13 @@ class ExternalCommTest
                                {
                                        // `this` should be an "undefined" 
object like one in
                                        // a function called via 
`function.call(null)`
-                                       xcheck_equals(typeof(this), "object");
+                                       check_equals(typeof(this), "object");
                                        check(this == undefined);
                                        check(this == null);
                                        check(this !== undefined);
-                                       xcheck(this !== null);
-                                       xcheck_equals("" + this, "undefined");
+                                       check(this !== null);
+                                       check_equals("" + this, "undefined");
+                                       check(this === _global);
                                }
                        )
                );
@@ -104,12 +105,13 @@ class ExternalCommTest
                                {
                                        // `this` should be an "undefined" 
object like one in
                                        // a function called via 
`function.call(undefined)`
-                                       xcheck_equals(typeof(this), "object");
+                                       check_equals(typeof(this), "object");
                                        check(this == undefined);
                                        check(this == null);
                                        check(this !== undefined);
-                                       xcheck(this !== null);
-                                       xcheck_equals("" + this, "undefined");
+                                       check(this !== null);
+                                       check_equals("" + this, "undefined");
+                                       check(this === _global);
                                }
                        )
                );
diff --git a/testsuite/misc-mtasc.all/extcommtests-runner.sh 
b/testsuite/misc-mtasc.all/extcommtests-runner.sh
index 80cd550..2ac31a4 100644
--- a/testsuite/misc-mtasc.all/extcommtests-runner.sh
+++ b/testsuite/misc-mtasc.all/extcommtests-runner.sh
@@ -281,7 +281,7 @@ XFAILED=\`expr "\$XFAILED" + "\$PLAYERXFAILED"\`
 TESTED=\`expr "\$TESTED" + "\$PLAYERPASSED" + "\$PLAYERXPASSED" + 
"\$PLAYERFAILED" + "\$PLAYERXFAILED"\`
 
 # Check for total number of test run
-check_totals "87" "There should be 87 tests run"
+check_totals "89" "There should be 89 tests run"
 
 # Remove temporary files
 rm "\$LOGFILE"

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

Summary of changes:
 libcore/movie_root.cpp                          |    6 ++++++
 testsuite/misc-mtasc.all/extcomm.as             |   14 ++++++++------
 testsuite/misc-mtasc.all/extcommtests-runner.sh |    2 +-
 3 files changed, 15 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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