64BitAsura / google-gin

Automatically exported from code.google.com/p/google-gin
Apache License 2.0
0 stars 0 forks source link

Need UnsafeNativeLong when using JSNI violator pattern #162

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Use gin in such a way that it needs to use JSNI to get access to a  
non-public method.
2. Include 'long' type parameters and/or return values.

What is the expected output? What do you see instead?

Should compile.  Instead you get errors like:

      [ERROR] Line 353: Parameter 6 of method 'com.example.Foo.bar()': type 'long' may not be passed out of JSNI code
      [ERROR] Line 353: Parameter 7 of method 'com.example.Foo.bar()': type 'long' may not be passed out of JSNI code
      [ERROR] Line 352: Parameter '_5': type 'long' is not safe to access in JSNI code
      [ERROR] Line 352: Parameter '_6': type 'long' is not safe to access in JSNI code

Please provide any additional information below.

Mark the method with @UnsafeNativeLong and GWT won't complain.

Original issue reported on code.google.com by scottb@google.com on 24 Jun 2011 at 9:09

GoogleCodeExporter commented 8 years ago

Original comment by aragos on 18 Jul 2011 at 9:42

GoogleCodeExporter commented 8 years ago
While I cannot replicate the errors for fields of type long or method 
parameters, they do exist for methods returning long (this should usually occur 
for provider methods).

Original comment by aragos on 19 Jul 2011 at 5:05

GoogleCodeExporter commented 8 years ago
Fixed in r219.

Original comment by aragos on 19 Jul 2011 at 5:06

GoogleCodeExporter commented 8 years ago
Thanks!

Original comment by scottb@google.com on 19 Jul 2011 at 5:09