Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8123043

WebView: Using an instance of a non-public class to call back from javascript crashes the JVM

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 7u40
    • javafx
    • Windows 7 64-bit
      Java 7u40

    • web

      When passing an instance of a non-public nested class to use via javascript in a WebView to call back into Java, the JVM crashes hard (native stack overflow) when the method on that object is called from the javascript.

      Under Java 8b109 this merely results in an exception:
      Exception in thread "JavaFX Application Thread" java.lang.IllegalAccessException: Class sun.reflect.misc.Trampoline can not access a member of class webviewcallback.WebViewCallback$JavaAccessObject with modifiers "public"

            peterz Peter Zhelezniakov
            swpalmer Scott Palmer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: