Compare commits

...

15 Commits

Author SHA1 Message Date
Vitaly Provodin
a941dafa0b Update README.md 2022-09-02 05:52:56 +07:00
Alexey Ushakov
8e6b8bcbc9 JBR-3102 Exception in NSApplicationAWT: Invalid parameter not satisfying: !isnan(newOrigin.y)
Handled NAN values with some defaults
2022-09-01 11:23:55 +02:00
Alexey Ushakov
a1b6ceb0b0 JBR-4774 macOS: SIGILL at [libsystem_kernel] __kill in NPE / VolatileSurfaceManager.displayChanged / __displaycb_handle_block_invoke
Guarded against multiple displayChanged() notifications to avoid NPE
2022-08-31 19:26:51 +02:00
Alexey Ushakov
eab8881f02 JBR-4363 Changes in fonts rendering between JBR11 and JBR17
Do not use hinting for generating outlines
2022-08-30 19:21:22 +02:00
Dmitry Batrak
f863a14b19 JBR-4782 Synergy keyboard/mouse input: window disabled after bringing IntelliJ into focus 2022-08-30 13:04:55 +03:00
Konstantin Bulenkov
bd30286bf1 IDEA-299292 Use Inter semibold instead of Inter bold. Update BundledFontInfo 2022-08-29 15:33:20 +02:00
Maxim Kartashev
9fd49f2c75 JBR-4504 8283849: AsyncGetCallTrace may crash JVM on guarantee
Reviewed-by: mdoerr
Backport-of: 93c88690a1
2022-08-29 12:53:57 +03:00
Alexey Ushakov
820bc169b2 JBR-3100 Exception in NSApplicationAWT: java.lang.NullPointerException at java.desktop/sun.lwawt.LWComponentPeer.windowToLocal
Added null check
2022-08-29 09:13:42 +02:00
Vladislav Rassokhin
e90ffa06c1 JBR-4263 Improve check_jbr_size.sh
* Fix shellcheck inspections
* Don't silently fail if TOKEN is incorrect
2022-08-26 07:57:45 +07:00
Vitaly Provodin
8f0a0800c0 exclude java/awt/Graphics2D/ScaledTransform/ScaledTransform.java on linux due to 8277240 2022-08-25 15:06:59 +07:00
Vitaly Provodin
890bd435b8 JBR-4754 make root directory with the same name as archive name 2022-08-25 15:06:59 +07:00
Nikita Gubarkov
6c1e8f9ef3 Fixed JBR API bytecode generation version 2022-08-24 11:03:19 +03:00
Vitaly Provodin
19c777ecb2 update jbProblemList.txt test run stability 2022-08-24 11:54:21 +07:00
Vitaly Provodin
339724dc15 add problem list for multi-monitor runs 2022-08-24 11:53:52 +07:00
Vitaly Provodin
5a57b7610f JBR-4695 not remove binaries after packaging 2022-08-24 11:51:36 +07:00
26 changed files with 144 additions and 89 deletions

View File

