提交 82ff8681 编写于 作者: S serb

8035736: [parfait] JNI primitive type mismatch in...

8035736: [parfait] JNI primitive type mismatch in jdk/src/windows/native/sun/windows/awt_Component.cpp
Reviewed-by: pchelko, anthony
上级 9880d696
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2014, 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
......@@ -47,6 +47,8 @@ extern COLORREF DesktopColor2RGB(int colorIndex);
class AwtObject;
typedef AwtObject* PDATA;
#define JNI_IS_TRUE(obj) ((obj) ? JNI_TRUE : JNI_FALSE)
#define JNI_CHECK_NULL_GOTO(obj, msg, where) { \
if (obj == NULL) { \
env->ExceptionClear(); \
......
......@@ -6114,7 +6114,7 @@ jboolean AwtComponent::_NativeHandlesWheelScrolling(void *param)
c = (AwtComponent *)pData;
if (::IsWindow(c->GetHWnd()))
{
result = (jboolean)c->InheritsNativeMouseWheelBehavior();
result = JNI_IS_TRUE(c->InheritsNativeMouseWheelBehavior());
}
ret:
env->DeleteGlobalRef(self);
......@@ -6930,9 +6930,9 @@ Java_sun_awt_windows_WComponentPeer_nativeHandlesWheelScrolling (JNIEnv* env,
{
TRY;
return (jboolean)AwtToolkit::GetInstance().SyncCall(
return JNI_IS_TRUE(AwtToolkit::GetInstance().SyncCall(
(void *(*)(void *))AwtComponent::_NativeHandlesWheelScrolling,
env->NewGlobalRef(self));
env->NewGlobalRef(self)));
// global ref is deleted in _NativeHandlesWheelScrolling
CATCH_BAD_ALLOC_RET(NULL);
......@@ -6951,9 +6951,9 @@ Java_sun_awt_windows_WComponentPeer_isObscured(JNIEnv* env,
jobject selfGlobalRef = env->NewGlobalRef(self);
return (jboolean)AwtToolkit::GetInstance().SyncCall(
return JNI_IS_TRUE(AwtToolkit::GetInstance().SyncCall(
(void*(*)(void*))AwtComponent::_IsObscured,
(void *)selfGlobalRef);
(void *)selfGlobalRef));
// selfGlobalRef is deleted in _IsObscured
CATCH_BAD_ALLOC_RET(NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册