We need to swallow the wait4js attribute defprop
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Mon, 23 Jun 2014 19:35:22 +0200
branchdefprop
changeset 1635deef1427bbe7
parent 1634 783acbc99199
child 1636 eb97a082741b
We need to swallow the wait4js attribute
rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/vmtest/impl/HtmlAnnotations.java
rt/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java
     1.1 --- a/rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/vmtest/impl/HtmlAnnotations.java	Sun Jun 22 17:46:43 2014 +0200
     1.2 +++ b/rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/vmtest/impl/HtmlAnnotations.java	Mon Jun 23 19:35:22 2014 +0200
     1.3 @@ -53,6 +53,9 @@
     1.4  
     1.5      @JavaScriptBody(args = {  }, javacall = true, body = "return @org.apidesign.bck2brwsr.vmtest.impl.HtmlAnnotations::callback()();")
     1.6      public static native int staticCallback();
     1.7 +
     1.8 +    @JavaScriptBody(args = {  }, wait4js = false, body = "/* do nothing */")
     1.9 +    public static native void empty();
    1.10      
    1.11      
    1.12      protected long chooseLong(boolean takeFirst, boolean takeSecond, long first, long second) {
     2.1 --- a/rt/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java	Sun Jun 22 17:46:43 2014 +0200
     2.2 +++ b/rt/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java	Mon Jun 23 19:35:22 2014 +0200
     2.3 @@ -1756,6 +1756,8 @@
     2.4                          args[cnt++] = value;
     2.5                      } else if ("javacall".equals(attr)) {
     2.6                          javacall = "1".equals(value);
     2.7 +                    } else if ("wait4js".equals(attr)) {
     2.8 +                        // ignore, we always invoke synchronously
     2.9                      } else {
    2.10                          throw new IllegalArgumentException(attr);
    2.11                      }