Interesting question. It's not immediately obvious to me whether we ought to
be shunting all js->java calls through $entry(). This should really only be
necessary when a call into java is coming from js that is "at the top of the
stack". This usually means only event handlers, though if it were coming
from js that is hooking browser events it would be necessary in order for
the UEH to be triggered. FWIW, this has never been done from GWT.export()ed
methods, so at least it's not a change from the status quo.

On Fri, Oct 16, 2009 at 7:33 PM, Ray Cromwell <[email protected]> wrote:

>
> Bob,
>   Hmm, I just caught this thread. It looks like I should be updating
> GWT-Exporter library to use this? GWT exporter can export non-static methods
> as well, I'm wondering how that meshes with expectations?
>
> -Ray
>
>
>
> On Mon, Oct 12, 2009 at 8:39 AM, <[email protected]> wrote:
>
>>
>> Reviewers: jgw,
>>
>> Message:
>> I'm looking for an initial vetting of the overall idea, not necessarily
>> this implementation.  Obviously, there are additional entry-points that
>> need to be reworked and $entry need to detect reentrancy.
>>
>> Description:
>> This is an attempt to rationalize how external JS code should call into
>> a GWT module.  A new module-level variable $entry will be defined to
>> provide a wrapper function that will correctly enter and exit GWT code.
>>
>> Previously, where you might have written:
>>   $wnd.foo = @some.package.Class::staticMethod(typeArgs);
>>
>> you would now write
>>
>>   $wnd.foo = $entry(@some.package.Class::staticMethod(typeArgs));
>>
>>
>> Right now, $entry just makes sure that the uncaught exception handler is
>> called.  Later on, it will ensure that the FinallyCommand stack gets
>> flushed (e.g. to allow for efficient batching of StyleInjector calls).
>>
>> Please review this at http://gwt-code-reviews.appspot.com/77810
>>
>> Affected files:
>>   M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
>>   M dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
>>   M dev/core/src/com/google/gwt/dev/js/ast/JsRootScope.java
>>   M user/src/com/google/gwt/core/client/impl/Impl.java
>>   M user/src/com/google/gwt/user/client/impl/DOMImplMozilla.java
>>   M user/src/com/google/gwt/user/client/impl/DOMImplStandard.java
>>   M user/src/com/google/gwt/user/client/impl/DOMImplTrident.java
>>
>>
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to