[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-commit] [patch #8715] Patch for fixing callback registration
From: |
Richard Wilbur |
Subject: |
Re: [Gnash-commit] [patch #8715] Patch for fixing callback registration issue in ExternalInterface |
Date: |
Sun, 16 Aug 2015 23:14:58 -0600 |
diff --git a/libcore/movie_root.cpp b/libcore/movie_root.cpp
index 434f122..8d35546 100644
--- a/libcore/movie_root.cpp
+++ b/libcore/movie_root.cpp
@@ -1910,6 +1917,13 @@ movie_root::callExternalCallback(const std::string &name,
} else {
method = method_iterator->second;
+ // Look up for Object instance to use as "this" in the callback
+ instance_iterator = _externalCallbackInstances.find(name);
+ if (instance_iterator == _externalCallbackInstances.end()) {
+ instance = as_value((as_object*)NULL).to_object(getVM());
+ }
+ instance = instance_iterator->second;
+
In the code above instance is always set to instance_iterator->second.
Did you mean to do it in the following way?
+ // Look up for Object instance to use as "this" in the callback
+ instance_iterator = _externalCallbackInstances.find(name);
+ if (instance_iterator == _externalCallbackInstances.end()) {
+ instance = as_value((as_object*)NULL).to_object(getVM());
+ }
+ else {
+ instance = instance_iterator->second;
+ }
+
- [Gnash-commit] [patch #8715] Patch for fixing callback registration issue in ExternalInterface, Nutchanon Wetchasit, 2015/08/13
- [Gnash-commit] [patch #8715] Patch for fixing callback registration issue in ExternalInterface, Nutchanon Wetchasit, 2015/08/14
- [Gnash-commit] [patch #8715] Patch for fixing callback registration issue in ExternalInterface, Sandro Santilli, 2015/08/14
- [Gnash-commit] [patch #8715] Patch for fixing callback registration issue in ExternalInterface, Nutchanon Wetchasit, 2015/08/14
- [Gnash-commit] [patch #8715] Patch for fixing callback registration issue in ExternalInterface, Sandro Santilli, 2015/08/15
- [Gnash-commit] [patch #8715] Patch for fixing callback registration issue in ExternalInterface, Nutchanon Wetchasit, 2015/08/15
- [Gnash-commit] [patch #8715] Patch for fixing callback registration issue in ExternalInterface, Nutchanon Wetchasit, 2015/08/16
- [Gnash-commit] [patch #8715] Patch for fixing callback registration issue in ExternalInterface, Sandro Santilli, 2015/08/16
- Re: [Gnash-commit] [patch #8715] Patch for fixing callback registration issue in ExternalInterface,
Richard Wilbur <=
- Re: [Gnash-commit] [patch #8715] Patch for fixing callback registration issue in ExternalInterface, Sandro Santilli, 2015/08/17