Revision: 6230 Author: [email protected] Date: Sun Sep 27 22:07:27 2009 Log: The patch explicitly check if "this" is null, when invoking a static method and throw a JavaScriptException in this case.
Patch by: amitmanjhi Review by: rjrjr http://code.google.com/p/google-web-toolkit/source/detail?r=6230 Modified: /branches/farewellSwt/dev/oophm/src/com/google/gwt/dev/shell/MethodDispatch.java ======================================= --- /branches/farewellSwt/dev/oophm/src/com/google/gwt/dev/shell/MethodDispatch.java Wed Dec 3 15:31:00 2008 +++ /branches/farewellSwt/dev/oophm/src/com/google/gwt/dev/shell/MethodDispatch.java Sun Sep 27 22:07:27 2009 @@ -56,6 +56,10 @@ if (method.needsThis()) { jthis = JsValueGlue.get(jsthis, classLoader, method.getDeclaringClass(), "invoke this"); + if (jthis == null) { + throw ModuleSpace.createJavaScriptException(classLoader, + "Invoking an instance method on a null instance"); + } } for (int i = 0; i < argc; ++i) { args[i] = JsValueGlue.get(jsargs[i], classLoader, paramTypes[i], --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
