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) {


Reply via email to