--- old/src/java.desktop/windows/native/libawt/windows/awt_FileDialog.cpp 2017-12-01 14:13:48.563941123 -0800 +++ new/src/java.desktop/windows/native/libawt/windows/awt_FileDialog.cpp 2017-12-01 14:13:48.411941010 -0800 @@ -259,13 +259,7 @@ OPENFILENAME ofn; memset(&ofn, 0, sizeof(ofn)); - /* - * There's a situation (see bug 4906972) when InvokeFunction (by which this method is called) - * returnes earlier than this method returnes. Probably it's caused due to ReplyMessage system call. - * So for the avoidance of this mistiming we need to make new global reference here - * (not local as it's used by the hook) and then manage it independently of the calling thread. - */ - peer = env->NewGlobalRef((jobject)p); + peer = (jobject)p; try { DASSERT(peer);