@@ -11,7 +11,7 @@ can be found on the [releases page](https://github.com/JetBrains/JetBrainsRuntim
| IDE Version | Latest JBR | Date Released |
| --- | --- | --- |
| 2022.2 | [17.0.4-b469.46](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.4b469.46)| 22-Aug-2022 |
| 2022.2 | [17.0.4-b469.53](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.4b469.53)| 31-Aug-2022 |
## Contents

View File

@@ -98,11 +98,18 @@ REPRODUCIBLE_BUILD_OPTS="--enable-reproducible-build
function zip_native_debug_symbols() {
image_bundle_path=$(echo $1 | cut -d"/" -f-4)
jdk_name=$(echo $1 | cut -d"/" -f5)
jbr_diz_name=$2
(cd $image_bundle_path && find . -name '*.diz' -exec rsync -R {} ../../../../dizfiles \; )
[ -d "dizfiles" ] && rm -rf dizfiles
mkdir dizfiles
(cd dizfiles && find . -print0 | COPYFILE_DISABLE=1 \
rsync_target="../../../../dizfiles"
[ -z "$jdk_name" ] && rsync_target=$rsync_target"/"$jbr_diz_name
(cd $image_bundle_path && find . -name '*.diz' -exec rsync -R {} $rsync_target \;)
[ ! -z "$jdk_name" ] && mv dizfiles/$jdk_name dizfiles/$jbr_diz_name
(cd dizfiles && find $jbr_diz_name -print0 | COPYFILE_DISABLE=1 \
tar --no-recursion --null -T - -czf ../"$jbr_diz_name".tar.gz) || do_exit $?
}

View File

@@ -63,7 +63,7 @@ function create_image_bundle {
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}aarch64-${fastdebug_infix}b${build_number}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-${libc_type_suffix}aarch64-${fastdebug_infix:-}b${build_number%%.*}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}aarch64-${fastdebug_infix:-}b${build_number}
echo Running jlink....

View File

@@ -63,7 +63,7 @@ function create_image_bundle {
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x64-${fastdebug_infix}b${build_number}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-${libc_type_suffix}x64-${fastdebug_infix:-}b${build_number%%.*}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x64-${fastdebug_infix:-}b${build_number}
echo Running jlink....
[ -d "$IMAGES_DIR"/"$__root_dir" ] && rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
@@ -93,7 +93,7 @@ function create_image_bundle {
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
gzip "$JBR".tar || do_exit $?
rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
#rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
}
WITH_DEBUG_LEVEL="--with-debug-level=release"

View File

@@ -52,7 +52,7 @@ function create_image_bundle {
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x86-${fastdebug_infix}b${build_number}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-${libc_type_suffix}x86-${fastdebug_infix:-}b${build_number%%.*}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x86-${fastdebug_infix:-}b${build_number}
echo Running jlink....
[ -d "$IMAGES_DIR"/"$__root_dir" ] && rm -rf "${IMAGES_DIR:?}"/"$__root_dir"

View File

@@ -84,7 +84,7 @@ function create_image_bundle {
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-osx-${architecture}-${fastdebug_infix:-}b${build_number}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-${architecture}-${fastdebug_infix:-}b${build_number%%.*}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-osx-${architecture}-${fastdebug_infix:-}b${build_number}
JRE_CONTENTS=$tmp/$__root_dir/Contents
mkdir -p "$JRE_CONTENTS" || do_exit $?

View File

@@ -2,20 +2,27 @@
set -euo pipefail
TC_PRINT=0
# Always print TeamCity service messages if running under TeamCity
[[ -n "${TEAMCITY_VERSION:-}" ]] && TC_PRINT=1
while getopts ":t" o; do
case "${o}" in
t)
t="With Teamcity tests info"
TC_PRINT=1
;;
t) TC_PRINT=1 ;;
*);;
esac
done
shift $((OPTIND-1))
NEWFILEPATH=$1
CONFIGID=$2
BUILDID=$3
TOKEN=$4
NEWFILEPATH="$1"
CONFIGID="$2"
BUILDID="$3"
TOKEN="$4"
if [ ! -f "$NEWFILEPATH" ]; then
echo "File not found: $NEWFILEPATH"
exit 1
fi
#
# Get the size of new artifact
#
@@ -29,11 +36,7 @@ case "${unameOut}" in
NEWFILESIZE=$(stat -f%z "$NEWFILEPATH")
;;
CYGWIN*)
NEWFILESIZE=$(stat -c%s$4
#
# Get the size of new artifact
#
"$NEWFILEPATH")
NEWFILESIZE=$(stat -c%s "$NEWFILEPATH")
;;
MINGW*)
NEWFILESIZE=$(stat -c%s "$NEWFILEPATH")
@@ -42,13 +45,13 @@ case "${unameOut}" in
echo "Unknown machine: ${unameOut}"
exit 1
esac
FILENAME=$(basename ${NEWFILEPATH})
FILENAME=$(basename "${NEWFILEPATH}")
#
# Get pattern of artifact name
# Base filename pattern: <BUNDLE_TYPE>-<JDK_VERSION>-<OS>-<ARCH>-b<BUILD>.tar.gz: jbr_dcevm-17.0.2-osx-x64-b1234.tar.gz
# BUNDLE_TYPE: jbr, jbrsdk, jbr_dcevm, jbrsdk_jcef etc.
# OS_ARCH_PATTERN - <os_architecture>: osx-x64, linux-aarch64, windows-x64 etc.
# OS_ARCH_PATTERN - <os_architecture>: osx-x64, linux-aarch64, linux-musl-x64, windows-x64 etc.
BUNDLE_TYPE=jbrsdk
OS_ARCH_PATTERN=""
@@ -59,33 +62,37 @@ if [[ $FILENAME =~ $re ]]; then
BUNDLE_TYPE=${BASH_REMATCH[1]}
OS_ARCH_PATTERN=${BASH_REMATCH[2]}
FILE_EXTENSION=${BASH_REMATCH[3]}
else
echo "File name $FILENAME does not match regex $re"
exit 1
fi
if [ $TC_PRINT -eq 1 ]; then
testname_file_ext=`echo $FILE_EXTENSION | sed 's/\./_/g'`
testname=$BUNDLE_TYPE"_"$OS_ARCH_PATTERN$testname_file_ext
echo \#\#teamcity[testStarted name=\'$testname\']
fi
echo "BUNDLE_TYPE: " $BUNDLE_TYPE
echo "OS_ARCH_PATTERN: " $OS_ARCH_PATTERN
echo "FILE_EXTENSION: " $FILE_EXTENSION
echo "New size of $FILENAME = $NEWFILESIZE bytes."
function test_started_msg() {
if [ $TC_PRINT -eq 1 ]; then
echo "##teamcity[testStarted name='$1']"
fi
}
function test_failed_msg() {
if [ $3 -eq 1 ]; then
echo \#\#teamcity[testFailed name=\'$1\' message=\'$2\']
if [ $TC_PRINT -eq 1 ]; then
echo "##teamcity[testFailed name='$1' message='$2']"
fi
}
function test_finished_msg() {
if [ $2 -eq 1 ]; then
echo \#\#teamcity[testFinished name=\'$1\']
if [ $TC_PRINT -eq 1 ]; then
echo "##teamcity[testFinished name='$1']"
fi
}
test_name="${BUNDLE_TYPE}_${OS_ARCH_PATTERN//\-/_}${FILE_EXTENSION//\./_}"
test_started_msg "$test_name"
echo "BUNDLE_TYPE: $BUNDLE_TYPE"
echo "OS_ARCH_PATTERN: $OS_ARCH_PATTERN"
echo "FILE_EXTENSION: $FILE_EXTENSION"
echo "Size of $FILENAME is $NEWFILESIZE bytes"
#
# Get previous successful build ID
# Example:
@@ -95,20 +102,21 @@ function test_finished_msg() {
# expected return value
# id="123".number="567"
#
CURL_RESPONSE=$(curl --header "Authorization: Bearer $TOKEN" "https://buildserver.labs.intellij.net/app/rest/builds/?locator=buildType:(id:$CONFIGID),status:success,count:1,finishDate:(build:$BUILDID,condition:before)")
CURL_RESPONSE=$(curl -sSL --header "Authorization: Bearer $TOKEN" "https://buildserver.labs.intellij.net/app/rest/builds/?locator=buildType:(id:$CONFIGID),status:success,count:1,finishDate:(build:$BUILDID,condition:before)")
re='id=\"([0-9]+)\".+number=\"([0-9\.]+)\"'
# ID: Previous successful build id
ID=0
if [[ $CURL_RESPONSE =~ $re ]]; then
ID=${BASH_REMATCH[1]}
echo "BUILD Number: ${BASH_REMATCH[2]}"
echo "Previous build ID: $ID"
echo "Previous build number: ${BASH_REMATCH[2]}"
else
msg="ERROR: can't find previous build"
echo $msg
echo $CURL_RESPONSE
test_failed_msg $testname $msg $TC_PRINT
test_finished_msg $testname $TC_PRINT
msg="ERROR: cannot find previous build"
echo "$msg"
echo "$CURL_RESPONSE"
test_failed_msg "$test_name" "$msg"
test_finished_msg "$test_name"
exit 1
fi
@@ -118,36 +126,37 @@ fi
# expected return value
# name="jbrsdk_jcef*.tar.gz size="123'
#
CURL_RESPONSE=$(curl --header "Authorization: Bearer $TOKEN" "https://buildserver.labs.intellij.net/app/rest/builds/$ID?fields=id,number,artifacts(file(name,size))")
echo "Atrifacts of previous build of $CONFIGID :"
echo $CURL_RESPONSE
CURL_RESPONSE=$(curl -sSL --header "Authorization: Bearer $TOKEN" "https://buildserver.labs.intellij.net/app/rest/builds/$ID?fields=id,number,artifacts(file(name,size))")
echo "Artifacts of the previous build:"
echo "$CURL_RESPONSE"
# Find binary size (in response) with reg exp
re='name=\"('$BUNDLE_TYPE'[^\"]+'${OS_ARCH_PATTERN}'[^\"]+'${FILE_EXTENSION}')\" size=\"([0-9]+)\"'
re="name=\"(${BUNDLE_TYPE}[^\"]+${OS_ARCH_PATTERN}[^\"]+${FILE_EXTENSION})\" size=\"([0-9]+)\""
if [[ $CURL_RESPONSE =~ $re ]]; then
OLDFILENAME=${BASH_REMATCH[1]}
echo "Prev artifact name: $OLDFILENAME"
OLDFILESIZE=${BASH_REMATCH[2]}
echo "Prev artifact size = $OLDFILESIZE"
prevFileName=${BASH_REMATCH[1]}
echo "Previous artifact name: $prevFileName"
prevFileSize=${BASH_REMATCH[2]}
echo "Previous artifact size: $prevFileSize"
let allowedSize=OLDFILESIZE+OLDFILESIZE/20 # use 5% threshold
echo "Allowed size = $allowedSize"
((allowedSize=prevFileSize+prevFileSize/20)) # use 5% threshold
echo "Allowed size: $allowedSize"
if [[ "$NEWFILESIZE" -gt "$allowedSize" ]]; then
msg="ERROR: new size is significally greater than prev size (need to investigate)"
echo $msg
test_failed_msg $testname $msg $TC_PRINT
test_finished_msg $testname $TC_PRINT
msg="ERROR: new size is significantly greater than previous size (need to investigate)"
echo "$msg"
test_failed_msg "$test_name" "$msg"
test_finished_msg "$test_name"
exit 1
else
echo "PASSED"
test_finished_msg $testname $TC_PRINT
test_finished_msg "$test_name"
fi
else
msg="ERROR: can't find string with size in xml response:"
echo $msg
echo $CURL_RESPONSE
test_failed_msg $testname $msg $TC_PRINT
test_finished_msg $testname $TC_PRINT
msg="ERROR: cannot find string with size in xml response:"
echo "Regex: $re"
echo "$msg"
echo "$CURL_RESPONSE"
test_failed_msg "$test_name" "$msg"
test_finished_msg "$test_name"
exit 1
fi

View File

@@ -61,7 +61,7 @@ function create_image_bundle {
fastdebug_infix=''
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
__root_dir=${__bundle_name}-${JBSDK_VERSION}-aarch64-${fastdebug_infix:-}b${build_number%%.*}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-aarch64-${fastdebug_infix}b${build_number}
echo Running jlink ...
${BUILD_JDK}/bin/jlink \

View File

@@ -52,7 +52,7 @@ function create_image_bundle {
fastdebug_infix=''
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
__root_dir=${__bundle_name}-${JBSDK_VERSION}-x64-${fastdebug_infix:-}b${build_number%%.*}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
echo Running jlink ...
${JSDK}/bin/jlink \

View File

@@ -47,7 +47,7 @@ function create_image_bundle {
fastdebug_infix=''
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
__root_dir=${__bundle_name}-${JBSDK_VERSION}-x86-${fastdebug_infix:-}b${build_number%%.*}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x86-${fastdebug_infix}b${build_number}
echo Running jlink ...
${JSDK}/bin/jlink \

View File

@@ -26,7 +26,7 @@ function pack_jbr {
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-aarch64-${fastdebug_infix}b${build_number}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-aarch64-${fastdebug_infix:-}b${build_number%%.*}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-aarch64-${fastdebug_infix}b${build_number}
echo Creating $JBR.tar.gz ...
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir

View File

@@ -26,7 +26,7 @@ function pack_jbr {
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-x64-${fastdebug_infix:-}b${build_number%%.*}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
echo Creating $JBR.tar.gz ...
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir

View File

@@ -22,7 +22,7 @@ function pack_jbr {
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-x86-${fastdebug_infix}b${build_number}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-x86-${fastdebug_infix:-}b${build_number%%.*}
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x86-${fastdebug_infix}b${build_number}
echo Creating $JBR.tar.gz ...
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir

View File

@@ -630,14 +630,23 @@ bool CodeCache::contains(nmethod *nm) {
return contains((void *)nm);
}
static bool is_in_asgct() {
Thread* current_thread = Thread::current_or_null_safe();
return current_thread != NULL && current_thread->is_Java_thread() && current_thread->as_Java_thread()->in_asgct();
}
// This method is safe to call without holding the CodeCache_lock, as long as a dead CodeBlob is not
// looked up (i.e., one that has been marked for deletion). It only depends on the _segmap to contain
// valid indices, which it will always do, as long as the CodeBlob is not in the process of being recycled.
CodeBlob* CodeCache::find_blob(void* start) {
CodeBlob* result = find_blob_unsafe(start);
// We could potentially look up non_entrant methods
guarantee(result == NULL || !result->is_zombie() || result->is_locked_by_vm() || VMError::is_error_reported(), "unsafe access to zombie method");
return result;
bool is_zombie = result != NULL && result->is_zombie();
bool is_result_safe = !is_zombie || result->is_locked_by_vm() || VMError::is_error_reported();
guarantee(is_result_safe || is_in_asgct(), "unsafe access to zombie method");
// When in ASGCT the previous gurantee will pass for a zombie method but we still don't want that code blob returned in order
// to minimize the chance of accessing dead memory
return is_result_safe ? result : NULL;
}
// Lookup that does not fail if you lookup a zombie method (if you call this, be sure to know

View File

@@ -552,6 +552,9 @@ void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
return;
}
// !important! make sure all to call thread->set_in_asgct(false) before every return
thread->set_in_asgct(true);
switch (thread->thread_state()) {
case _thread_new:
case _thread_uninitialized:
@@ -609,6 +612,7 @@ void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
trace->num_frames = ticks_unknown_state; // -7
break;
}
thread->set_in_asgct(false);
}

View File

@@ -1014,6 +1014,7 @@ void JavaThread::check_for_valid_safepoint_state() {
JavaThread::JavaThread() :
// Initialize fields
_in_asgct(false),
_on_thread_list(false),
DEBUG_ONLY(_java_call_counter(0) COMMA)
_entry_point(nullptr),

View File

@@ -692,6 +692,7 @@ class JavaThread: public Thread {
friend class ThreadsSMRSupport; // to access _threadObj for exiting_threads_oops_do
friend class HandshakeState;
private:
bool _in_asgct; // Is set when this JavaThread is handling ASGCT call
bool _on_thread_list; // Is set when this JavaThread is added to the Threads list
OopHandle _threadObj; // The Java level thread object
@@ -1589,6 +1590,10 @@ public:
static OopStorage* thread_oop_storage();
static void verify_cross_modify_fence_failure(JavaThread *thread) PRODUCT_RETURN;
// AsyncGetCallTrace support
inline bool in_asgct(void) {return _in_asgct;}
inline void set_in_asgct(bool value) {_in_asgct = value;}
};
// Inline implementation of JavaThread::current

View File

@@ -95,7 +95,7 @@ class ProxyGenerator {
originalBridgeWriter = generateBridge ? new ClassWriter(ClassWriter.COMPUTE_FRAMES) : null;
if (generateBridge) {
bridgeWriter = VERIFY_BYTECODE ? new CheckClassAdapter(originalBridgeWriter, true) : originalBridgeWriter;
} else bridgeWriter = new ClassVisitor(Opcodes.ASM9) { // Empty visitor
} else bridgeWriter = new ClassVisitor(Opcodes.ASM8) { // Empty visitor
@Override
public MethodVisitor visitMethod(int access, String name, String descriptor, String signature, String[] exceptions) {
return new MethodVisitor(api) {};

View File

@@ -1328,7 +1328,7 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
public Point windowToLocal(Point p, LWWindowPeer wp) {
LWComponentPeer<?, ?> cp = this;
while (cp != wp) {
while (cp != null && cp != wp) {
Rectangle cpb = cp.getBounds();
p.x -= cpb.x;
p.y -= cpb.y;

View File

@@ -1218,12 +1218,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
* Callbacks from the AWTWindow and AWTView objc classes.
*************************************************************/
private void deliverWindowFocusEvent(boolean gained, CPlatformWindow opposite){
// Fix for 7150349: ingore "gained" notifications when the app is inactive.
if (gained && !((LWCToolkit)Toolkit.getDefaultToolkit()).isApplicationActive()) {
focusLogger.fine("the app is inactive, so the notification is ignored");
return;
}
LWWindowPeer oppositePeer = (opposite == null)? null : opposite.getPeer();
responder.handleWindowFocusEvent(gained, oppositePeer);
}

View File

@@ -37,6 +37,9 @@
#import <Carbon/Carbon.h>
#define DEFAULT_FRAME_WIDTH 1504
#define DEFAULT_FRAME_HEIGHT 846
// keyboard layout
static NSString *kbdLayout;
@@ -145,6 +148,26 @@ extern bool isSystemShortcut_NextWindowInApplication(NSUInteger modifiersMask, N
}
}
- (void)setFrame:(NSRect)newFrame {
if (isnan(newFrame.origin.x)) {
newFrame.origin.x = 0;
}
if (isnan(newFrame.origin.y)) {
newFrame.origin.y = 0;
}
if (isnan(newFrame.size.width)) {
newFrame.size.width = DEFAULT_FRAME_WIDTH;
}
if (isnan(newFrame.size.height)) {
newFrame.size.height = DEFAULT_FRAME_HEIGHT;
}
[super setFrame:newFrame];
}
- (BOOL) acceptsFirstMouse: (NSEvent *)event {
return YES;
}

View File

@@ -66,14 +66,14 @@ public abstract class VolatileSurfaceManager
/**
* The accelerated SurfaceData object.
*/
protected SurfaceData sdAccel;
protected volatile SurfaceData sdAccel;
/**
* The software-based SurfaceData object. Only create when first asked
* to (otherwise it is a waste of memory as it will only be used in
* situations of surface loss).
*/
protected SurfaceData sdBackup;
protected volatile SurfaceData sdBackup;
/**
* The current SurfaceData object.
@@ -342,7 +342,8 @@ public abstract class VolatileSurfaceManager
public void displayChanged() {
lostSurface = true;
boolean needBackup = false;
if (sdAccel != null) {
SurfaceData oldData = sdAccel;
if (oldData != null) {
// First, nullify the software surface. This guards against
// using a SurfaceData that was created in a different
// display mode.
@@ -352,7 +353,6 @@ public abstract class VolatileSurfaceManager
}
// Now, invalidate the old hardware-based SurfaceData
// Note that getBackupSurface may set sdAccel to null so we have to invalidate it before
SurfaceData oldData = sdAccel;
sdAccel = null;
oldData.invalidate();
}

View File

@@ -366,10 +366,10 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
jreFontMap.put("JetBrainsMono-Thin.ttf", new BundledFontInfo("JetBrainsMono-Thin", 2, 225, 0));
jreFontMap.put("JetBrainsMono-ThinItalic.ttf", new BundledFontInfo("JetBrainsMono-ThinItalic", 2, 225, 0));
jreFontMap.put("Inter-SemiBold.otf", new BundledFontInfo("Inter-Bold", 3, 19, 0));
jreFontMap.put("Inter-SemiBold.otf", new BundledFontInfo("Inter-SemiBold", 3, 19, 0));
jreFontMap.put("Inter-Regular.otf", new BundledFontInfo("Inter-Regular", 3, 19, 0));
jreFontMap.put("Inter-Italic.otf", new BundledFontInfo("Inter-Italic", 3, 19, 0));
jreFontMap.put("Inter-SemiBoldItalic.otf", new BundledFontInfo("Inter-BoldItalic", 3, 19, 0));
jreFontMap.put("Inter-SemiBoldItalic.otf", new BundledFontInfo("Inter-SemiBoldItalic", 3, 19, 0));
jreBundledFontFiles.addAll(jreFontMap.keySet());
}

View File

@@ -2172,7 +2172,7 @@ static FT_Outline* getFTOutlineNoSetup(FTScalerContext *context, FTScalerInfo* s
FT_Int32 loadFlags;
// We cannot get an outline from bitmap version of glyph
loadFlags = context->loadFlags | FT_LOAD_NO_BITMAP;
loadFlags = FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP;
error = FT_Load_Glyph(scalerInfo->face, glyphCode, loadFlags);
if (error) {

View File

@@ -249,6 +249,7 @@ sun/java2d/DirectX/OverriddenInsetsTest/OverriddenInsetsTest.java 8196102 generi
sun/java2d/DirectX/RenderingToCachedGraphicsTest/RenderingToCachedGraphicsTest.java 8196180,8252812 windows-all,macosx-all,linux-all
java/awt/Graphics2D/CopyAreaOOB.java 7001973 windows-all,macosx-all,linux-all
java/awt/Graphics2D/DrawString/DrawRotatedStringUsingRotatedFont.java 8266283 generic-all
java/awt/Graphics2D/ScaledTransform/ScaledTransform.java 8277240 linux-all
sun/java2d/SunGraphics2D/EmptyClipRenderingTest.java 8144029 macosx-all,linux-all,windows-all
sun/java2d/SunGraphics2D/DrawImageBilinear.java 8191406 generic-all
sun/java2d/SunGraphics2D/PolyVertTest.java 6986565 generic-all
@@ -537,6 +538,7 @@ java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsDocModalTest.java 816
java/awt/im/memoryleak/InputContextMemoryLeakTest.java 8023814 linux-all
java/awt/Frame/DisposeParentGC/DisposeParentGC.java 8079786 macosx-all
java/awt/GraphicsDevice/CheckDisplayModes.java 8266242 macosx-aarch64
java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java 7099223 linux-all,windows-all,macosx-all
java/awt/keyboard/AllKeyCode/AllKeyCode.java 8242930 macosx-all
java/awt/FullScreen/8013581/bug8013581.java 8169471 macosx-all

View File

@@ -0,0 +1 @@
test/jdk/java/awt/Multiscreen/MultiScreenLocationTest/MultiScreenLocationTest.java 8292588 macosx-all