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 2011/05/20 21:59:07 UTC

svn commit: r1125531 - /shindig/trunk/features/src/main/javascript/features/osapi.base/osapi.js

Author: johnh
Date: Fri May 20 19:59:07 2011
New Revision: 1125531

URL: http://svn.apache.org/viewvc?rev=1125531&view=rev
Log:
Only emit one duplicate-symbol warning per instantiation of osapi. In contexts where the library is dual-included, this significantly reduces consolespam.


Modified:
    shindig/trunk/features/src/main/javascript/features/osapi.base/osapi.js

Modified: shindig/trunk/features/src/main/javascript/features/osapi.base/osapi.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/osapi.base/osapi.js?rev=1125531&r1=1125530&r2=1125531&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/osapi.base/osapi.js (original)
+++ shindig/trunk/features/src/main/javascript/features/osapi.base/osapi.js Fri May 20 19:59:07 2011
@@ -37,8 +37,12 @@ osapi._registerMethod = function(method,
   }
   var basename = parts[parts.length - 1];
   if (last[basename]) {
-    gadgets.warn('Skipping duplicate osapi method definition '
-                 + method + ' on transport ' + transport['name']);
+    if (!last['__dupwarn']) {
+      gadgets.warn('Skipping duplicate osapi method definition '
+                   + method + ' on transport ' + transport['name'] +
+                   '; others may exist, but suppressing warnings');
+    }
+    last['__dupwarn'] = true;
     return;
   }