1.1 --- a/emul/src/main/java/java/lang/Object.java Mon Jan 14 11:30:56 2013 +0100
1.2 +++ b/emul/src/main/java/java/lang/Object.java Wed Jan 23 20:16:48 2013 +0100
1.3 @@ -25,6 +25,7 @@
1.4
1.5 package java.lang;
1.6
1.7 +import java.lang.reflect.Array;
1.8 import org.apidesign.bck2brwsr.core.JavaScriptBody;
1.9 import org.apidesign.bck2brwsr.core.JavaScriptPrototype;
1.10
1.11 @@ -40,8 +41,13 @@
1.12 @JavaScriptPrototype(container = "Object.prototype", prototype = "new Object")
1.13 public class Object {
1.14
1.15 - @JavaScriptBody(args = {}, body = "")
1.16 - private static native void registerNatives();
1.17 + private static void registerNatives() {
1.18 + try {
1.19 + Array.get(null, 0);
1.20 + } catch (Throwable ex) {
1.21 + // ignore
1.22 + }
1.23 + }
1.24 static {
1.25 registerNatives();
1.26 }