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

Broken merge between JDK-8006406 and JDK-8003559

XMLWordPrintable

    • b27
    • generic
    • os_x

        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.

              serb Sergey Bylokhov
              serb Sergey Bylokhov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: