You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by jo...@gmail.com on 2009/12/04 02:47:52 UTC

Fix ordering of child-to-container gadgets.rpc setup (issue165052)

Reviewers: shindig.remailer_gmail.com,

Description:
setupReceiver('..') initializes gadget-to-container communication, but
should be called in init() after gadgets.rpc as an object is set up.

Please review this at http://codereview.appspot.com/165052

Affected files:
   features/src/main/javascript/features/rpc/rpc.js


Index: features/src/main/javascript/features/rpc/rpc.js
===================================================================
--- features/src/main/javascript/features/rpc/rpc.js	(revision 887018)
+++ features/src/main/javascript/features/rpc/rpc.js	(working copy)
@@ -530,11 +530,6 @@
      }
    }

-  // gadgets.config might not be available, such as when serving container  
js.
-  if (isChild) {
-    setupReceiver('..');
-  }
-
    return /** @scope gadgets.rpc */ {
      /**
       * Registers an RPC service.
@@ -817,6 +812,9 @@
        if (transport.init(process, transportReady) === false) {
          transport = fallbackTransport;
        }
+      if (isChild) {
+        setupReceiver('..');
+      }
      },

      /** Returns the window keyed by the ID. null/".." for parent, else  
child */