Merge
This commit is contained in:
commit
2b7170b33c
@ -324,8 +324,6 @@ GtkApi* gtk3_load(JNIEnv *env, const char* lib_name)
|
||||
/* GDK */
|
||||
fp_gdk_get_default_root_window =
|
||||
dl_symbol("gdk_get_default_root_window");
|
||||
fp_gdk_window_get_scale_factor =
|
||||
dl_symbol("gdk_window_get_scale_factor");
|
||||
|
||||
/* Pixbuf */
|
||||
fp_gdk_pixbuf_new = dl_symbol("gdk_pixbuf_new");
|
||||
@ -400,6 +398,8 @@ GtkApi* gtk3_load(JNIEnv *env, const char* lib_name)
|
||||
} else {
|
||||
fp_gdk_window_create_similar_image_surface =
|
||||
dl_symbol("gdk_window_create_similar_image_surface");
|
||||
fp_gdk_window_get_scale_factor =
|
||||
dl_symbol("gdk_window_get_scale_factor");
|
||||
}
|
||||
gtk3_version_3_14 = !fp_gtk_check_version(3, 14, 0);
|
||||
|
||||
@ -2890,9 +2890,13 @@ static gboolean gtk3_get_drawable_data(JNIEnv *env, jintArray pixelArray,
|
||||
jint *ary;
|
||||
|
||||
GdkWindow *root = (*fp_gdk_get_default_root_window)();
|
||||
int win_scale = (*fp_gdk_window_get_scale_factor)(root);
|
||||
pixbuf = (*fp_gdk_pixbuf_get_from_drawable)(
|
||||
root, x, y, (int)(width / (float)win_scale + 0.5), (int)(height / (float)win_scale + 0.5));
|
||||
if (gtk3_version_3_10) {
|
||||
int win_scale = (*fp_gdk_window_get_scale_factor)(root);
|
||||
pixbuf = (*fp_gdk_pixbuf_get_from_drawable)(
|
||||
root, x, y, (int) (width / (float) win_scale + 0.5), (int) (height / (float) win_scale + 0.5));
|
||||
} else {
|
||||
pixbuf = (*fp_gdk_pixbuf_get_from_drawable)(root, x, y, width, height);
|
||||
}
|
||||
|
||||
if (pixbuf && scale != 1) {
|
||||
GdkPixbuf *scaledPixbuf;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -57,82 +57,6 @@ public class Krb5Util {
|
||||
private Krb5Util() { // Cannot create one of these
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the service ticket for serverPrincipal from caller's Subject
|
||||
* or from Subject obtained by logging in, or if not found, via the
|
||||
* Ticket Granting Service using the TGT obtained from the Subject.
|
||||
*
|
||||
* Caller must have permission to:
|
||||
* - access and update Subject's private credentials
|
||||
* - create LoginContext
|
||||
* - read the auth.login.defaultCallbackHandler security property
|
||||
*
|
||||
* NOTE: This method is used by JSSE Kerberos Cipher Suites
|
||||
*/
|
||||
public static KerberosTicket getTicketFromSubjectAndTgs(GSSCaller caller,
|
||||
String clientPrincipal, String serverPrincipal, String tgsPrincipal,
|
||||
AccessControlContext acc)
|
||||
throws LoginException, KrbException, IOException {
|
||||
|
||||
// 1. Try to find service ticket in acc subject
|
||||
Subject accSubj = Subject.getSubject(acc);
|
||||
KerberosTicket ticket = SubjectComber.find(accSubj,
|
||||
serverPrincipal, clientPrincipal, KerberosTicket.class);
|
||||
|
||||
if (ticket != null) {
|
||||
return ticket; // found it
|
||||
}
|
||||
|
||||
Subject loginSubj = null;
|
||||
if (!GSSUtil.useSubjectCredsOnly(caller)) {
|
||||
// 2. Try to get ticket from login
|
||||
try {
|
||||
loginSubj = GSSUtil.login(caller, GSSUtil.GSS_KRB5_MECH_OID);
|
||||
ticket = SubjectComber.find(loginSubj,
|
||||
serverPrincipal, clientPrincipal, KerberosTicket.class);
|
||||
if (ticket != null) {
|
||||
return ticket; // found it
|
||||
}
|
||||
} catch (LoginException e) {
|
||||
// No login entry to use
|
||||
// ignore and continue
|
||||
}
|
||||
}
|
||||
|
||||
// Service ticket not found in subject or login
|
||||
// Try to get TGT to acquire service ticket
|
||||
|
||||
// 3. Try to get TGT from acc subject
|
||||
KerberosTicket tgt = SubjectComber.find(accSubj,
|
||||
tgsPrincipal, clientPrincipal, KerberosTicket.class);
|
||||
|
||||
boolean fromAcc;
|
||||
if (tgt == null && loginSubj != null) {
|
||||
// 4. Try to get TGT from login subject
|
||||
tgt = SubjectComber.find(loginSubj,
|
||||
tgsPrincipal, clientPrincipal, KerberosTicket.class);
|
||||
fromAcc = false;
|
||||
} else {
|
||||
fromAcc = true;
|
||||
}
|
||||
|
||||
// 5. Try to get service ticket using TGT
|
||||
if (tgt != null) {
|
||||
Credentials tgtCreds = ticketToCreds(tgt);
|
||||
Credentials serviceCreds = Credentials.acquireServiceCreds(
|
||||
serverPrincipal, tgtCreds);
|
||||
if (serviceCreds != null) {
|
||||
ticket = credsToTicket(serviceCreds);
|
||||
|
||||
// Store service ticket in acc's Subject
|
||||
if (fromAcc && accSubj != null && !accSubj.isReadOnly()) {
|
||||
accSubj.getPrivateCredentials().add(ticket);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ticket;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the ticket corresponding to the client/server principal
|
||||
* pair from the Subject in the specified AccessControlContext.
|
||||
|
@ -38,8 +38,6 @@ compiler/compilercontrol/jcmd/AddLogTest.java 8181753 generi
|
||||
compiler/compilercontrol/mixed/RandomValidCommandsTest.java 8181753 generic-all
|
||||
compiler/compilercontrol/mixed/RandomCommandsTest.java 8181753 generic-all
|
||||
|
||||
compiler/graalunit/HotspotJdk9Test.java 8223807 generic-all
|
||||
compiler/jsr292/InvokerSignatureMismatch.java 8223807 generic-all
|
||||
|
||||
compiler/graalunit/JttThreadsTest.java 8207757 generic-all
|
||||
|
||||
|
@ -135,7 +135,8 @@ class TestMaxHeapSizeTools {
|
||||
expectError(new String[] { gcflag, "-XX:InitialHeapSize=1023K", "-version" });
|
||||
expectError(new String[] { gcflag, "-Xms64M", "-XX:InitialHeapSize=32M", "-version" });
|
||||
expectError(new String[] { gcflag, "-XX:MinHeapSize=1023K", "-version" });
|
||||
expectError(new String[] { gcflag, "-Xms4M", "-XX:MinHeapSize=8M", "-version" });
|
||||
// Note: MinHeapSize values get aligned up by HeapAlignment which is 32M with 64k pages.
|
||||
expectError(new String[] { gcflag, "-Xms4M", "-XX:MinHeapSize=64M", "-version" });
|
||||
expectError(new String[] { gcflag, "-XX:MinHeapSize=8M -XX:InitialHeapSize=4m" });
|
||||
}
|
||||
|
||||
|
@ -35,8 +35,9 @@ package gc.arguments;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
|
||||
public class TestSoftMaxHeapSizeFlag {
|
||||
private static final long Xms = 200 * 1024 * 1024;
|
||||
private static final long Xmx = 300 * 1024 * 1024;
|
||||
// Note: Xms and Xmx values get aligned up by HeapAlignment which is 32M with 64k pages.
|
||||
private static final long Xms = 224 * 1024 * 1024;
|
||||
private static final long Xmx = 320 * 1024 * 1024;
|
||||
private static final long greaterThanXmx = Xmx + 1;
|
||||
private static final long betweenXmsAndXmx = (Xms + Xmx) / 2;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user