Author: hsaputra
Date: Mon Jul 9 21:50:59 2012
New Revision: 1359422
URL: http://svn.apache.org/viewvc?rev=1359422&view=rev
Log:
SHINDIG-1816 | Change the check for child RPC to also verify if parent url
parameter exists
Modified:
shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
Modified: shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
URL:
http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js?rev=1359422&r1=1359421&r2=1359422&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/rpc/rpc.js (original)
+++ shindig/trunk/features/src/main/javascript/features/rpc/rpc.js Mon Jul 9
21:50:59 2012
@@ -126,7 +126,8 @@ if (!window['gadgets']['rpc']) { // make
var passReferrerContents = null;
// isGadget =~ isChild for the purposes of rpc (used only in setup).
- var isChild = (window.top !== window.self);
+ var isChild = !!gadgets.util.getUrlParameters().parent &&
+ (window.top !== window.self);
// Set the current rpc ID from window.name immediately, to prevent
// shadowing of window.name by a "var name" declaration, or similar.
@@ -438,7 +439,7 @@ if (!window['gadgets']['rpc']) { // make
var siblingId = parseSiblingId(id);
if (siblingId) {
- return window.top.frames[siblingId.id];
+ return window.frames[siblingId.id];
}
// Cast to a String to avoid an index lookup.
@@ -663,7 +664,6 @@ if (!window['gadgets']['rpc']) { // make
passReferrerContents = prParts[1] || 'origin';
}
-
function setLegacyProtocolConfig(cfg) {
if (isLegacyProtocolConfig(cfg)) {
transport = gadgets.rpctx.ifpc;