< prev index next >

src/windows/native/sun/windows/awt_Choice.cpp

Print this page
rev 12527 : 8165543: Better window framing
Reviewed-by: serb

*** 102,128 **** } AwtComponent::Dispose(); } AwtChoice* AwtChoice::Create(jobject peer, jobject parent) { ! JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); jobject target = NULL; AwtChoice* c = NULL; RECT rc; try { if (env->EnsureLocalCapacity(1) < 0) { return NULL; } AwtCanvas* awtParent; ! ! JNI_CHECK_NULL_GOTO(parent, "null parent", done); ! ! awtParent = (AwtCanvas*)JNI_GET_PDATA(parent); ! JNI_CHECK_NULL_GOTO(awtParent, "null awtParent", done); target = env->GetObjectField(peer, AwtObject::targetID); JNI_CHECK_NULL_GOTO(target, "null target", done); c = new AwtChoice(); --- 102,126 ---- } AwtComponent::Dispose(); } AwtChoice* AwtChoice::Create(jobject peer, jobject parent) { ! DASSERT(AwtToolkit::IsMainThread()); JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); jobject target = NULL; AwtChoice* c = NULL; RECT rc; try { if (env->EnsureLocalCapacity(1) < 0) { return NULL; } + PDATA pData; AwtCanvas* awtParent; ! JNI_CHECK_PEER_GOTO(parent, done); ! awtParent = (AwtCanvas*)pData; target = env->GetObjectField(peer, AwtObject::targetID); JNI_CHECK_NULL_GOTO(target, "null target", done); c = new AwtChoice();
*** 827,842 **** Java_sun_awt_windows_WChoicePeer_create(JNIEnv *env, jobject self, jobject parent) { TRY; - PDATA pData; - JNI_CHECK_PEER_RETURN(parent); AwtToolkit::CreateComponent(self, parent, (AwtToolkit::ComponentFactory) AwtChoice::Create); - JNI_CHECK_PEER_CREATION_RETURN(self); CATCH_BAD_ALLOC; } /* --- 825,837 ----
< prev index next >