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.
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.
- relates to
-
JDK-8239589 JavaFX UI will not repaint after reconnecting via Remote Desktop
- Resolved
-
JDK-8333374 Cannot invoke "com.sun.prism.RTTexture.contentsUseful()" because "this.txt" is null
- Resolved