JDK-8170938 : Memory leak in JavaFX WebView
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8u102,9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-12-08
  • Updated: 2017-03-14
  • Resolved: 2016-12-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u131Fixed 9Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
See JDK-8164792 for a description of this bug. The initial fix for JDK-8164792 had to be backed out due to a design issue. Once an updated fix is found we will use this bug ID to push it.
Comments
webrev: http://cr.openjdk.java.net/~mbilla/8170938/webrev.01/ (whitespace corrected) Evaluation: Earlier fix for JDK-8164792 had an issue like unprotectImpl is being called even though the JSObject is not GC protected. Currently we create JSObject at 3 places (one from native, two places from java-wrappers - NodeImpl and DOMWindowImpl). Currently we have 3 types of below peer types : static final int JS_CONTEXT_OBJECT = 0; static final int JS_DOM_NODE_OBJECT = 1; static final int JS_DOM_WINDOW_OBJECT = 2; From native , JSObject is being created with peer type of JS_CONTEXT_OBJECT and since this object is GC protected from native, we need to make sure that only this peer type JSObject is being called for unprotectImpl via Disposer. Now while creating JSObject, before we add the JSObject to Disposer, we check for peer type JS_CONTEXT_OBJECT and this is the change from the previous fix of JDK-8164792.
09-12-2016

Changeset: a4c1d6b7d7f3 Author: mbilla Date: 2016-12-10 04:59 +0530 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/a4c1d6b7d7f3
09-12-2016

Looks good. I verified on 64-bit Windows and Mac and 32-bit Windows. +1
09-12-2016

webrev: http://cr.openjdk.java.net/~mbilla/8170938/webrev.00/
09-12-2016