shindig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r889427 - in /incubator/shindig/trunk/features/src/main/javascript/features/rpc: fe.transport.js ifpc.transport.js nix.transport.js rmr.transport.js rpc.js wpm.transport.js
Date Thu, 10 Dec 2009 21:26:14 GMT
Author: johnh
Date: Thu Dec 10 21:26:14 2009
New Revision: 889427

URL: http://svn.apache.org/viewvc?rev=889427&view=rev
Log:
Add code guards to make gadgets.rpc resilient to double-inclusion in a page context.


Modified:
    incubator/shindig/trunk/features/src/main/javascript/features/rpc/fe.transport.js
    incubator/shindig/trunk/features/src/main/javascript/features/rpc/ifpc.transport.js
    incubator/shindig/trunk/features/src/main/javascript/features/rpc/nix.transport.js
    incubator/shindig/trunk/features/src/main/javascript/features/rpc/rmr.transport.js
    incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
    incubator/shindig/trunk/features/src/main/javascript/features/rpc/wpm.transport.js

Modified: incubator/shindig/trunk/features/src/main/javascript/features/rpc/fe.transport.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/rpc/fe.transport.js?rev=889427&r1=889426&r2=889427&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/rpc/fe.transport.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/rpc/fe.transport.js Thu
Dec 10 21:26:14 2009
@@ -41,6 +41,8 @@
  *   fe: Gecko-specific frameElement trick.
  *      - Firefox 1+
  */
+if (!gadgets.rpctx.frameElement) {  // make lib resilient to double-inclusion
+
 gadgets.rpctx.frameElement = function() {
   // Consts for FrameElement.
   var FE_G2C_CHANNEL = '__g2c_rpc';
@@ -132,3 +134,5 @@
 
   };
 }();
+
+} // !end of double-inclusion guard

Modified: incubator/shindig/trunk/features/src/main/javascript/features/rpc/ifpc.transport.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/rpc/ifpc.transport.js?rev=889427&r1=889426&r2=889427&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/rpc/ifpc.transport.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/rpc/ifpc.transport.js Thu
Dec 10 21:26:14 2009
@@ -35,6 +35,8 @@
  *      - No known major browsers still use this method, but it remains
  *        useful as a catch-all fallback for the time being.
  */
+if (!gadgets.rpctx.ifpc) {  // make lib resilient to double-inclusion
+
 gadgets.rpctx.ifpc = function() {
   var iframePool = [];
   var callId = 0;
@@ -154,3 +156,5 @@
     }
   };
 }();
+
+} // !end of double inclusion guard

Modified: incubator/shindig/trunk/features/src/main/javascript/features/rpc/nix.transport.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/rpc/nix.transport.js?rev=889427&r1=889426&r2=889427&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/rpc/nix.transport.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/rpc/nix.transport.js Thu
Dec 10 21:26:14 2009
@@ -63,6 +63,8 @@
  *     - Internet Explorer 6
  *     - Internet Explorer 7
  */
+if (!gadgets.rpctx.nix) {  // make lib resilient to double-inclusion
+
 gadgets.rpctx.nix = function() {
   // Consts for NIX. VBScript doesn't
   // allow items to start with _ for some reason,
@@ -276,3 +278,5 @@
     }
   };
 }();
+
+} // !end of double-inclusion guard

Modified: incubator/shindig/trunk/features/src/main/javascript/features/rpc/rmr.transport.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/rpc/rmr.transport.js?rev=889427&r1=889426&r2=889427&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/rpc/rmr.transport.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/rpc/rmr.transport.js Thu
Dec 10 21:26:14 2009
@@ -41,6 +41,8 @@
  *      - Safari 2+
  *      - Chrome 1
  */
+if (!gadgets.rpctx.rmr) {  // make lib resilient to double-inclusion
+
 gadgets.rpctx.rmr = function() {
   // Consts for RMR, including time in ms RMR uses to poll for
   // its relay frame to be created, and the max # of polls it does.
@@ -511,3 +513,5 @@
     }
   };
 }();
+
+} // !end of double-inclusion guard

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=889427&r1=889426&r2=889427&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 Thu Dec 10 21:26:14
2009
@@ -58,6 +58,8 @@
  * @class Provides operations for making rpc calls.
  * @name gadgets.rpc
  */
+if (!gadgets.rpc) { // make lib resilient to double-inclusion
+
 gadgets.rpc = function() {
   // General constants.
   var CALLBACK_NAME = '__cb';
@@ -829,3 +831,5 @@
 
 // Initialize library/transport.
 gadgets.rpc.init();
+
+} // !end of double-inclusion guard

Modified: incubator/shindig/trunk/features/src/main/javascript/features/rpc/wpm.transport.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/rpc/wpm.transport.js?rev=889427&r1=889426&r2=889427&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/rpc/wpm.transport.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/rpc/wpm.transport.js Thu
Dec 10 21:26:14 2009
@@ -42,6 +42,8 @@
  *      - Firefox 3+
  *      - Opera 9+
  */
+if (!gadgets.rpctx.wpm) {  // make lib resilient to double-inclusion
+
 gadgets.rpctx.wpm = function() {
   var ready;
 
@@ -96,3 +98,5 @@
     }
   };
 }();
+
+} // !end of double-inclusion guard



Mime
View raw message