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

Investigate potential threading issue in WebView's RTImage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx21
    • javafx
    • None
    • web
    • generic
    • generic

      Follow-up for JDK-8333374

      During review [~kcr] brought up a possible threading issue in WebView, excerpt from https://github.com/openjdk/jfx/pull/1590#discussion_r1792194207 :

      ===== 8< =====
      Regarding the possible threading issue, in the case of printing (which is the only way it gets to line 147), the draw method might not be called on the render thread. If it isn't, then we might have an issue with thread-safety (txt is not volatile, and I'm uncertain about the validity of checking whether the resource factory is disposed when not on the renderer thread). The safest thing to do would be to either redo those two checks inside the runOnRenderThread method right before calling getTexture() or, better still, wrap the two checks at the top of the draw method in runOnRenderThread.
      ===== 8< =====

      This should be checked and potentially remedied.

            lkostyra Lukasz Kostyra
            lkostyra Lukasz Kostyra
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: