You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by jo...@apache.org on 2009/11/24 20:34:21 UTC
svn commit: r883830 -
/incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
Author: johnh
Date: Tue Nov 24 19:34:19 2009
New Revision: 883830
URL: http://svn.apache.org/viewvc?rev=883830&view=rev
Log:
If receiver frame ID doesn't exist anymore, don't even try to send the message. This helps avoid odd error messages and potentially other unexpected state.
Modified:
incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
Modified: incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js?rev=883830&r1=883829&r2=883830&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js Tue Nov 24 19:34:19 2009
@@ -623,6 +623,12 @@
l: useLegacyProtocol[targetId]
};
+ if (targetId !== '..' && !document.getElementById(targetId)) {
+ // The target has been removed from the DOM. Don't even try.
+ gadgets.log("WARNING: attempted send to nonexistent frame: " + targetId);
+ return;
+ }
+
// If target is on the same domain, call method directly
if (callSameDomain(targetId, rpc)) {
return;