On Tuesday, July 17, 2012 2:53:13 AM UTC+2, Paul Stockley wrote:
>
> I can tell you that if you are working in anyway with JSO objects, devmode 
> will mask out null pointer exceptions. Maybe this is related. The problem 
> has to do with the JS method devmode uses to execute the JSNI code in the 
> browser. The stupid JS spec says if an object is null just do nothing, When 
> executing the JS for real this method isn't used and you get an error.
>

It's not "just do nothing", it's "use the global object" (or maybe "look up 
the scope chain").
To make things clear for everyone: DevMode executes JSNI method's by using 
.call() on the JS Function, passing the 'this' 
object (jsniFunc.call(thisObj, args)), and that object can be 'null', 
executing the method with the global object (equivalent to 'window') as the 
'this' object. In prod mode though, the code is compiled to a real method 
call (thisObj.jsniFunc(arg1, arg2), or "staticified" as jsniFunc(thisObj, 
arg1, arg2)) and then there can be a "null has no jsniFunc property" error 
at runtime.

See http://code.google.com/p/google-web-toolkit/issues/detail?id=3069

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/nuaNiG88WMsJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to