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/04/15 00:16:25 UTC

svn commit: r764984 - /incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js

Author: johnh
Date: Tue Apr 14 22:16:25 2009
New Revision: 764984

URL: http://svn.apache.org/viewvc?rev=764984&view=rev
Log:
In NIX, ensures that window.location of a given call (ultimately made through the process(...) method) is equivalent to the executor of the call rather than the caller. This fixes a scenario whereby, for instance, a container on C.com with gadget on G.com provides an IFRAME-based history solution, which accesses a same-domain IFRAME on C.com. A call from G.com causing a C.com history update fails since IE thinks window.location is G.com at this point w/o the setTimeout.


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=764984&r1=764983&r2=764984&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 Apr 14 22:16:25 2009
@@ -276,7 +276,8 @@
       // won't see this for a real Javascript object.
       if (typeof window[NIX_GET_WRAPPER] !== 'unknown') {
         window[NIX_HANDLE_MESSAGE] = function(data) {
-          process(gadgets.json.parse(data));
+          window.setTimeout(
+              function() { process(gadgets.json.parse(data)) }, 0);
         };
 
         window[NIX_CREATE_CHANNEL] = function(name, channel, token) {