Author: etnu
Date: Wed Feb 20 13:47:02 2008
New Revision: 629622

URL: http://svn.apache.org/viewvc?rev=629622&view=rev
Log:
Fixed exception in the rpc library under IE7.


Modified:
    incubator/shindig/trunk/features/rpc/rpc.js

Modified: incubator/shindig/trunk/features/rpc/rpc.js
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/rpc/rpc.js?rev=629622&r1=629621&r2=629622&view=diff
==============================================================================
--- incubator/shindig/trunk/features/rpc/rpc.js (original)
+++ incubator/shindig/trunk/features/rpc/rpc.js Wed Feb 20 13:47:02 2008
@@ -101,20 +101,25 @@
     // Recycle IFrames
     for (var i = iframePool.length - 1; i >=0; --i) {
       var ifr = iframePool[i];
-      if (ifr && (ifr.recyclable || ifr.readyState === 'complete')) {
-        ifr.parentNode.removeChild(ifr);
-        if (window.ActiveXObject) {
-          // For MSIE, delete any iframes that are no longer being used. MSIE
-          // cannot reuse the IFRAME because a navigational click sound will
-          // be triggered when we set the SRC attribute.
-          // Other browsers scan the pool for a free iframe to reuse.
-          iframePool[i] = ifr = null;
-          iframePool.splice(i, 1);
-        } else {
-          ifr.recyclable = false;
-          iframe = ifr;
-          break;
-        }
+      try {
+             if (ifr && (ifr.recyclable || ifr.readyState === 'complete')) {
+               ifr.parentNode.removeChild(ifr);
+               if (window.ActiveXObject) {
+                 // For MSIE, delete any iframes that are no longer being 
used. MSIE
+                 // cannot reuse the IFRAME because a navigational click sound 
will
+                 // be triggered when we set the SRC attribute.
+                 // Other browsers scan the pool for a free iframe to reuse.
+                 iframePool[i] = ifr = null;
+                 iframePool.splice(i, 1);
+               } else {
+                 ifr.recyclable = false;
+                 iframe = ifr;
+                 break;
+               }
+             }
+      } catch (e) {
+       // Ignore; IE7 throws an exception when trying to read readyState and
+       // readyState isn't set.
       }
     }
     // Create IFrame if necessary


Reply via email to