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

Need to document that JavaScript to Java bindings use weak references

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u102, 9
    • Fix Version/s: 9
    • Component/s: javafx
    • Subcomponent:
      web

      Backports

        Description

        In order to fix JDK-8089681 we now use weak references in the WebKit JavaScript bridge code to hold onto Java objects that are bound to JavaScript objects using JSObject.setMember.

        Applications that rely on the previous, buggy behavior might be surprised by the fact that objects that are not strongly held by the application are subject to garbage collection even though they are bound to a JavaScript object.

        We should document this fact in the WebEngine documentation in the section on "Calling back to Java from JavaScript".

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mbilla Murali Billa
                  Reporter:
                  kcr Kevin Rushforth
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: