Made OSX hosted mode consistent with other platforms in handling of JSNI
arguments. It now permits JSNI calls to be made with too many arguments.
It simply ignores the excess args ... in the spirit of JavaScript.

Review by: scottb



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@2005 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/mac/src/com/google/gwt/dev/shell/mac/MethodDispatch.java b/dev/mac/src/com/google/gwt/dev/shell/mac/MethodDispatch.java
index c6b5661..67ee68c 100644
--- a/dev/mac/src/com/google/gwt/dev/shell/mac/MethodDispatch.java
+++ b/dev/mac/src/com/google/gwt/dev/shell/mac/MethodDispatch.java
@@ -51,12 +51,10 @@
       Class<?>[] paramTypes = method.getParameterTypes();
       int argc = paramTypes.length;
       Object args[] = new Object[argc];
+      // too many arguments are ok: the extra will be silently ignored      
       if (jsargs.length < argc) {
         throw new RuntimeException("Not enough arguments to " + method);
       }
-      if (jsargs.length > argc) {
-        throw new RuntimeException("Too many arguments to " + method);
-      }
       Object jthis = null;
       if (method.needsThis()) {
         jthis = JsValueGlue.get(jsthis, classLoader,