[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-2234-g45b945d |
Date: |
Tue, 15 Dec 2015 07:22:30 +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 45b945d35e701cca19b3e393ca51ce0d12b4691b (commit)
from 95763cedfead0169906851c0a2f1f397f0412c9a (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=45b945d35e701cca19b3e393ca51ce0d12b4691b
commit 45b945d35e701cca19b3e393ca51ce0d12b4691b
Author: Nutchanon Wetchasit <address@hidden>
Date: Tue Dec 15 08:08:18 2015 +0100
Add newline to ExternalInterface callback and builtin plugin functions'
return message.
See bug #46115
diff --git a/libcore/movie_root.cpp b/libcore/movie_root.cpp
index 3c2b150..3c643e9 100644
--- a/libcore/movie_root.cpp
+++ b/libcore/movie_root.cpp
@@ -1603,9 +1603,11 @@ movie_root::processInvoke(ExternalInterface::invoke_t
*invoke)
// representation of its value. Variable with undefined
// or null value counts as exist too.
ss << ExternalInterface::toXML(val.to_string());
+ ss << std::endl;
} else {
// If the variable does not exist, GetVariable sends null value
ss << ExternalInterface::toXML(as_value((as_object*)NULL));
+ ss << std::endl;
}
} else if (invoke->name == "GotoFrame") {
log_unimpl(_("ExternalInterface::GotoFrame()"));
@@ -1614,7 +1616,8 @@ movie_root::processInvoke(ExternalInterface::invoke_t
*invoke)
const bool result =
callInterface<bool>(HostMessage(HostMessage::EXTERNALINTERFACE_ISPLAYING));
as_value val(result);
- ss << ExternalInterface::toXML(val);
+ ss << ExternalInterface::toXML(val);
+ ss << std::endl;
} else if (invoke->name == "LoadMovie") {
log_unimpl(_("ExternalInterface::LoadMovie()"));
// LoadMovie doesn't send a response
@@ -1638,7 +1641,8 @@ movie_root::processInvoke(ExternalInterface::invoke_t
*invoke)
}
as_value val(percent);
// PercentLoaded sends the percentage
- ss << ExternalInterface::toXML(val);
+ ss << ExternalInterface::toXML(val);
+ ss << std::endl;
} else if (invoke->name == "Play") {
callInterface(HostMessage(HostMessage::EXTERNALINTERFACE_PLAY));
// Play doesn't send a response
@@ -1667,8 +1671,9 @@ movie_root::processInvoke(ExternalInterface::invoke_t
*invoke)
} else if (invoke->name == "TotalFrames") {
MovieClip *mc = getLevel(0);
as_value val(mc->get_loaded_frames());
- // TotalFrames sends the number of frames in the movie
+ // TotalFrames sends the number of frames in the movie
ss << ExternalInterface::toXML(val);
+ ss << std::endl;
} else {
std::string result = callExternalCallback(invoke->name, invoke->args);
if (result == ExternalInterface::makeString("Error")) {
@@ -1962,8 +1967,13 @@ movie_root::callExternalCallback(const std::string &name,
// If the browser is connected, we send an Invoke message to the
// browser.
if (_hostfd >= 0) {
- const size_t ret = ExternalInterface::writeBrowser(_hostfd, result);
- if (ret != result.size()) {
+ std::stringstream ss;
+ size_t ret;
+
+ ss << result;
+ ss << std::endl;
+ ret = ExternalInterface::writeBrowser(_hostfd, ss.str());
+ if (ret != ss.str().size()) {
log_error(_("Could not write to browser fd #%d: %s"),
_hostfd, std::strerror(errno));
}
-----------------------------------------------------------------------
Summary of changes:
libcore/movie_root.cpp | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2234-g45b945d,
Sandro Santilli <=