| Issue 785: | JSNI call to toString fails | |
| Back to list |
Sign in to add a comment
|
Found in GWT Release: trunk, r575 Detailed description: HostedTest.testJSNIToStringResolution fails on OSX and Windows. This test attempts to call the Java toString method from JavaScript using JavaScript's toString method on a wrapped Java object. In OSX, it doesn't wind up calling the Java toString method but returns something reasonable. In Windows, it crashes because IDispatchProxy.invoke doesn't support the case of dispId=0/flags=COM.DISPATCH_METHOD. Workaround if you have one: none Links to the relevant GWT Developer Forum posts: none |
||||||||||||||||
,
Mar 08, 2007
Left out summary line.
Summary: JSNI call to toString fails
|
|||||||||||||||||
,
Mar 08, 2007
See also bug 775 ? |
|||||||||||||||||
,
Mar 08, 2007
Yes, 775 is the same issue just for OSX.
Cc: gwt.team.knorton
|
|||||||||||||||||
,
Mar 09, 2007
I think this is a newly-introduced bug in Windows, caused by my fiddling with the handling of id 0. Here's the problem: 0 is magic magic magic; DISPATCH_METHOD means to do an explicit invoke on the object, DISPATCH_PROPERTYGET means to do an explicit String conversion on the object. Fine. Now, on any other disp id, it must refer to some field on the object. In this case, DISPATCH_PROPERTYGET means to get the value of the field, which could be a simple field get or an attempt to "tear-off" a method. DISPATCH_METHOD means to invoke on that id. All still fine. The problem comes up because we've reserved id 0 for "toString" (that is JavaScript toString as opposed to the JSNI ident "@java.lang.Object::toString()"). This happens in DispatchClassInfo.lazyInitTargetMembers(). In retrospect, this was probabaly a bad choice. You'll notice that ie.MethodDispatch actually puts "toString" in id 1, which works perfectly. I think the right solution is to truly reserve 0 for implicit things, put toString at 1, and put everything else starting at 2.
Labels: -Priority-Medium Priority-High Milestone-1_4_RC
|
|||||||||||||||||
,
Apr 09, 2007
(No comment was entered for this change.)
Owner: gwt.team.scottb
Cc: gwt.team.jat |
|||||||||||||||||
,
Apr 11, 2007
Fixed in r840.
Status: FixedNotReleased
|
|||||||||||||||||
,
May 29, 2007
Changing to Fixed status with GWT 1.4 RC release
Status: Fixed
|
|||||||||||||||||
|
,
Apr 28, 2008
Owner: scottb
|
|||||||||||||||||
|
,
Apr 29, 2008
|
|||||||||||||||||
|
,
Apr 29, 2008
|
|||||||||||||||||
|
,
Apr 29, 2008
Cc: -gwt.team.knorton knor...@google.com
|
|||||||||||||||||
|
,
May 02, 2008
Cc: -gwt.team.jat j...@google.com
|
|||||||||||||||||
| ► Sign in to add a comment | |||||||||||||||||