-
Bug
-
Resolution: Fixed
-
P3
-
11, 14
-
b27
-
generic
-
os_x
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8236336 | 15 | Sergey Bylokhov | P3 | Resolved | Fixed | team |
JDK-8246583 | 13.0.4 | Sergey Bylokhov | P3 | Resolved | Fixed | b04 |
JDK-8243119 | 11.0.8-oracle | Sergey Bylokhov | P3 | Resolved | Fixed | b04 |
JDK-8243372 | 11.0.8 | Sergey Bylokhov | P3 | Resolved | Fixed | b01 |
In the sun.lwawt.macosx.CPlatformWindow both fixes changed initialize() method, pseudo diff:
JDK-8006406:
public void initialize() {
+ initializeBase(_target, _peer, _owner, new CPlatformView());
...
- contentView = new CPlatformView();
contentView.initialize(peer, responder);
}
JDK-8003559:
public void initialize() {
- contentView = new CPlatformView();
+ contentView = createContentView();
contentView.initialize(peer, responder);
Resulted merge:
+ initializeBase(_target, _peer, _owner, new CPlatformView());
- contentView = new CPlatformView()
+ contentView = createContentView();
contentView.initialize(peer, responder);
Note that we create CPlatformView twice. It could be not a big issue (one more object to allocated), but it has one unexpected issue. CPlatformView is a CFRetainedResource, which calls CPlatformView.dispose() during finalization, which tried to call windowLayer.dispose(); But since we did not call contentView.initialize() on the first CPlatformView its layer is null-> this cause an NPE on the finalization thread, which eventually slow down our disposal machinery.
public void initialize() {
+ initializeBase(_target, _peer, _owner, new CPlatformView());
...
- contentView = new CPlatformView();
contentView.initialize(peer, responder);
}
JDK-8003559:
public void initialize() {
- contentView = new CPlatformView();
+ contentView = createContentView();
contentView.initialize(peer, responder);
Resulted merge:
+ initializeBase(_target, _peer, _owner, new CPlatformView());
- contentView = new CPlatformView()
+ contentView = createContentView();
contentView.initialize(peer, responder);
Note that we create CPlatformView twice. It could be not a big issue (one more object to allocated), but it has one unexpected issue. CPlatformView is a CFRetainedResource, which calls CPlatformView.dispose() during finalization, which tried to call windowLayer.dispose(); But since we did not call contentView.initialize() on the first CPlatformView its layer is null-> this cause an NPE on the finalization thread, which eventually slow down our disposal machinery.
- backported by
-
JDK-8236336 Broken merge between JDK-8006406 and JDK-8003559
-
- Resolved
-
-
JDK-8243119 Broken merge between JDK-8006406 and JDK-8003559
-
- Resolved
-
-
JDK-8243372 Broken merge between JDK-8006406 and JDK-8003559
-
- Resolved
-
-
JDK-8246583 Broken merge between JDK-8006406 and JDK-8003559
-
- Resolved
-
- links to